44 const uint8_t *buf,
int len, uint16_t seq,
50 if (!
data->dyn_buf ||
data->timestamp != *timestamp) {
54 data->timestamp = *timestamp;
76 if (
val >
data->len - cur_len) {
84 if (cur_len >
data->len -
data->pos) {
102 int audio_mux_version, same_time_framing, num_programs, num_layers;
112 audio_mux_version =
get_bits(&gb, 1);
113 same_time_framing =
get_bits(&gb, 1);
117 if (audio_mux_version != 0 || same_time_framing != 1 || num_programs != 0 ||
120 audio_mux_version, same_time_framing,
121 num_programs, num_layers);
139 const char *attr,
const char *
value)
143 if (!strcmp(attr,
"config")) {
147 }
else if (!strcmp(attr,
"cpresent")) {
148 int cpresent = atoi(
value);
151 "RTP MP4A-LATM with in-band configuration");
172 .enc_name =
"MP4A-LATM",
static double val(void *priv, double ch)
static av_cold void close(AVCodecParserContext *s)
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)
Parse a packet, add all split parts to parse_queue.
bitstream reader API header.
static int get_bits_left(GetBitContext *gb)
static void skip_bits(GetBitContext *s, int n)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
Memory handling functions.
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))
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
static void latm_close_context(PayloadContext *data)
static int parse_fmtp_config(AVStream *st, const char *value)
static int parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value)
static int latm_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
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 extradata_size
Size of the extradata content in bytes.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
This structure stores compressed data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int index
stream index in AVFormatContext
RTP/AV1 specific private data.
uint32_t timestamp
last received timestamp for frame
uint8_t * buf
the temporary storage buffer
#define avpriv_request_sample(...)
static AVFormatContext * ctx