31 #define MAX_EXTRADATA_SIZE 1024
44 {
"smc-interval",
"StreamMuxConfig interval.",
153 uint8_t loas_header[] =
"\x56\xe0\x00";
159 if(pkt->
size > 2 && pkt->
data[0] == 0x56 && (pkt->
data[1] >> 4) == 0xe &&
164 int side_data_size = 0, ret;
168 if (side_data_size) {
174 memcpy(par->
extradata, side_data, side_data_size);
179 if (pkt->
size > 0x1fff)
187 for (i = 0; i <= pkt->
size-255; i+=255)
195 if (pkt->
size && (pkt->
data[0] & 0xe1) == 0x81) {
217 loas_header[1] |= (len >> 8) & 0x1f;
218 loas_header[2] |= len & 0xff;
246 .mime_type =
"audio/MP4A-LATM",
247 .extensions =
"latm,loas",
253 .priv_class = &latm_muxer_class,
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static const AVOption options[]
static int latm_decode_extradata(LATMContext *ctx, uint8_t *buf, int size)
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
#define LIBAVUTIL_VERSION_INT
static void skip_bits_long(GetBitContext *s, int n)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
Copy the content of src to the bitstream.
void avpriv_align_put_bits(PutBitContext *s)
Pad the bitstream with zeros up to the next byte boundary.
static const AVClass latm_muxer_class
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
This struct describes the properties of an encoded stream.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define av_assert0(cond)
assert() equivalent, that is always enabled.
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_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int put_bits_count(PutBitContext *s)
int extradata_size
Size of the extradata content in bytes.
static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
Libavcodec external API header.
AVIOContext * pb
I/O context.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
#define MAX_EXTRADATA_SIZE
static int latm_write_header(AVFormatContext *s)
Describe the class of an AVClass context structure.
Y Spectral Band Replication.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int bit_size, int sync_extension)
Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration. ...
AVOutputFormat ff_latm_muxer
static void latm_write_frame_header(AVFormatContext *s, PutBitContext *bs)
void * priv_data
Format private data.
int avpriv_copy_pce_data(PutBitContext *pb, GetBitContext *gb)
static void write_header(FFV1Context *f)
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
AVCodecParameters * codecpar
uint8_t buffer[0x1fff+MAX_EXTRADATA_SIZE+1024]
This structure stores compressed data.
static int latm_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)