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;
 
  134     au_headers_length = 
AV_RB16(buf);
 
  139     data->au_headers_length_bytes = (au_headers_length + 7) / 8;
 
  145     if (len < data->au_headers_length_bytes)
 
  153     au_header_size = 
data->sizelength + 
data->indexlength;
 
  154     if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
 
  157     data->nb_au_headers = au_headers_length / au_header_size;
 
  158     if (!
data->au_headers || 
data->au_headers_allocated < 
data->nb_au_headers) {
 
  161         if (!
data->au_headers)
 
  163         data->au_headers_allocated = 
data->nb_au_headers;
 
  166     for (
i = 0; 
i < 
data->nb_au_headers; ++
i) {
 
  178                             const uint8_t *buf, 
int len, uint16_t seq,
 
  185         if (
data->cur_au_index > 
data->nb_au_headers) {
 
  189         if (
data->buf_size - 
data->buf_pos < 
data->au_headers[
data->cur_au_index].size) {
 
  198         data->buf_pos += 
data->au_headers[
data->cur_au_index].size;
 
  200         data->cur_au_index++;
 
  202         if (
data->cur_au_index == 
data->nb_au_headers) {
 
  215     buf += 
data->au_headers_length_bytes + 2;
 
  216     len -= 
data->au_headers_length_bytes + 2;
 
  217     if (
data->nb_au_headers == 1 && len < data->au_headers[0].size) {
 
  220         if (!
data->buf_pos) {
 
  226             data->buf_size = 
data->au_headers[0].size;
 
  227             data->timestamp = *timestamp;
 
  230         if (
data->timestamp != *timestamp ||
 
  231             data->au_headers[0].size != 
data->buf_size ||
 
  245         if (
data->buf_pos != 
data->buf_size) {
 
  264     if (len < data->au_headers[0].
size) {
 
  273     len -= 
data->au_headers[0].size;
 
  274     buf += 
data->au_headers[0].size;
 
  277     if (
len > 0 && 
data->nb_au_headers > 1) {
 
  279         memcpy(
data->buf, buf, 
data->buf_size);
 
  280         data->cur_au_index = 1;
 
  290                       const char *attr, 
const char *
value)
 
  295     if (!strcmp(attr, 
"config")) {
 
  307                     char *end_ptr = 
NULL;
 
  308                     long long int val = strtoll(
value, &end_ptr, 10);
 
  309                     if (end_ptr == 
value || end_ptr[0] != 
'\0') {
 
  311                                "The %s field value is not a valid number: %s\n",
 
  318                             "fmtp field %s should be in range [%d,%d] (provided value: %lld)",
 
  323                     *(
int *)((
char *)
data+
 
  329                     *(
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