32 #define ADTS_HEADER_SIZE 7
47 #define ADTS_MAX_FRAME_BYTES ((1 << 13) - 1)
178 if (side_data_size) {
185 memcpy(par->
extradata, side_data, side_data_size);
214 #define ENC AV_OPT_FLAG_ENCODING_PARAM
215 #define OFFSET(obj) offsetof(ADTSContext, obj)
233 .mime_type =
"audio/aac",
234 .extensions =
"aac,adts",
static int adts_write_trailer(AVFormatContext *s)
AVOutputFormat ff_adts_muxer
#define ADTS_MAX_FRAME_BYTES
static const AVOption options[]
static const AVClass adts_muxer_class
static int adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, const uint8_t *buf, int size)
static int adts_write_frame_header(ADTSContext *ctx, uint8_t *buf, int size, int pce_size)
static int adts_write_header(AVFormatContext *s)
static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
static int adts_init(AVFormatContext *s)
int ff_ape_write_tag(AVFormatContext *s)
Write an APE tag into a file.
Libavcodec external API header.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, buffer_size_t *size)
static av_cold int init(AVCodecContext *avctx)
#define flags(name, subs,...)
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
static void write_header(FFV1Context *f)
bitstream reader API header.
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
@ AV_PKT_DATA_NEW_EXTRADATA
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const char * av_default_item_name(void *ptr)
Return the context name.
#define LIBAVUTIL_VERSION_INT
#define ID3v2_DEFAULT_MAGIC
Default magic bytes for ID3v2 header: "ID3".
int ff_id3v2_write_simple(struct AVFormatContext *s, int id3v2_version, const char *magic)
Write an ID3v2 tag containing all global metadata from s.
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int avpriv_mpeg4audio_get_config2(MPEG4AudioConfig *c, const uint8_t *buf, int size, int sync_extension, void *logctx)
Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration.
static int ff_copy_pce_data(PutBitContext *pb, GetBitContext *gb)
#define MAX_PCE_SIZE
Maximum size of a PCE including the 3-bit ID_PCE.
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
uint8_t pce_data[MAX_PCE_SIZE]
Describe the class of an AVClass context structure.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
This struct describes the properties of an encoded stream.
int extradata_size
Size of the extradata content in bytes.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
static int write_trailer(AVFormatContext *s1)