FMLiveSwitchH264Utility Class Reference

Utility methods. More...

Instance Methods

(instancetype) - init
 

Class Methods

(int) + getNaluLengthWithEncodedFrame:offset:
 Gets the NALU length at the specified offset. More...
 
(NSMutableArray *) + getNaluTypesWithEncodedFrame:
 Gets the NALU types. More...
 
(int) + getNaluTypeWithEncodedFrame:
 Gets the NALU type. More...
 
(int) + getNaluTypeWithEncodedFrame:offset:
 Gets the NALU type at the specified offset. More...
 
(FMLiveSwitchNullableInt *) + getPacketizationModeWithFormatParametersAttribute:
 Gets the packetization mode from an H.264 format parameters attribute. More...
 
(FMLiveSwitchNullableInt *) + getPacketizationModeWithRtpMapAttribute:
 Gets the packetization mode from the related format parameters attribute of an H.264 RTP map attribute. More...
 
(FMLiveSwitchH264ProfileLevelId *) + getProfileLevelIdWithFormatParametersAttribute:
 Gets the prolfile level id from an H.264 format parameters attribute. More...
 
(FMLiveSwitchH264ProfileLevelId *) + getProfileLevelIdWithRtpMapAttribute:
 Gets the profile level id from the related format parameters attribute of an H.264 RTP map attribute. More...
 
(int) + getStartCodeLengthWithEncodedFrame:offset:
 Gets the start code length at the specified offset. More...
 
(bool) + isAudWithEncodedFrame:
 Determines whether the encoded frame starts with an AUD NALU. More...
 
(bool) + isAudWithEncodedFrame:offset:
 Determines whether the encoded frame starts with an AUD NALU. More...
 
(bool) + isIdrWithEncodedFrame:
 Determines whether the encoded frame starts with an IDR NALU. More...
 
(bool) + isIdrWithEncodedFrame:offset:
 Determines whether the encoded frame starts with an IDR NALU. More...
 
(bool) + isKeyFrameWithEncodedFrame:
 Determines whether the encoded frame starts with a keyframe (IDR, PPS, or SPS). More...
 
(bool) + isNaluType:encodedFrame:offset:
 Determines whether the encoded frame starts with a given NALU type. More...
 
(bool) + isPpsWithEncodedFrame:
 Determines whether the encoded frame starts with a PPS NALU. More...
 
(bool) + isPpsWithEncodedFrame:offset:
 Determines whether the encoded frame starts with a PPS NALU. More...
 
(bool) + isSpsWithEncodedFrame:
 Determines whether the encoded frame starts with an SPS NALU. More...
 
(bool) + isSpsWithEncodedFrame:offset:
 Determines whether the encoded frame starts with an SPS NALU. More...
 
(NSMutableArray *) + supportedPacketizationModes
 Gets the supported packetization modes. More...
 
(NSMutableArray *) + supportedProfileIdcs
 Gets the supported profile ID codes. More...
 
(FMLiveSwitchDataBuffer *) + trimAudWithEncodedFrame:
 Trims an AUD NALU from the start of the encoded frame, if one exists. More...
 
(FMLiveSwitchH264Utility *) + utility
 

Detailed Description

Utility methods.

Method Documentation

◆ getNaluLengthWithEncodedFrame:offset:

+ (int) getNaluLengthWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame
offset: (int)  offset 

Gets the NALU length at the specified offset.

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

◆ getNaluTypesWithEncodedFrame:

+ (NSMutableArray*) getNaluTypesWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame

Gets the NALU types.

Parameters
encodedFrameThe encoded frame.

◆ getNaluTypeWithEncodedFrame:

+ (int) getNaluTypeWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame

Gets the NALU type.

Parameters
encodedFrameThe encoded frame.

◆ getNaluTypeWithEncodedFrame:offset:

+ (int) getNaluTypeWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame
offset: (int)  offset 

Gets the NALU type at the specified offset.

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

◆ getPacketizationModeWithFormatParametersAttribute:

+ (FMLiveSwitchNullableInt*) getPacketizationModeWithFormatParametersAttribute: (FMLiveSwitchSdpFormatParametersAttribute *)  formatParametersAttribute

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

Parameters
formatParametersAttributeThe format parameters attribute.

◆ getPacketizationModeWithRtpMapAttribute:

+ (FMLiveSwitchNullableInt*) getPacketizationModeWithRtpMapAttribute: (FMLiveSwitchSdpRtpMapAttribute *)  rtpMapAttribute

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

Parameters
rtpMapAttributeThe RTP map attribute.

◆ getProfileLevelIdWithFormatParametersAttribute:

+ (FMLiveSwitchH264ProfileLevelId*) getProfileLevelIdWithFormatParametersAttribute: (FMLiveSwitchSdpFormatParametersAttribute *)  formatParametersAttribute

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

Parameters
formatParametersAttributeThe format parameters attribute.

◆ getProfileLevelIdWithRtpMapAttribute:

+ (FMLiveSwitchH264ProfileLevelId*) getProfileLevelIdWithRtpMapAttribute: (FMLiveSwitchSdpRtpMapAttribute *)  rtpMapAttribute

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

Parameters
rtpMapAttributeThe RTP map attribute.

◆ getStartCodeLengthWithEncodedFrame:offset:

+ (int) getStartCodeLengthWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame
offset: (int)  offset 

Gets the start code length at the specified offset.

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

◆ init

- (instancetype) init

◆ isAudWithEncodedFrame:

+ (bool) isAudWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame

Determines whether the encoded frame starts with an AUD NALU.

Parameters
encodedFrameThe encoded frame.

◆ isAudWithEncodedFrame:offset:

+ (bool) isAudWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame
offset: (int)  offset 

Determines whether the encoded frame starts with an AUD NALU.

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

◆ isIdrWithEncodedFrame:

+ (bool) isIdrWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame

Determines whether the encoded frame starts with an IDR NALU.

Parameters
encodedFrameThe encoded frame.

◆ isIdrWithEncodedFrame:offset:

+ (bool) isIdrWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame
offset: (int)  offset 

Determines whether the encoded frame starts with an IDR NALU.

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

◆ isKeyFrameWithEncodedFrame:

+ (bool) isKeyFrameWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame

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

Parameters
encodedFrameThe encoded frame.

◆ isNaluType:encodedFrame:offset:

+ (bool) isNaluType: (int)  naluType
encodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame
offset: (int)  offset 

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

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

◆ isPpsWithEncodedFrame:

+ (bool) isPpsWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame

Determines whether the encoded frame starts with a PPS NALU.

Parameters
encodedFrameThe encoded frame.

◆ isPpsWithEncodedFrame:offset:

+ (bool) isPpsWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame
offset: (int)  offset 

Determines whether the encoded frame starts with a PPS NALU.

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

◆ isSpsWithEncodedFrame:

+ (bool) isSpsWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame

Determines whether the encoded frame starts with an SPS NALU.

Parameters
encodedFrameThe encoded frame.

◆ isSpsWithEncodedFrame:offset:

+ (bool) isSpsWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame
offset: (int)  offset 

Determines whether the encoded frame starts with an SPS NALU.

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

◆ supportedPacketizationModes

+ (NSMutableArray*) supportedPacketizationModes

Gets the supported packetization modes.

◆ supportedProfileIdcs

+ (NSMutableArray*) supportedProfileIdcs

Gets the supported profile ID codes.

◆ trimAudWithEncodedFrame:

+ (FMLiveSwitchDataBuffer*) trimAudWithEncodedFrame: (FMLiveSwitchDataBuffer *)  encodedFrame

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

Parameters
encodedFrameThe encoded frame.

◆ utility