Class Packet
An H.264 packet for RTP.
Inheritance
Namespace: FM.LiveSwitch.H264
Assembly: FM.LiveSwitch.dll
Syntax
public class Packet : object
Constructors
Packet()
Default constuctor.
Declaration
public Packet()
Packet(Nalu)
Single NAL Unit Mode constructor.
Declaration
public Packet(Nalu nalu)
Parameters
Type | Name | Description |
---|---|---|
Nalu | nalu | The nalu. |
Properties
Buffer
Gets the Packet as a DataBuffer.
Declaration
public DataBuffer Buffer { get; }
Property Value
Type | Description |
---|---|
DataBuffer |
FragmentEnd
Gets if this is the end of a Fragmented Unit.
Declaration
public bool FragmentEnd { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
FragmentStart
Gets if this is the start of a Fragmented Unit.
Declaration
public bool FragmentStart { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
FuEBitMask
Gets the end bit.
Declaration
public static int FuEBitMask { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
FuRBitMask
Gets the reserved bit.
Declaration
public static int FuRBitMask { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
FuSBitMask
Gets the start bit.
Declaration
public static int FuSBitMask { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Last
Gets or sets whether this is the last nalu in the sequence (i.e. RTP Marker).
Declaration
public bool Last { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MaxPacketSize
Gets the maximum packet size (affects packetization).
Declaration
public static int MaxPacketSize { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Nalus
Gets or sets the NAL Units.
Declaration
public Nalu[] Nalus { get; set; }
Property Value
Type | Description |
---|---|
Nalu[] |
NaluType
Gets the type of Payload that is in this packet.
Declaration
public int NaluType { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
SequenceNumber
Gets or sets the RTP sequence number.
Declaration
public long SequenceNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
Depacketize(Packet[])
Depacketizes multiple H264Packets into a single encoded frame. Uses packetization mode 0.
Declaration
public static DataBuffer Depacketize(Packet[] packets)
Parameters
Type | Name | Description |
---|---|---|
Packet[] | packets | The packets. |
Returns
Type | Description |
---|---|
DataBuffer |
Depacketize(Packet[], Int32)
Depacketizes multiple H264Packets into a single encoded frame.
Declaration
public static DataBuffer Depacketize(Packet[] packets, int packetizationMode)
Parameters
Type | Name | Description |
---|---|---|
Packet[] | packets | The packets. |
System.Int32 | packetizationMode | The packetizationMode. |
Returns
Type | Description |
---|---|
DataBuffer |
Packetize(DataBuffer)
Packetizes a single encoded data frame into multiple H264 packets. Note: Only STAP-A and Single NALU are supported right now. Uses packetization mode 0.
Declaration
public static Packet[] Packetize(DataBuffer encodedData)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedData | The encoded data. |
Returns
Type | Description |
---|---|
Packet[] |
Packetize(DataBuffer, Int32)
Packetizes a single encoded data frame into multiple H264 packets. Note: Only STAP-A and Single NALU are supported right now.
Declaration
public static Packet[] Packetize(DataBuffer encodedData, int packetizationMode)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedData | The encoded data. |
System.Int32 | packetizationMode | The packetizationMode. |
Returns
Type | Description |
---|---|
Packet[] |
Wrap(DataBuffer)
Parses the specified packet bytes.
Declaration
public static Packet Wrap(DataBuffer buffer)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | buffer | The packet bytes. |
Returns
Type | Description |
---|---|
Packet |