fm.liveswitch.h264.Packet Class Reference

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

Public Member Functions

fm.liveswitch.DataBuffer getBuffer ()
 Gets the Packet as a DataBuffer. More...
 
boolean getFragmentEnd ()
 Gets if this is the end of a Fragmented Unit. More...
 
boolean getFragmentStart ()
 Gets if this is the start of a Fragmented Unit. More...
 
boolean getLast ()
 Gets whether this is the last nalu in the sequence (i.e. More...
 
fm.liveswitch.h264.Nalu[] getNalus ()
 Gets the NAL Units. More...
 
int getNaluType ()
 Gets the type of Payload that is in this packet. More...
 
long getSequenceNumber ()
 Gets the RTP sequence number. More...
 
 Packet ()
 Default constuctor. More...
 
 Packet (fm.liveswitch.h264.Nalu nalu)
 Single NAL Unit Mode constructor. More...
 
void setLast (boolean value)
 Sets whether this is the last nalu in the sequence (i.e. More...
 
void setNalus (fm.liveswitch.h264.Nalu[] value)
 Sets the NAL Units. More...
 
void setSequenceNumber (long value)
 Sets the RTP sequence number. More...
 

Static Public Member Functions

static fm.liveswitch.DataBuffer depacketize (fm.liveswitch.h264.Packet[] packets)
 Depacketizes multiple H264Packets into a single encoded frame. More...
 
static fm.liveswitch.DataBuffer depacketize (fm.liveswitch.h264.Packet[] packets, int packetizationMode)
 Depacketizes multiple H264Packets into a single encoded frame. More...
 
static int getFuEBitMask ()
 Gets the end bit. More...
 
static int getFuRBitMask ()
 Gets the reserved bit. More...
 
static int getFuSBitMask ()
 Gets the start bit. More...
 
static int getMaxPacketSize ()
 Gets the maximum packet size (affects packetization). More...
 
static fm.liveswitch.h264.Packet[] packetize (fm.liveswitch.DataBuffer encodedData)
 Packetizes a single encoded data frame into multiple H264 packets. More...
 
static fm.liveswitch.h264.Packet[] packetize (fm.liveswitch.DataBuffer encodedData, int packetizationMode)
 Packetizes a single encoded data frame into multiple H264 packets. More...
 
static fm.liveswitch.h264.Packet wrap (fm.liveswitch.DataBuffer buffer)
 Parses the specified packet bytes. More...
 

Detailed Description

An H.264 packet for RTP.

Constructor & Destructor Documentation

◆ Packet() [1/2]

fm.liveswitch.h264.Packet.Packet ( )

Default constuctor.

◆ Packet() [2/2]

fm.liveswitch.h264.Packet.Packet ( fm.liveswitch.h264.Nalu  nalu)

Single NAL Unit Mode constructor.

Parameters
naluThe nalu.

Member Function Documentation

◆ depacketize() [1/2]

static fm.liveswitch.DataBuffer fm.liveswitch.h264.Packet.depacketize ( fm.liveswitch.h264.Packet[]  packets)
static

Depacketizes multiple H264Packets into a single encoded frame.

Uses packetization mode 0.

Parameters
packetsThe packets.

◆ depacketize() [2/2]

static fm.liveswitch.DataBuffer fm.liveswitch.h264.Packet.depacketize ( fm.liveswitch.h264.Packet[]  packets,
int  packetizationMode 
)
static

Depacketizes multiple H264Packets into a single encoded frame.

Parameters
packetsThe packets.
packetizationModeThe packetizationMode.

◆ getBuffer()

fm.liveswitch.DataBuffer fm.liveswitch.h264.Packet.getBuffer ( )

Gets the Packet as a DataBuffer.

◆ getFragmentEnd()

boolean fm.liveswitch.h264.Packet.getFragmentEnd ( )

Gets if this is the end of a Fragmented Unit.

◆ getFragmentStart()

boolean fm.liveswitch.h264.Packet.getFragmentStart ( )

Gets if this is the start of a Fragmented Unit.

◆ getFuEBitMask()

static int fm.liveswitch.h264.Packet.getFuEBitMask ( )
static

Gets the end bit.

◆ getFuRBitMask()

static int fm.liveswitch.h264.Packet.getFuRBitMask ( )
static

Gets the reserved bit.

◆ getFuSBitMask()

static int fm.liveswitch.h264.Packet.getFuSBitMask ( )
static

Gets the start bit.

◆ getLast()

boolean fm.liveswitch.h264.Packet.getLast ( )

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

RTP Marker).

◆ getMaxPacketSize()

static int fm.liveswitch.h264.Packet.getMaxPacketSize ( )
static

Gets the maximum packet size (affects packetization).

◆ getNalus()

fm.liveswitch.h264.Nalu [] fm.liveswitch.h264.Packet.getNalus ( )

Gets the NAL Units.

◆ getNaluType()

int fm.liveswitch.h264.Packet.getNaluType ( )

Gets the type of Payload that is in this packet.

◆ getSequenceNumber()

long fm.liveswitch.h264.Packet.getSequenceNumber ( )

Gets the RTP sequence number.

◆ packetize() [1/2]

static fm.liveswitch.h264.Packet [] fm.liveswitch.h264.Packet.packetize ( fm.liveswitch.DataBuffer  encodedData)
static

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.

◆ packetize() [2/2]

static fm.liveswitch.h264.Packet [] fm.liveswitch.h264.Packet.packetize ( fm.liveswitch.DataBuffer  encodedData,
int  packetizationMode 
)
static

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.

◆ setLast()

void fm.liveswitch.h264.Packet.setLast ( boolean  value)

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

RTP Marker).

◆ setNalus()

void fm.liveswitch.h264.Packet.setNalus ( fm.liveswitch.h264.Nalu[]  value)

Sets the NAL Units.

◆ setSequenceNumber()

void fm.liveswitch.h264.Packet.setSequenceNumber ( long  value)

Sets the RTP sequence number.

◆ wrap()

static fm.liveswitch.h264.Packet fm.liveswitch.h264.Packet.wrap ( fm.liveswitch.DataBuffer  buffer)
static

Parses the specified packet bytes.

Parameters
bufferThe packet bytes.