Click or drag to resize
SmartJitterBufferT Class
Smart jitter buffer collects RTP packets and outputs RTP frames.
Inheritance Hierarchy
SystemObject
  StreamCoders.RtpSmartJitterBufferT

Namespace: StreamCoders.Rtp
Assembly: MediaBase (in MediaBase.dll) Version: 2.0.5.0 (2.0.5.0)
Syntax
public class SmartJitterBuffer<T>
where T : new(), RtpFrame

Type Parameters

T
RTP Frame class to use. For H.264 H264Frame should be used. For most other payloads RtpFrame will suffice.

The SmartJitterBufferT type exposes the following members.

Constructors
  NameDescription
Public methodSmartJitterBufferT(TimeSpan)
Initializes a new instance of the SmartJitterBufferT class
Public methodSmartJitterBufferT(TimeSpan, PlayoutBuffer)
Initializes a new instance of the SmartJitterBufferT class
Top
Properties
  NameDescription
Public propertyCheckMarkersForCompletion
Instructs the jitter that a criteria for a complete frame is that it is terminated by a packet that has its marker bit set.
Public propertyCheckSequenceGaps
Instructs the jitter that a criteria for a complete frame is that the frame has no sequence gaps. This should always be true unless highly unreliable transports are used.
Public propertyCurrentIncompleteCount
The current number of incomplete frames in the jitter.
Public propertyFrameExpiry
The current frame expiry time used for frames.
Public propertyName
Optional name for the jitter.
Public propertyOutputQueue
Public propertySkipLateOrIncompleteFrames
Instructs the jitter to drop a frame when it is incomplete and expired.
Public propertyTotalCompleteCount
The total number of completed frames.
Public propertyTotalDroppedFramesCount
The total number of frames dropped.
Top
Methods
  NameDescription
Public methodAddPacket(RtpPacket)
Adds a packet to the jitter
Public methodAddPacketT1(RtpPacket)
Addds a packet to the jitter
Public methodClear
Clears the jitter of complete and incomplete frames.
Public methodSetPlayoutBuffer
Sets the playout buffer to use in order to assign presentation times.
Top
Events
  NameDescription
Public eventFrameDropped
Optional Event informing of a frame being dropped.
Top
Extension Methods
  NameDescription
Public Extension MethodCopyOverloaded.
Creates a copy of the object.
(Defined by ObjectExtensions.)
Public Extension MethodCopy(Object)Overloaded.
Creates a deep copy of the object using the supplied object as a target for the copy operation.
(Defined by ObjectExtensions.)
Top
Remarks

The jitters goal is to minimize latency with the constraint to provide complete frames. It will automatically adjust the time a frame spends inside the jitter buffer depending on the average time it takes for other previous frames to complete.

The jitter buffer also has a global duration whos value must not go beyond the value set in the constructor parameter globalThresholdDuration. If the global duration exceeds that value, all frames in the buffer whos age exceed that threshold are automatically purged. This ensures sane levels of memory consumption in situation where frames are incomplete due to dropped packets.

It is mandatory to use a playout buffer on the packets being processed by the jitter buffer. The playout buffer should either pre-process the packets before being fed to the jitter buffer or SetPlayoutBuffer must be called in order to allow the jitter buffer to pre-process all packets itself.

See Also