Class VideoDepacketizer<TFragment>
A video depacketizer.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class VideoDepacketizer<TFragment> : VideoPipe, IVideoInput, IMediaInput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IInput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IVideoOutput, IMediaOutput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IOutput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IVideoElement, IMediaElement, IElement where TFragment : VideoFragment
Type Parameters
Name | Description |
---|---|
TFragment |
Constructors
VideoDepacketizer(IVideoOutput)
Initializes a new instance of the VideoDepacketizer<TFragment> class.
Declaration
public VideoDepacketizer(IVideoOutput input)
Parameters
Type | Name | Description |
---|---|---|
IVideoOutput | input | The input. |
VideoDepacketizer(VideoFormat)
Initializes a new instance of the VideoDepacketizer<TFragment> class.
Declaration
public VideoDepacketizer(VideoFormat format)
Parameters
Type | Name | Description |
---|---|---|
VideoFormat | format | The format. |
VideoDepacketizer(VideoFormat, VideoFormat)
Initializes a new instance of the VideoDepacketizer<TFragment> class.
Declaration
public VideoDepacketizer(VideoFormat inputFormat, VideoFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
VideoFormat | inputFormat | The input format. |
VideoFormat | outputFormat | The output format. |
Properties
AllowDiagnosticTimer
Gets whether this pipe is allowed to be timed.
Declaration
protected override bool AllowDiagnosticTimer { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
DelayDepacketize
Gets a value indicating whether depacketizing should be delayed.
Declaration
protected bool DelayDepacketize { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
DelayDepacketizeOnPendingKeyFrame
Gets or sets a flag indicating whether depacketizing should be bypassed for incoming media packets when a key frame request has been made via a PLI message. Default is true.
Declaration
public bool DelayDepacketizeOnPendingKeyFrame { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FramesCorrupted
Gets the number of corrupted frames.
Declaration
public long FramesCorrupted { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
FramesDropped
Gets the number of dropped frames.
Declaration
public long FramesDropped { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
FramesReceived
Gets the number of received frames.
Declaration
public long FramesReceived { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
DoCreateFragment(RtpPacketHeader, DataBuffer)
Creates a fragment from a data buffer.
Declaration
protected abstract TFragment DoCreateFragment(RtpPacketHeader header, DataBuffer dataBuffer)
Parameters
Type | Name | Description |
---|---|---|
RtpPacketHeader | header | The RTP header for this packet. |
DataBuffer | dataBuffer | The data buffer. |
Returns
Type | Description |
---|---|
TFragment | A fragment. |
DoDestroy()
Destroys this instance.
Declaration
protected override void DoDestroy()
Overrides
DoProcessFrame(VideoFrame, VideoBuffer)
Processes a frame.
Declaration
protected override void DoProcessFrame(VideoFrame frame, VideoBuffer inputBuffer)
Parameters
Type | Name | Description |
---|---|---|
VideoFrame | frame | The frame. |
VideoBuffer | inputBuffer | The input buffer. |
Overrides
DoProcessTrackStatsFromInput(MediaTrackStats)
Process track stats from an input.
Declaration
protected override void DoProcessTrackStatsFromInput(MediaTrackStats trackStats)
Parameters
Type | Name | Description |
---|---|---|
MediaTrackStats | trackStats | The track stats. |
Overrides
IsGapAllowed(TFragment, TFragment)
Determines whether a gap between two fragments is allowed.
Declaration
protected virtual bool IsGapAllowed(TFragment fragment, TFragment lastFragment)
Parameters
Type | Name | Description |
---|---|---|
TFragment | fragment | The fragment. |
TFragment | lastFragment | The last fragment. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsKeyFrame(DataBuffer)
Determines whether a buffer represents the start of a keyframe.
Declaration
protected abstract bool IsKeyFrame(DataBuffer inputBuffer)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | inputBuffer | The buffer. |
Returns
Type | Description |
---|---|
System.Boolean |
|
SendKeyFrameRequest(String)
Sends a key-frame request.
Declaration
protected void SendKeyFrameRequest(string reason)
Parameters
Type | Name | Description |
---|---|---|
System.String | reason |