Go to the documentation of this file.
36 #define MAX_AAC_HBR_FRAME_SIZE 8191
76 #define ATTR_NAME_TYPE_INT 0
77 #define ATTR_NAME_TYPE_STR 1
113 int au_headers_length, au_header_size,
i;
126 data->au_headers_length_bytes = (au_headers_length + 7) / 8;
132 if (len < data->au_headers_length_bytes)
138 au_header_size =
data->sizelength +
data->indexlength;
139 if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
142 data->nb_au_headers = au_headers_length / au_header_size;
143 if (!
data->au_headers ||
data->au_headers_allocated <
data->nb_au_headers) {
146 if (!
data->au_headers)
148 data->au_headers_allocated =
data->nb_au_headers;
151 for (
i = 0;
i <
data->nb_au_headers; ++
i) {
170 if (
data->cur_au_index >
data->nb_au_headers) {
174 if (
data->buf_size -
data->buf_pos <
data->au_headers[
data->cur_au_index].size) {
183 data->buf_pos +=
data->au_headers[
data->cur_au_index].size;
185 data->cur_au_index++;
187 if (
data->cur_au_index ==
data->nb_au_headers) {
200 buf +=
data->au_headers_length_bytes + 2;
201 len -=
data->au_headers_length_bytes + 2;
202 if (
data->nb_au_headers == 1 && len < data->au_headers[0].size) {
205 if (!
data->buf_pos) {
211 data->buf_size =
data->au_headers[0].size;
212 data->timestamp = *timestamp;
215 if (
data->timestamp != *timestamp ||
216 data->au_headers[0].size !=
data->buf_size ||
230 if (
data->buf_pos !=
data->buf_size) {
249 if (len < data->au_headers[0].
size) {
258 len -=
data->au_headers[0].size;
259 buf +=
data->au_headers[0].size;
262 if (
len > 0 &&
data->nb_au_headers > 1) {
265 data->cur_au_index = 1;
275 const char *attr,
const char *
value)
280 if (!strcmp(attr,
"config")) {
295 "The %s field size is invalid (%d)\n",
299 *(
int *)((
char *)
data+
305 *(
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)
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.
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
const char const char void * val
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
#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