FMLiveSwitchH264Packet Class Reference

An H.264 packet for RTP. More...

Instance Methods

(FMLiveSwitchDataBuffer *) - buffer
 Gets the Packet as a DataBuffer. More...
 
(bool) - fragmentEnd
 Gets if this is the end of a Fragmented Unit. More...
 
(bool) - fragmentStart
 Gets if this is the start of a Fragmented Unit. More...
 
(instancetype) - init
 Default constuctor. More...
 
(instancetype) - initWithNalu:
 Single NAL Unit Mode constructor. More...
 
(bool) - last
 Gets whether this is the last nalu in the sequence (i.e. More...
 
(NSMutableArray *) - nalus
 Gets the NAL Units. More...
 
(int) - naluType
 Gets the type of Payload that is in this packet. More...
 
(long long) - sequenceNumber
 Gets the RTP sequence number. More...
 
(void) - setLast:
 Sets whether this is the last nalu in the sequence (i.e. More...
 
(void) - setNalus:
 Sets the NAL Units. More...
 
(void) - setSequenceNumber:
 Sets the RTP sequence number. More...
 

Class Methods

(FMLiveSwitchDataBuffer *) + depacketizeWithPackets:
 Depacketizes multiple H264Packets into a single encoded frame. More...
 
(FMLiveSwitchDataBuffer *) + depacketizeWithPackets:packetizationMode:
 Depacketizes multiple H264Packets into a single encoded frame. More...
 
(int) + fuEBitMask
 Gets the end bit. More...
 
(int) + fuRBitMask
 Gets the reserved bit. More...
 
(int) + fuSBitMask
 Gets the start bit. More...
 
(int) + maxPacketSize
 Gets the maximum packet size (affects packetization). More...
 
(FMLiveSwitchH264Packet *) + packet
 Default constuctor. More...
 
(NSMutableArray *) + packetizeWithEncodedData:
 Packetizes a single encoded data frame into multiple H264 packets. More...
 
(NSMutableArray *) + packetizeWithEncodedData:packetizationMode:
 Packetizes a single encoded data frame into multiple H264 packets. More...
 
(FMLiveSwitchH264Packet *) + packetWithNalu:
 Single NAL Unit Mode constructor. More...
 
(FMLiveSwitchH264Packet *) + wrapWithBuffer:
 Parses the specified packet bytes. More...
 

Detailed Description

An H.264 packet for RTP.

Method Documentation

◆ buffer

Gets the Packet as a DataBuffer.

◆ depacketizeWithPackets:

+ (FMLiveSwitchDataBuffer*) depacketizeWithPackets: (NSMutableArray *)  packets

Depacketizes multiple H264Packets into a single encoded frame.

Uses packetization mode 0.

Parameters
packetsThe packets.

◆ depacketizeWithPackets:packetizationMode:

+ (FMLiveSwitchDataBuffer*) depacketizeWithPackets: (NSMutableArray *)  packets
packetizationMode: (int)  packetizationMode 

Depacketizes multiple H264Packets into a single encoded frame.

Parameters
packetsThe packets.
packetizationModeThe packetizationMode.

◆ fragmentEnd

- (bool) fragmentEnd

Gets if this is the end of a Fragmented Unit.

◆ fragmentStart

- (bool) fragmentStart

Gets if this is the start of a Fragmented Unit.

◆ fuEBitMask

+ (int) fuEBitMask

Gets the end bit.

◆ fuRBitMask

+ (int) fuRBitMask

Gets the reserved bit.

◆ fuSBitMask

+ (int) fuSBitMask

Gets the start bit.

◆ init

- (instancetype) init

Default constuctor.

◆ initWithNalu:

- (instancetype) initWithNalu: (FMLiveSwitchH264Nalu *)  nalu

Single NAL Unit Mode constructor.

Parameters
naluThe nalu.

◆ last

- (bool) last

Gets whether this is the last nalu in the sequence (i.e.

RTP Marker).

◆ maxPacketSize

+ (int) maxPacketSize

Gets the maximum packet size (affects packetization).

◆ nalus

- (NSMutableArray*) nalus

Gets the NAL Units.

◆ naluType

- (int) naluType

Gets the type of Payload that is in this packet.

◆ packet

Default constuctor.

◆ packetizeWithEncodedData:

+ (NSMutableArray*) packetizeWithEncodedData: (FMLiveSwitchDataBuffer *)  encodedData

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.

Parameters
encodedDataThe encoded data.

◆ packetizeWithEncodedData:packetizationMode:

+ (NSMutableArray*) packetizeWithEncodedData: (FMLiveSwitchDataBuffer *)  encodedData
packetizationMode: (int)  packetizationMode 

Packetizes a single encoded data frame into multiple H264 packets.

Note: Only STAP-A and Single NALU are supported right now.

Parameters
encodedDataThe encoded data.
packetizationModeThe packetizationMode.

◆ packetWithNalu:

+ (FMLiveSwitchH264Packet*) packetWithNalu: (FMLiveSwitchH264Nalu *)  nalu

Single NAL Unit Mode constructor.

Parameters
naluThe nalu.

◆ sequenceNumber

- (long long) sequenceNumber

Gets the RTP sequence number.

◆ setLast:

- (void) setLast: (bool)  value

Sets whether this is the last nalu in the sequence (i.e.

RTP Marker).

◆ setNalus:

- (void) setNalus: (NSMutableArray *)  value

Sets the NAL Units.

◆ setSequenceNumber:

- (void) setSequenceNumber: (long long)  value

Sets the RTP sequence number.

◆ wrapWithBuffer:

+ (FMLiveSwitchH264Packet*) wrapWithBuffer: (FMLiveSwitchDataBuffer *)  buffer

Parses the specified packet bytes.

Parameters
bufferThe packet bytes.