FFmpeg
|
RTP support for the QDM2 payload (todo: wiki) More...
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/avcodec.h"
#include "internal.h"
#include "rtp.h"
#include "rtpdec.h"
#include "rtpdec_formats.h"
Go to the source code of this file.
Data Structures | |
struct | PayloadContext |
RTP/JPEG specific private data. More... | |
Functions | |
static int | qdm2_parse_config (PayloadContext *qdm, AVStream *st, const uint8_t *buf, const uint8_t *end) |
Parse configuration (basically the codec-specific extradata) from an RTP config subpacket (starts with 0xff). More... | |
static int | qdm2_parse_subpacket (PayloadContext *qdm, AVStream *st, const uint8_t *buf, const uint8_t *end) |
Parse a single subpacket. More... | |
static int | qdm2_restore_block (PayloadContext *qdm, AVStream *st, AVPacket *pkt) |
Add a superblock header around a set of subpackets. More... | |
static int | qdm2_parse_packet (AVFormatContext *s, PayloadContext *qdm, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags) |
return 0 on packet, no more left, 1 on packet, -1 on partial packet... More... | |
Variables | |
const RTPDynamicProtocolHandler | ff_qdm2_dynamic_handler |
RTP support for the QDM2 payload (todo: wiki)
Definition in file rtpdec_qdm2.c.
|
static |
Parse configuration (basically the codec-specific extradata) from an RTP config subpacket (starts with 0xff).
Layout of the config subpacket (in bytes): 1: 0xFF <- config ID then an array { 1: size <- of the current item 1: item type <- 0 .. 4 size-2: data <- data depends on the item type }
Item 0 implies the end of the config subpacket, and has no data. Item 1 implies a stream configuration without extradata. Item 2 max. nr. of subpackets per superblock Item 3 superblock type for the stream Item 4 implies a stream configuration with extradata (size >= 0x1c).
< subpackets per block
Definition at line 77 of file rtpdec_qdm2.c.
Referenced by qdm2_parse_packet().
|
static |
Parse a single subpacket.
We store this subpacket in an intermediate buffer (position depends on the ID (byte[0]). When called, at least 4 bytes are available for reading (see qdm2_parse_packet()).
Layout of a single subpacket (RTP packets commonly contain multiple such subpackets) - length in bytes: 1: ordering ID <- 0 .. 0x7F 1: subpacket type <- 0 .. 0x7F; value & 0x80 means subpacket length = 2 bytes, else 1 byte 1/2: subpacket length <- length of the data following the flags/length fields if (subpacket type & 0x7F) == 0x7F 1: subpacket type, higher bits size: subpacket data
The subpackets come in randomly, and should be encapsulated into 1 or more superblocks (containing qdm->subpkts_per_block subpackets each) per RTP packet, in order of ascending "ordering ID", see qdm2_restore_block().
Definition at line 152 of file rtpdec_qdm2.c.
Referenced by qdm2_parse_packet().
|
static |
Add a superblock header around a set of subpackets.
Definition at line 186 of file rtpdec_qdm2.c.
Referenced by qdm2_parse_packet().
|
static |
return 0 on packet, no more left, 1 on packet, -1 on partial packet...
Definition at line 237 of file rtpdec_qdm2.c.
const RTPDynamicProtocolHandler ff_qdm2_dynamic_handler |
Definition at line 301 of file rtpdec_qdm2.c.