fm.liveswitch.h264.Utility Class Reference

Utility methods. More...

Public Member Functions

 Utility ()
 

Static Public Member Functions

static int getNaluLength (fm.liveswitch.DataBuffer encodedFrame, int offset)
 Gets the NALU length at the specified offset. More...
 
static int getNaluType (fm.liveswitch.DataBuffer encodedFrame)
 Gets the NALU type. More...
 
static int getNaluType (fm.liveswitch.DataBuffer encodedFrame, int offset)
 Gets the NALU type at the specified offset. More...
 
static int[] getNaluTypes (fm.liveswitch.DataBuffer encodedFrame)
 Gets the NALU types. More...
 
static fm.liveswitch.NullableInteger getPacketizationMode (fm.liveswitch.sdp.FormatParametersAttribute formatParametersAttribute)
 Gets the packetization mode from an H.264 format parameters attribute. More...
 
static fm.liveswitch.NullableInteger getPacketizationMode (fm.liveswitch.sdp.rtp.MapAttribute rtpMapAttribute)
 Gets the packetization mode from the related format parameters attribute of an H.264 RTP map attribute. More...
 
static fm.liveswitch.h264.ProfileLevelId getProfileLevelId (fm.liveswitch.sdp.FormatParametersAttribute formatParametersAttribute)
 Gets the prolfile level id from an H.264 format parameters attribute. More...
 
static fm.liveswitch.h264.ProfileLevelId getProfileLevelId (fm.liveswitch.sdp.rtp.MapAttribute rtpMapAttribute)
 Gets the profile level id from the related format parameters attribute of an H.264 RTP map attribute. More...
 
static int getStartCodeLength (fm.liveswitch.DataBuffer encodedFrame, int offset)
 Gets the start code length at the specified offset. More...
 
static int[] getSupportedPacketizationModes ()
 Gets the supported packetization modes. More...
 
static int[] getSupportedProfileIdcs ()
 Gets the supported profile ID codes. More...
 
static boolean isAud (fm.liveswitch.DataBuffer encodedFrame)
 Determines whether the encoded frame starts with an AUD NALU. More...
 
static boolean isAud (fm.liveswitch.DataBuffer encodedFrame, int offset)
 Determines whether the encoded frame starts with an AUD NALU. More...
 
static boolean isIdr (fm.liveswitch.DataBuffer encodedFrame)
 Determines whether the encoded frame starts with an IDR NALU. More...
 
static boolean isIdr (fm.liveswitch.DataBuffer encodedFrame, int offset)
 Determines whether the encoded frame starts with an IDR NALU. More...
 
static boolean isKeyFrame (fm.liveswitch.DataBuffer encodedFrame)
 Determines whether the encoded frame starts with a keyframe (IDR, PPS, or SPS). More...
 
static boolean isNaluType (int naluType, fm.liveswitch.DataBuffer encodedFrame, int offset)
 Determines whether the encoded frame starts with a given NALU type. More...
 
static boolean isPps (fm.liveswitch.DataBuffer encodedFrame)
 Determines whether the encoded frame starts with a PPS NALU. More...
 
static boolean isPps (fm.liveswitch.DataBuffer encodedFrame, int offset)
 Determines whether the encoded frame starts with a PPS NALU. More...
 
static boolean isSps (fm.liveswitch.DataBuffer encodedFrame)
 Determines whether the encoded frame starts with an SPS NALU. More...
 
static boolean isSps (fm.liveswitch.DataBuffer encodedFrame, int offset)
 Determines whether the encoded frame starts with an SPS NALU. More...
 
static fm.liveswitch.DataBuffer trimAud (fm.liveswitch.DataBuffer encodedFrame)
 Trims an AUD NALU from the start of the encoded frame, if one exists. More...
 

Detailed Description

Utility methods.

Constructor & Destructor Documentation

◆ Utility()

fm.liveswitch.h264.Utility.Utility ( )

Member Function Documentation

◆ getNaluLength()

static int fm.liveswitch.h264.Utility.getNaluLength ( fm.liveswitch.DataBuffer  encodedFrame,
int  offset 
)
static

Gets the NALU length at the specified offset.

Parameters
encodedFrameThe encoded frame.
offsetThe offset into the encoded frame.

◆ getNaluType() [1/2]

static int fm.liveswitch.h264.Utility.getNaluType ( fm.liveswitch.DataBuffer  encodedFrame)
static

Gets the NALU type.

Parameters
encodedFrameThe encoded frame.

◆ getNaluType() [2/2]

static int fm.liveswitch.h264.Utility.getNaluType ( fm.liveswitch.DataBuffer  encodedFrame,
int  offset 
)
static

Gets the NALU type at the specified offset.

Parameters
encodedFrameThe encoded frame.
offsetThe offset into the encoded frame.

◆ getNaluTypes()

static int [] fm.liveswitch.h264.Utility.getNaluTypes ( fm.liveswitch.DataBuffer  encodedFrame)
static

Gets the NALU types.

Parameters
encodedFrameThe encoded frame.

◆ getPacketizationMode() [1/2]

static fm.liveswitch.NullableInteger fm.liveswitch.h264.Utility.getPacketizationMode ( fm.liveswitch.sdp.FormatParametersAttribute  formatParametersAttribute)
static

Gets the packetization mode from an H.264 format parameters attribute.

Parameters
formatParametersAttributeThe format parameters attribute.

◆ getPacketizationMode() [2/2]

static fm.liveswitch.NullableInteger fm.liveswitch.h264.Utility.getPacketizationMode ( fm.liveswitch.sdp.rtp.MapAttribute  rtpMapAttribute)
static

Gets the packetization mode from the related format parameters attribute of an H.264 RTP map attribute.

Parameters
rtpMapAttributeThe RTP map attribute.

◆ getProfileLevelId() [1/2]

static fm.liveswitch.h264.ProfileLevelId fm.liveswitch.h264.Utility.getProfileLevelId ( fm.liveswitch.sdp.FormatParametersAttribute  formatParametersAttribute)
static

Gets the prolfile level id from an H.264 format parameters attribute.

Parameters
formatParametersAttributeThe format parameters attribute.

◆ getProfileLevelId() [2/2]

static fm.liveswitch.h264.ProfileLevelId fm.liveswitch.h264.Utility.getProfileLevelId ( fm.liveswitch.sdp.rtp.MapAttribute  rtpMapAttribute)
static

Gets the profile level id from the related format parameters attribute of an H.264 RTP map attribute.

Parameters
rtpMapAttributeThe RTP map attribute.

◆ getStartCodeLength()

static int fm.liveswitch.h264.Utility.getStartCodeLength ( fm.liveswitch.DataBuffer  encodedFrame,
int  offset 
)
static

Gets the start code length at the specified offset.

Parameters
encodedFrameThe encoded frame.
offsetThe offset into the encoded frame.

◆ getSupportedPacketizationModes()

static int [] fm.liveswitch.h264.Utility.getSupportedPacketizationModes ( )
static

Gets the supported packetization modes.

◆ getSupportedProfileIdcs()

static int [] fm.liveswitch.h264.Utility.getSupportedProfileIdcs ( )
static

Gets the supported profile ID codes.

◆ isAud() [1/2]

static boolean fm.liveswitch.h264.Utility.isAud ( fm.liveswitch.DataBuffer  encodedFrame)
static

Determines whether the encoded frame starts with an AUD NALU.

Parameters
encodedFrameThe encoded frame.

◆ isAud() [2/2]

static boolean fm.liveswitch.h264.Utility.isAud ( fm.liveswitch.DataBuffer  encodedFrame,
int  offset 
)
static

Determines whether the encoded frame starts with an AUD NALU.

Parameters
encodedFrameThe encoded frame.
offsetThe offset into the encoded frame.

◆ isIdr() [1/2]

static boolean fm.liveswitch.h264.Utility.isIdr ( fm.liveswitch.DataBuffer  encodedFrame)
static

Determines whether the encoded frame starts with an IDR NALU.

Parameters
encodedFrameThe encoded frame.

◆ isIdr() [2/2]

static boolean fm.liveswitch.h264.Utility.isIdr ( fm.liveswitch.DataBuffer  encodedFrame,
int  offset 
)
static

Determines whether the encoded frame starts with an IDR NALU.

Parameters
encodedFrameThe encoded frame.
offsetThe offset into the encoded frame.

◆ isKeyFrame()

static boolean fm.liveswitch.h264.Utility.isKeyFrame ( fm.liveswitch.DataBuffer  encodedFrame)
static

Determines whether the encoded frame starts with a keyframe (IDR, PPS, or SPS).

Parameters
encodedFrameThe encoded frame.

◆ isNaluType()

static boolean fm.liveswitch.h264.Utility.isNaluType ( int  naluType,
fm.liveswitch.DataBuffer  encodedFrame,
int  offset 
)
static

Determines whether the encoded frame starts with a given NALU type.

Parameters
naluTypeThe NALU type.
encodedFrameThe encoded frame.
offsetThe offset into the encoded frame.

◆ isPps() [1/2]

static boolean fm.liveswitch.h264.Utility.isPps ( fm.liveswitch.DataBuffer  encodedFrame)
static

Determines whether the encoded frame starts with a PPS NALU.

Parameters
encodedFrameThe encoded frame.

◆ isPps() [2/2]

static boolean fm.liveswitch.h264.Utility.isPps ( fm.liveswitch.DataBuffer  encodedFrame,
int  offset 
)
static

Determines whether the encoded frame starts with a PPS NALU.

Parameters
encodedFrameThe encoded frame.
offsetThe offset into the encoded frame.

◆ isSps() [1/2]

static boolean fm.liveswitch.h264.Utility.isSps ( fm.liveswitch.DataBuffer  encodedFrame)
static

Determines whether the encoded frame starts with an SPS NALU.

Parameters
encodedFrameThe encoded frame.

◆ isSps() [2/2]

static boolean fm.liveswitch.h264.Utility.isSps ( fm.liveswitch.DataBuffer  encodedFrame,
int  offset 
)
static

Determines whether the encoded frame starts with an SPS NALU.

Parameters
encodedFrameThe encoded frame.
offsetThe offset into the encoded frame.

◆ trimAud()

static fm.liveswitch.DataBuffer fm.liveswitch.h264.Utility.trimAud ( fm.liveswitch.DataBuffer  encodedFrame)
static

Trims an AUD NALU from the start of the encoded frame, if one exists.

Parameters
encodedFrameThe encoded frame.