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 |
---|---|---|
IVideo |
input | The input. |
VideoDepacketizer(VideoFormat)
Initializes a new instance of the VideoDepacketizer<TFragment> class.
Declaration
public VideoDepacketizer(VideoFormat format)
Parameters
Type | Name | Description |
---|---|---|
Video |
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 |
---|---|---|
Video |
inputFormat | The input format. |
Video |
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. |
Overrides
DelayDepacketize
Gets a value indicating whether depacketizing should be delayed.
Declaration
protected bool DelayDepacketize { get; }
Property Value
Type | Description |
---|---|
System. |
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. |
FramesCorrupted
Gets the number of corrupted frames.
Declaration
public long FramesCorrupted { get; }
Property Value
Type | Description |
---|---|
System. |
FramesDropped
Gets the number of dropped frames.
Declaration
public long FramesDropped { get; }
Property Value
Type | Description |
---|---|
System. |
FramesReceived
Gets the number of received frames.
Declaration
public long FramesReceived { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
DoCreateFragment(RtpPacketHeader, DataBuffer)
Creates a fragment from a data buffer.
Declaration
protected abstract TFragment DoCreateFragment(RtpPacketHeader header, DataBuffer dataBuffer)
Parameters
Type | Name | Description |
---|---|---|
Rtp |
header | The RTP header for this packet. |
Data |
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 |
---|---|---|
Video |
frame | The frame. |
Video |
inputBuffer | The input buffer. |
Overrides
DoProcessTrackStatsFromInput(MediaTrackStats)
Process track stats from an input.
Declaration
protected override void DoProcessTrackStatsFromInput(MediaTrackStats trackStats)
Parameters
Type | Name | Description |
---|---|---|
Media |
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. |
|
IsKeyFrame(DataBuffer)
Determines whether a buffer represents the start of a keyframe.
Declaration
protected abstract bool IsKeyFrame(DataBuffer inputBuffer)
Parameters
Type | Name | Description |
---|---|---|
Data |
inputBuffer | The buffer. |
Returns
Type | Description |
---|---|
System. |
|
SendKeyFrameRequest(String)
Sends a key-frame request.
Declaration
protected void SendKeyFrameRequest(string reason)
Parameters
Type | Name | Description |
---|---|---|
System. |
reason |