73 while (data->
pos < data->
len) {
79 if (data->
pos + cur_len > data->
len) {
86 memcpy(pkt->
data, data->
buf + data->
pos, cur_len);
89 return data->
pos < data->
len;
97 int audio_mux_version, same_time_framing, num_programs, num_layers;
105 audio_mux_version =
get_bits(&gb, 1);
106 same_time_framing =
get_bits(&gb, 1);
110 if (audio_mux_version != 0 || same_time_framing != 1 || num_programs != 0 ||
113 audio_mux_version, same_time_framing,
114 num_programs, num_layers);
133 const char *attr,
const char *
value)
137 if (!strcmp(attr,
"config")) {
141 }
else if (!strcmp(attr,
"cpresent")) {
142 int cpresent = atoi(value);
145 "RTP MP4A-LATM with in-band configuration");
static int latm_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
const char const char void * val
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
ptrdiff_t const GLvoid * data
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static FFServerConfig config
RTP/JPEG specific private data.
static int parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value)
int index
stream index in AVFormatContext
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static av_cold int end(AVCodecContext *avctx)
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.
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler
int extradata_size
Size of the extradata content in bytes.
static void latm_close_context(PayloadContext *data)
static int parse_fmtp_config(AVStream *st, const char *value)
GLsizei GLboolean const GLfloat * value
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
static void skip_bits(GetBitContext *s, int n)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
uint8_t * buf
the temporary storage buffer
int ff_parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *p, int(*parse_fmtp)(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value))
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
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)
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
AVCodecParameters * codecpar
This structure stores compressed data.