Go to the documentation of this file.
36 #define MAX_AAC_HBR_FRAME_SIZE 8191
82 #define ATTR_NAME_TYPE_INT 0
83 #define ATTR_NAME_TYPE_STR 1
96 {INT32_MIN, INT32_MAX} },
103 {
NULL, -1, -1, {0} },
125 int au_headers_length, au_header_size,
i;
133 au_headers_length =
AV_RB16(buf);
138 data->au_headers_length_bytes = (au_headers_length + 7) / 8;
144 if (len < data->au_headers_length_bytes)
150 au_header_size =
data->sizelength +
data->indexlength;
151 if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
154 data->nb_au_headers = au_headers_length / au_header_size;
155 if (!
data->au_headers ||
data->au_headers_allocated <
data->nb_au_headers) {
158 if (!
data->au_headers)
160 data->au_headers_allocated =
data->nb_au_headers;
163 for (
i = 0;
i <
data->nb_au_headers; ++
i) {
182 if (
data->cur_au_index >
data->nb_au_headers) {
186 if (
data->buf_size -
data->buf_pos <
data->au_headers[
data->cur_au_index].size) {
195 data->buf_pos +=
data->au_headers[
data->cur_au_index].size;
197 data->cur_au_index++;
199 if (
data->cur_au_index ==
data->nb_au_headers) {
212 buf +=
data->au_headers_length_bytes + 2;
213 len -=
data->au_headers_length_bytes + 2;
214 if (
data->nb_au_headers == 1 && len < data->au_headers[0].size) {
217 if (!
data->buf_pos) {
223 data->buf_size =
data->au_headers[0].size;
224 data->timestamp = *timestamp;
227 if (
data->timestamp != *timestamp ||
228 data->au_headers[0].size !=
data->buf_size ||
242 if (
data->buf_pos !=
data->buf_size) {
261 if (len < data->au_headers[0].
size) {
270 len -=
data->au_headers[0].size;
271 buf +=
data->au_headers[0].size;
274 if (
len > 0 &&
data->nb_au_headers > 1) {
276 memcpy(
data->buf, buf,
data->buf_size);
277 data->cur_au_index = 1;
287 const char *attr,
const char *
value)
292 if (!strcmp(attr,
"config")) {
304 char *end_ptr =
NULL;
305 long long int val = strtoll(
value, &end_ptr, 10);
306 if (end_ptr ==
value || end_ptr[0] !=
'\0') {
308 "The %s field value is not a valid number: %s\n",
315 "fmtp field %s should be in range [%d,%d] (provided value: %lld)",
320 *(
int *)((
char *)
data+
326 *(
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
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