Class TsSink
Provides a transport stream UDP sink that sends media data over a UDP connection.
public class TsSink : INetworkSink, IMediaSink, IDisposable, INetworkEndPoint
- Inheritance
-
TsSink
- Implements
- Inherited Members
Constructors
TsSink()
Initializes a new instance of the TsSink class.
public TsSink()
Properties
Accept
Gets or sets a value indicating whether the sink is accepted.
public bool Accept { get; set; }
Property Value
Capabilities
Gets the list of sink capabilities
public List<SinkCapability> Capabilities { get; }
Property Value
EndPoint
Gets the connected end point information.
public IPProtoEndPoint EndPoint { get; }
Property Value
IsNetworkSink
Gets a value indicating whether this is a network sink.
Always returns true.
public bool IsNetworkSink { get; }
Property Value
Parameters
Gets or sets sink parameters
public SinkParameters Parameters { get; set; }
Property Value
PublishingPath
Gets or sets the publishing point name extracted from the sink URI or by any other means (depends on the protocol).
public string PublishingPath { get; set; }
Property Value
ReceivedUri
Gets or sets the end point URI used when connected (depends on the protocol).
public string ReceivedUri { get; set; }
Property Value
SocketError
Gets the socket error received on disconnection.
public ExtendedSocketError SocketError { get; }
Property Value
State
Gets the current sink state.
public MediaState State { get; }
Property Value
UniqueId
Gets or sets the unique identifier of this sink.
public Guid UniqueId { get; set; }
Property Value
Uri
Gets or sets the URI to be opened. Exact URI syntax depends on the implementation.
public string Uri { get; set; }
Property Value
Methods
AddStream(int, MediaType)
Adds a media stream for pushing.
public void AddStream(int streamIndex, MediaType mediaType)
Parameters
Dispose()
Releases all resources used by the TsSink class.
public void Dispose()
Open()
Opens the sink using the specified URI and establishes a UDP connection.
public void Open()
PushMedia(int, VersatileBuffer)
Pushes a media sample over the UDP connection.
public void PushMedia(int streamIndex, VersatileBuffer packet)
Parameters
streamIndexintThe stream index.
packetVersatileBufferThe media sample to send.
Start(bool)
Starts media pushing over UDP.
public void Start(bool delayedStart = false)
Parameters
delayedStartboolfalseif media samples are expected immediately;trueif the first media sample is expected after a significant time interval (e.g. tens of seconds).
Stop()
Stops media pushing and closes the UDP connection.
public void Stop()
Events
Error
Occurs when an error has occurred during sink operation.
public event EventHandler<ErrorEventArgs> Error
Event Type
StateChanged
Occurs when the sink state has changed.
public event EventHandler<MediaState> StateChanged