Go to the documentation of this file.
37 #define MAX_AAC_HBR_FRAME_SIZE 8191
83 #define ATTR_NAME_TYPE_INT 0
84 #define ATTR_NAME_TYPE_STR 1
97 {INT32_MIN, INT32_MAX} },
104 {
NULL, -1, -1, {0} },
126 int au_headers_length, au_header_size,
i;
135 au_headers_length =
AV_RB16(buf);
140 data->au_headers_length_bytes = (au_headers_length + 7) / 8;
146 if (len < data->au_headers_length_bytes)
154 au_header_size =
data->sizelength +
data->indexlength;
155 if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
158 data->nb_au_headers = au_headers_length / au_header_size;
159 if (!
data->au_headers ||
data->au_headers_allocated <
data->nb_au_headers) {
162 if (!
data->au_headers)
164 data->au_headers_allocated =
data->nb_au_headers;
167 for (
i = 0;
i <
data->nb_au_headers; ++
i) {
179 const uint8_t *buf,
int len, uint16_t seq,
186 if (
data->cur_au_index >
data->nb_au_headers) {
190 if (
data->buf_size -
data->buf_pos <
data->au_headers[
data->cur_au_index].size) {
199 data->buf_pos +=
data->au_headers[
data->cur_au_index].size;
201 data->cur_au_index++;
203 if (
data->cur_au_index ==
data->nb_au_headers) {
216 buf +=
data->au_headers_length_bytes + 2;
217 len -=
data->au_headers_length_bytes + 2;
218 if (
data->nb_au_headers == 1 && len < data->au_headers[0].size) {
221 if (!
data->buf_pos) {
227 data->buf_size =
data->au_headers[0].size;
228 data->timestamp = *timestamp;
231 if (
data->timestamp != *timestamp ||
232 data->au_headers[0].size !=
data->buf_size ||
246 if (
data->buf_pos !=
data->buf_size) {
265 if (len < data->au_headers[0].
size) {
274 len -=
data->au_headers[0].size;
275 buf +=
data->au_headers[0].size;
278 if (
len > 0 &&
data->nb_au_headers > 1) {
280 memcpy(
data->buf, buf,
data->buf_size);
281 data->cur_au_index = 1;
291 const char *attr,
const char *
value)
296 if (!strcmp(attr,
"config")) {
308 char *end_ptr =
NULL;
309 long long int val = strtoll(
value, &end_ptr, 10);
310 if (end_ptr ==
value || end_ptr[0] !=
'\0') {
312 "The %s field value is not a valid number: %s\n",
319 "fmtp field %s should be in range [%d,%d] (provided value: %lld)",
324 *(
int *)((
char *)
data+
330 *(
char **)((
char *)
data+
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
current frame timestamp
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.
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.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
RTP/JPEG 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