87 while (data->
pos < data->
len) {
93 if (data->
pos + cur_len > data->
len) {
100 memcpy(pkt->
data, data->
buf + data->
pos, cur_len);
101 data->
pos += cur_len;
103 return data->
pos < data->
len;
111 int audio_mux_version, same_time_framing, num_programs, num_layers;
119 audio_mux_version =
get_bits(&gb, 1);
120 same_time_framing =
get_bits(&gb, 1);
124 if (audio_mux_version != 0 || same_time_framing != 1 || num_programs != 0 ||
127 audio_mux_version, same_time_framing,
128 num_programs, num_layers);
149 char *attr,
char *value)
153 if (!strcmp(attr,
"config")) {
157 }
else if (!strcmp(attr,
"cpresent")) {
158 int cpresent = atoi(value);
161 "RTP MP4A-LATM with in-band configuration");
static int latm_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_WARNING
Something somehow does not look correct.
RTP/JPEG specific private data.
int index
stream index in AVFormatContext
uint8_t * buf
the temporary storage buffer
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static int parse_fmtp_config(AVStream *st, char *value)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
AVStream ** streams
A list of all streams in the file.
bitstream reader API header.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
static int get_bits_left(GetBitContext *gb)
uint32_t timestamp
current frame timestamp
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler
void av_log(void *avcl, int level, const char *fmt,...)
AVCodecContext * codec
Codec context associated with this stream.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
#define AVERROR_PATCHWELCOME
Not yet implemented in Libav, patches welcome.
static int parse_fmtp(AVStream *stream, PayloadContext *data, char *attr, char *value)
static PayloadContext * latm_new_context(void)
static void skip_bits(GetBitContext *s, int n)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
static int latm_parse_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
int ff_parse_fmtp(AVStream *stream, PayloadContext *data, const char *p, int(*parse_fmtp)(AVStream *stream, PayloadContext *data, char *attr, char *value))
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static void latm_free_context(PayloadContext *data)