54 if (!
s->metadata && !
s->nb_chapters && !list_entry)
66 list_entry = list_entry->
next;
90 size_t size = strlen(
tag->value);
107 uint64_t sample_rate;
111 for (
i = 0;
i <
s->nb_streams;
i++) {
175 avio_wb16(pb, (sample_rate >> 52) + (16383 - 1023));
176 avio_wb64(pb, UINT64_C(1) << 63 | sample_rate << 11);
219 if (
s->streams[
pkt->stream_index]->nb_frames == 1) {
221 " ignoring.\n",
pkt->stream_index);
223 if (
s->streams[
pkt->stream_index]->nb_frames >= 1)
275#define OFFSET(x) offsetof(AIFFOutputContext, x)
276#define ENC AV_OPT_FLAG_ENCODING_PARAM
278 {
"write_id3v2",
"Enable ID3 tags writing.",
280 {
"id3v2_version",
"Select ID3v2 version to write. Currently 3 and 4 are supported.",
286 .class_name =
"AIFF muxer",
295 .p.mime_type =
"audio/aiff",
296 .p.extensions =
"aif,aiff,afc,aifc",
const AVCodecTag *const ff_aiff_codec_tags_list[]
common header for AIFF muxer and demuxer
static int aiff_write_header(AVFormatContext *s)
static const AVClass aiff_muxer_class
static int aiff_write_packet(AVFormatContext *s, AVPacket *pkt)
static int put_id3v2_tags(AVFormatContext *s, AIFFOutputContext *aiff)
static int aiff_write_trailer(AVFormatContext *s)
static void aiff_deinit(AVFormatContext *s)
const FFOutputFormat ff_aiff_muxer
static void put_meta(AVFormatContext *s, const char *key, uint32_t id)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
void avio_wl32(AVIOContext *s, unsigned int val)
void avio_w8(AVIOContext *s, int b)
void avio_wb32(AVIOContext *s, unsigned int val)
void avio_wb16(AVIOContext *s, unsigned int val)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
void avio_wb64(AVIOContext *s, uint64_t val)
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
#define i(width, name, range_min, range_max)
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
@ AV_CHANNEL_ORDER_NATIVE
The native channel order, i.e.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
#define AV_LOG_WARNING
Something somehow does not look correct.
#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
void ff_id3v2_start(ID3v2EncContext *id3, AVIOContext *pb, int id3v2_version, const char *magic)
Initialize an ID3v2 tag.
void ff_id3v2_finish(ID3v2EncContext *id3, AVIOContext *pb, int padding_bytes)
Finalize an opened ID3v2 tag.
int ff_id3v2_write_metadata(AVFormatContext *s, ID3v2EncContext *id3)
Convert and write all global metadata from s into an ID3v2 tag.
int ff_id3v2_write_apic(AVFormatContext *s, ID3v2EncContext *id3, AVPacket *pkt)
Write an attached picture from pkt into an ID3v2 tag.
#define ID3v2_DEFAULT_MAGIC
Default magic bytes for ID3v2 header: "ID3".
static av_always_inline uint64_t av_double2int(double f)
Reinterpret a double as a 64-bit integer.
void ff_mov_write_chan(AVIOContext *pb, int64_t channel_layout)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define MKTAG(a, b, c, d)
#define MKBETAG(a, b, c, d)
enum AVChannelOrder order
Channel order used in this layout.
uint64_t mask
This member must be used for AV_CHANNEL_ORDER_NATIVE, and may be used for AV_CHANNEL_ORDER_AMBISONIC ...
union AVChannelLayout::@162063043056170047076125117143030261346263330336 u
Details about which channels are present in this layout.
int nb_channels
Number of channels in this layout.
Describe the class of an AVClass context structure.
This struct describes the properties of an encoded stream.
int extradata_size
Size of the extradata content in bytes.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVChannelLayout ch_layout
The channel layout and number of channels.
enum AVMediaType codec_type
General type of the encoded data.
int block_align
The number of bytes per coded audio frame, required by some formats.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
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).
int sample_rate
The number of audio samples per second.
This structure stores compressed data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
struct PacketListEntry * next