Go to the documentation of this file.
37 #define MAX_AAC_HBR_FRAME_SIZE 8191
84 #define ATTR_NAME_TYPE_INT 0
85 #define ATTR_NAME_TYPE_STR 1
101 {INT32_MIN, INT32_MAX} },
108 {
NULL, -1, -1, {0} },
130 int au_headers_length, au_header_size,
i;
139 au_headers_length =
AV_RB16(buf);
144 data->au_headers_length_bytes = (au_headers_length + 7) / 8;
150 if (len < data->au_headers_length_bytes)
158 au_header_size =
data->sizelength +
data->indexlength;
159 if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
162 data->nb_au_headers = au_headers_length / au_header_size;
163 if (!
data->au_headers ||
data->au_headers_allocated <
data->nb_au_headers) {
166 if (!
data->au_headers)
168 data->au_headers_allocated =
data->nb_au_headers;
171 for (
i = 0;
i <
data->nb_au_headers; ++
i) {
183 const uint8_t *buf,
int len, uint16_t seq,
190 if (
data->cur_au_index >
data->nb_au_headers) {
194 if (
data->buf_size -
data->buf_pos <
data->au_headers[
data->cur_au_index].size) {
203 data->buf_pos +=
data->au_headers[
data->cur_au_index].size;
205 data->cur_au_index++;
207 if (
data->cur_au_index ==
data->nb_au_headers) {
220 buf +=
data->au_headers_length_bytes + 2;
221 len -=
data->au_headers_length_bytes + 2;
222 if (
data->nb_au_headers == 1 && len < data->au_headers[0].size) {
225 if (!
data->buf_pos) {
231 data->buf_size =
data->au_headers[0].size;
232 data->timestamp = *timestamp;
235 if (
data->timestamp != *timestamp ||
236 data->au_headers[0].size !=
data->buf_size ||
250 if (
data->buf_pos !=
data->buf_size) {
269 if (len < data->au_headers[0].
size) {
278 len -=
data->au_headers[0].size;
279 buf +=
data->au_headers[0].size;
282 if (
len > 0 &&
data->nb_au_headers > 1) {
284 memcpy(
data->buf, buf,
data->buf_size);
285 data->cur_au_index = 1;
295 const char *attr,
const char *
value)
300 if (!strcmp(attr,
"config")) {
312 char *end_ptr =
NULL;
313 long long int val = strtoll(
value, &end_ptr, 10);
314 if (end_ptr ==
value || end_ptr[0] !=
'\0') {
316 "The %s field value is not a valid number: %s\n",
323 "fmtp field %s should be in range [%d,%d] (provided value: %lld)",
328 *(
int *)((
char *)
data+
334 *(
char **)((
char *)
data+
339 if (!strcmp(attr,
"bitrate")) {
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
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
const RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler
This struct describes the properties of an encoded stream.
struct PayloadContext::AUHeaders * au_headers
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))
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
int av_strcasecmp(const char *a, const char *b)
Locale-independent case-insensitive compare.
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
static void close_context(PayloadContext *data)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
uint32_t timestamp
last received timestamp for frame
static int parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value)
static double val(void *priv, double ch)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
struct AttrNameMap::Range range
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
int au_headers_length_bytes
AVCodecParameters * codecpar
Codec parameters associated with this stream.
av_cold void CBS_FUNC() close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
static int parse_fmtp_config(AVCodecParameters *par, const char *value)
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
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
#define MAX_AAC_HBR_FRAME_SIZE
Range for integer values.
#define i(width, name, range_min, range_max)
#define ATTR_NAME_TYPE_STR
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
static int parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
static const AttrNameMap attr_names[]
static int rtp_parse_mp4_au(PayloadContext *data, const uint8_t *buf, int len)
#define RTP_MAX_PACKET_LENGTH
const RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler
uint8_t * buf
the temporary storage buffer
int index
stream index in AVFormatContext
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)
Parse a packet, add all split parts to parse_queue.
char * av_strdup(const char *s)
Duplicate a string.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
RTP/AV1 specific private data.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16