Table of Contents

Class RtspPublisherSink

Namespace
VAST.RTSP
Assembly
VAST.RTSP.dll

Represents an RTSP publisher sink that pushes media data to a remote RTSP or RTP server.

public class RtspPublisherSink : INetworkSink, IMediaSink, IDisposable, INetworkEndPoint, IMessaging, INetworkStat
Inheritance
RtspPublisherSink
Implements
Inherited Members

Constructors

RtspPublisherSink()

Initializes a new instance of the RtspPublisherSink class.

public RtspPublisherSink()

Properties

Accept

Whether sink is accepted or not

public bool Accept { get; set; }

Property Value

bool

Capabilities

Gets the list of sink capabilities

public List<SinkCapability> Capabilities { get; }

Property Value

List<SinkCapability>

CurrentStat

Gets current network statistics

public NetworkStat CurrentStat { get; }

Property Value

NetworkStat

EndPoint

Connected end point info

public IPProtoEndPoint EndPoint { get; }

Property Value

IPProtoEndPoint

IsMessagingSupported

Gets whether remote peer supports messaging. If value is null then it's not yet determined whether remote peer supports messaging.

public bool? IsMessagingSupported { get; }

Property Value

bool?

IsNetworkSink

whether it's a network or local sink. Necessary to apply longer timeouts in media session processing logic.

public bool IsNetworkSink { get; }

Property Value

bool

Parameters

Gets or sets sink parameters

public SinkParameters Parameters { get; set; }

Property Value

SinkParameters

PublishingPath

Publishing point name extracted from the sink URI or by any other means (depends on the protocol)

public string PublishingPath { get; set; }

Property Value

string

ReceivedUri

End point URI used when connected (depends on the protocol)

public string ReceivedUri { get; set; }

Property Value

string

SocketError

Socket error got on disconnection

public ExtendedSocketError SocketError { get; }

Property Value

ExtendedSocketError

State

Current source state

public MediaState State { get; }

Property Value

MediaState

UniqueId

Unique stream id

public Guid UniqueId { get; set; }

Property Value

Guid

Uri

URI to be opened. Exact URI syntax depends on the implementation.

public string Uri { get; set; }

Property Value

string

Methods

AddStream(int, MediaType)

Add media stream for pushing

public void AddStream(int streamIndex, MediaType mediaType)

Parameters

streamIndex int

Stream index

mediaType MediaType

Stream media type

Dispose()

Releases all resources used by the RtspPublisherSink class.

public void Dispose()

Open()

Open sink using specified URI

public void Open()

PushMedia(int, VersatileBuffer)

Push media sample

public void PushMedia(int streamIndex, VersatileBuffer sample)

Parameters

streamIndex int

Stream index

sample VersatileBuffer

Media sample

SendMessage(byte[], int, int)

Sends a binary message to the remote peer.

public void SendMessage(byte[] message, int offset, int size)

Parameters

message byte[]

The byte array containing the message data.

offset int

The offset in the byte array to start reading from.

size int

The number of bytes to send.

SendMessage(string)

Sends a text message to the remote peer.

public void SendMessage(string message)

Parameters

message string

The text message to send.

SendMessage(VersatileBuffer)

Sends a binary message to the remote peer using a VersatileBuffer.

public void SendMessage(VersatileBuffer buffer)

Parameters

buffer VersatileBuffer

The buffer containing the message data.

Start(bool)

Start media pushing

public void Start(bool delayedStart = false)

Parameters

delayedStart bool

Whether media samples are expected immediately or after significant time interval. Not used in current sink

Stop()

Stop media pushing

public void Stop()

Events

Error

Occurs when an error is encountered during streaming.

public event EventHandler<ErrorEventArgs> Error

Event Type

EventHandler<ErrorEventArgs>

MessagingSupportDetermined

Occurs when it has been determined whether the remote peer supports messaging.

public event EventHandler<bool> MessagingSupportDetermined

Event Type

EventHandler<bool>

NewMessage

Occurs when a new message from the remote peer arrives.

public event EventHandler<MessageEventArgs> NewMessage

Event Type

EventHandler<MessageEventArgs>

StateChanged

Occurs when the sink state changes.

public event EventHandler<MediaState> StateChanged

Event Type

EventHandler<MediaState>