32 #include "libavutil/attributes.h"
33 #include "libavutil/avstring.h"
73 #define ATTR_NAME_TYPE_INT 0
74 #define ATTR_NAME_TYPE_STR 1
116 int au_headers_length, au_header_size, i;
124 au_headers_length =
AV_RB16(buf);
135 if (len < data->au_headers_length_bytes)
142 if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
191 if (len < data->au_headers[0].
size)
212 char *attr,
char *
value)
217 if (!strcmp(attr,
"config")) {
226 for (i = 0; attr_names[i].
str; ++i) {
229 *(
int *)((
char *)data+
230 attr_names[i].
offset) = atoi(value);
232 *(
char **)((
char *)data+
static int parse_fmtp_config(AVCodecContext *codec, char *value)
#define RTP_MAX_PACKET_LENGTH
char * av_strdup(const char *s) av_malloc_attrib
Duplicate the string s.
RTP/JPEG specific private data.
AVCodecContext * codec
Codec context associated with this stream.
int index
stream index in AVFormatContext
uint8_t * buf
the temporary storage buffer
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static void free_context(PayloadContext *data)
enum AVStreamParseType need_parsing
bitstream reader API header.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
static av_cold int init_video(AVFormatContext *s, int st_index, PayloadContext *data)
int av_strcasecmp(const char *a, const char *b)
Locale-independent case-insensitive compare.
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static int aac_parse_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
#define ATTR_NAME_TYPE_INT
main external API structure.
struct PayloadContext::AUHeaders * au_headers
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
#define ATTR_NAME_TYPE_STR
static int rtp_parse_mp4_au(PayloadContext *data, const uint8_t *buf, int len)
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
static int parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
static const AttrNameMap attr_names[]
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
#define AVERROR_INVALIDDATA
static int parse_fmtp(AVStream *stream, PayloadContext *data, char *attr, char *value)
int ff_parse_fmtp(AVStream *stream, PayloadContext *data, const char *p, int(*parse_fmtp)(AVStream *stream, PayloadContext *data, char *attr, char *value))
int au_headers_length_bytes
This structure stores compressed data.
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static PayloadContext * new_context(void)