Class Utility
Utility methods.
Inheritance
Inherited Members
Namespace: FM.LiveSwitch.H264
Assembly: FM.LiveSwitch.dll
Syntax
public class Utility
Properties
SupportedPacketizationModes
Gets the supported packetization modes.
Declaration
public static int[] SupportedPacketizationModes { get; }
Property Value
Type | Description |
---|---|
System.Int32[] |
SupportedProfileIdcs
Gets the supported profile ID codes.
Declaration
public static int[] SupportedProfileIdcs { get; }
Property Value
Type | Description |
---|---|
System.Int32[] |
Methods
GetNaluLength(DataBuffer, Int32)
Gets the NALU length at the specified offset.
Declaration
public static int GetNaluLength(DataBuffer encodedFrame, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
System.Int32 | offset | The offset into the encoded frame. |
Returns
Type | Description |
---|---|
System.Int32 |
GetNaluType(DataBuffer)
Gets the NALU type.
Declaration
public static int GetNaluType(DataBuffer encodedFrame)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
Returns
Type | Description |
---|---|
System.Int32 |
GetNaluType(DataBuffer, Int32)
Gets the NALU type at the specified offset.
Declaration
public static int GetNaluType(DataBuffer encodedFrame, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
System.Int32 | offset | The offset into the encoded frame. |
Returns
Type | Description |
---|---|
System.Int32 |
GetNaluTypes(DataBuffer)
Gets the NALU types.
Declaration
public static int[] GetNaluTypes(DataBuffer encodedFrame)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
Returns
Type | Description |
---|---|
System.Int32[] |
GetPacketizationMode(FormatParametersAttribute)
Gets the packetization mode from an H.264 format parameters attribute.
Declaration
public static int? GetPacketizationMode(FormatParametersAttribute formatParametersAttribute)
Parameters
Type | Name | Description |
---|---|---|
FormatParametersAttribute | formatParametersAttribute | The format parameters attribute. |
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> |
GetPacketizationMode(MapAttribute)
Gets the packetization mode from the related format parameters attribute of an H.264 RTP map attribute.
Declaration
public static int? GetPacketizationMode(MapAttribute rtpMapAttribute)
Parameters
Type | Name | Description |
---|---|---|
MapAttribute | rtpMapAttribute | The RTP map attribute. |
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> |
GetProfileLevelId(FormatParametersAttribute)
Gets the prolfile level id from an H.264 format parameters attribute.
Declaration
public static ProfileLevelId GetProfileLevelId(FormatParametersAttribute formatParametersAttribute)
Parameters
Type | Name | Description |
---|---|---|
FormatParametersAttribute | formatParametersAttribute | The format parameters attribute. |
Returns
Type | Description |
---|---|
ProfileLevelId |
GetProfileLevelId(MapAttribute)
Gets the profile level id from the related format parameters attribute of an H.264 RTP map attribute.
Declaration
public static ProfileLevelId GetProfileLevelId(MapAttribute rtpMapAttribute)
Parameters
Type | Name | Description |
---|---|---|
MapAttribute | rtpMapAttribute | The RTP map attribute. |
Returns
Type | Description |
---|---|
ProfileLevelId |
GetStartCodeLength(DataBuffer, Int32)
Gets the start code length at the specified offset.
Declaration
public static int GetStartCodeLength(DataBuffer encodedFrame, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
System.Int32 | offset | The offset into the encoded frame. |
Returns
Type | Description |
---|---|
System.Int32 |
IsAud(DataBuffer)
Determines whether the encoded frame starts with an AUD NALU.
Declaration
public static bool IsAud(DataBuffer encodedFrame)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
Returns
Type | Description |
---|---|
System.Boolean |
IsAud(DataBuffer, Int32)
Determines whether the encoded frame starts with an AUD NALU.
Declaration
public static bool IsAud(DataBuffer encodedFrame, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
System.Int32 | offset | The offset into the encoded frame. |
Returns
Type | Description |
---|---|
System.Boolean |
IsIdr(DataBuffer)
Determines whether the encoded frame starts with an IDR NALU.
Declaration
public static bool IsIdr(DataBuffer encodedFrame)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
Returns
Type | Description |
---|---|
System.Boolean |
IsIdr(DataBuffer, Int32)
Determines whether the encoded frame starts with an IDR NALU.
Declaration
public static bool IsIdr(DataBuffer encodedFrame, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
System.Int32 | offset | The offset into the encoded frame. |
Returns
Type | Description |
---|---|
System.Boolean |
IsKeyFrame(DataBuffer)
Determines whether the encoded frame starts with a keyframe (IDR, PPS, or SPS).
Declaration
public static bool IsKeyFrame(DataBuffer encodedFrame)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
Returns
Type | Description |
---|---|
System.Boolean |
IsNaluType(Int32, DataBuffer, Int32)
Determines whether the encoded frame starts with a given NALU type.
Declaration
public static bool IsNaluType(int naluType, DataBuffer encodedFrame, int offset)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | naluType | The NALU type. |
DataBuffer | encodedFrame | The encoded frame. |
System.Int32 | offset | The offset into the encoded frame. |
Returns
Type | Description |
---|---|
System.Boolean |
IsPps(DataBuffer)
Determines whether the encoded frame starts with a PPS NALU.
Declaration
public static bool IsPps(DataBuffer encodedFrame)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
Returns
Type | Description |
---|---|
System.Boolean |
IsPps(DataBuffer, Int32)
Determines whether the encoded frame starts with a PPS NALU.
Declaration
public static bool IsPps(DataBuffer encodedFrame, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
System.Int32 | offset | The offset into the encoded frame. |
Returns
Type | Description |
---|---|
System.Boolean |
IsSps(DataBuffer)
Determines whether the encoded frame starts with an SPS NALU.
Declaration
public static bool IsSps(DataBuffer encodedFrame)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
Returns
Type | Description |
---|---|
System.Boolean |
IsSps(DataBuffer, Int32)
Determines whether the encoded frame starts with an SPS NALU.
Declaration
public static bool IsSps(DataBuffer encodedFrame, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
System.Int32 | offset | The offset into the encoded frame. |
Returns
Type | Description |
---|---|
System.Boolean |
TrimAud(DataBuffer)
Trims an AUD NALU from the start of the encoded frame, if one exists.
Declaration
public static DataBuffer TrimAud(DataBuffer encodedFrame)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | encodedFrame | The encoded frame. |
Returns
Type | Description |
---|---|
DataBuffer |