Home --> Documentations --> PJMEDIA Reference
Packetizes H.264 bitstream into RTP payload and vice versa.
More...
|
pj_status_t | pjmedia_h264_packetizer_create (pj_pool_t *pool, const pjmedia_h264_packetizer_cfg *cfg, pjmedia_h264_packetizer **p_pktz) |
|
pj_status_t | pjmedia_h264_packetize (pjmedia_h264_packetizer *pktz, pj_uint8_t *bits, pj_size_t bits_len, unsigned *bits_pos, const pj_uint8_t **payload, pj_size_t *payload_len) |
|
pj_status_t | pjmedia_h264_unpacketize (pjmedia_h264_packetizer *pktz, const pj_uint8_t *payload, pj_size_t payload_len, pj_uint8_t *bits, pj_size_t bits_len, unsigned *bits_pos) |
|
◆ pjmedia_h264_packetizer
Opaque declaration for H.264 packetizer.
◆ pjmedia_h264_packetizer_mode
Enumeration of H.264 packetization modes.
Enumerator |
---|
PJMEDIA_H264_PACKETIZER_MODE_SINGLE_NAL | Single NAL unit packetization mode will only generate payloads containing a complete single NAL unit packet. As H.264 NAL unit size can be very large, this mode is usually not applicable for network environments with MTU size limitation.
|
PJMEDIA_H264_PACKETIZER_MODE_NON_INTERLEAVED | Non-interleaved packetization mode will generate payloads with the following possible formats:
- single NAL unit packets,
- NAL units aggregation STAP-A packets,
- fragmented NAL unit FU-A packets.
|
PJMEDIA_H264_PACKETIZER_MODE_INTERLEAVED | Interleaved packetization mode will generate payloads with the following possible formats:
- single NAL unit packets,
- NAL units aggregation STAP-A & STAP-B packets,
- fragmented NAL unit FU-A & FU-B packets. This packetization mode is currently unsupported.
|
◆ pjmedia_h264_packetizer_create()
Create H.264 packetizer.
- Parameters
-
pool | The memory pool. |
cfg | Packetizer settings, if NULL, default setting will be used. |
p_pktz | Pointer to receive the packetizer. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_h264_packetize()
Generate an RTP payload from a H.264 picture bitstream. Note that this function will apply in-place processing, so the bitstream may be modified during the packetization.
- Parameters
-
pktz | The packetizer. |
bits | The picture bitstream to be packetized. |
bits_len | The length of the bitstream. |
bits_pos | The bitstream offset to be packetized. |
payload | The output payload. |
payload_len | The output payload length. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_h264_unpacketize()
Append an RTP payload to an H.264 picture bitstream. Note that in case of noticing packet lost, application should keep calling this function with payload pointer set to NULL, as the packetizer need to update its internal state.
- Parameters
-
pktz | The packetizer. |
payload | The payload to be unpacketized. |
payload_len | The payload length. |
bits | The bitstream buffer. |
bits_len | The bitstream buffer size. |
bits_pos | The bitstream offset to put the unpacketized payload in the bitstream, upon return, this will be updated to the latest offset as a result of the unpacketized payload. |
- Returns
- PJ_SUCCESS on success.
References PJ_END_DECL.
PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.
|