29 #define ADTS_HEADER_SIZE 7 40 #define ADTS_MAX_FRAME_BYTES ((1 << 13) - 1) 168 .mime_type =
"audio/aac",
169 .extensions =
"aac,adts",
uint8_t pce_data[MAX_PCE_SIZE]
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, uint8_t *buf, int size)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static void skip_bits_long(GetBitContext *s, int n)
#define ADTS_MAX_FRAME_BYTES
static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
static int adts_write_header(AVFormatContext *s)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
AVStream ** streams
A list of all streams in the file.
bitstream reader API header.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
static void put_bits(PutBitContext *s, int n, unsigned int value)
Write up to 31 bits into a bitstream.
AVCodecContext * codec
Codec context associated with this stream.
Libavcodec external API header.
AVIOContext * pb
I/O context.
main external API structure.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
static int adts_write_frame_header(ADTSContext *ctx, uint8_t *buf, int size, int pce_size)
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
#define MAX_PCE_SIZE
Maximum size of a PCE including the 3-bit ID_PCE.
int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int bit_size, int sync_extension)
Parse MPEG-4 systems extradata to retrieve audio configuration.
void * priv_data
Format private data.
int avpriv_copy_pce_data(PutBitContext *pb, GetBitContext *gb)
static void write_header(FFV1Context *f)
This structure stores compressed data.
AVOutputFormat ff_adts_muxer