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);
132 const char *attr,
const char *
value)
136 if (!strcmp(attr,
"config")) {
140 }
else if (!strcmp(attr,
"cpresent")) {
141 int cpresent = atoi(value);
144 "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.
ptrdiff_t const GLvoid * data
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
RTP/JPEG specific private data.
#define avpriv_request_sample(...)
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.
GLsizei GLboolean const GLfloat * value
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
const RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
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)
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.
#define flags(name, subs,...)
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
Codec parameters associated with this stream.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Frame references ownership and permissions
static double val(void *priv, double ch)
This structure stores compressed data.