25 #include "libavutil/intreadwrite.h"
26 #include "libavutil/dict.h"
32 #define APE_TAG_VERSION 2000
33 #define APE_TAG_FOOTER_BYTES 32
34 #define APE_TAG_FLAG_CONTAINS_HEADER (1 << 31)
35 #define APE_TAG_FLAG_CONTAINS_FOOTER (1 << 30)
36 #define APE_TAG_FLAG_IS_HEADER (1 << 29)
37 #define APE_TAG_FLAG_IS_BINARY (1 << 1)
48 for (i = 0; i <
sizeof(key) - 1; i++) {
50 if (c < 0x20 || c > 0x7E)
71 size -=
avio_get_str(pb, size, filename,
sizeof(filename));
126 uint32_t val, fields, tag_bytes;
137 if (strncmp(buf,
"APETAGEX", 8)) {
160 if (fields > 65536) {
171 avio_seek(pb, file_size - tag_bytes, SEEK_SET);
173 for (i=0; i<fields; i++)
202 int val_len = strlen(e->
value);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define APE_TAG_FLAG_CONTAINS_FOOTER
AVCodecContext * codec
Codec context associated with this stream.
int index
stream index in AVFormatContext
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
int64_t ff_ape_parse_tag(AVFormatContext *s)
Read and parse an APE tag.
int flags
A combination of AV_PKT_FLAG values.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
void ffio_fill(AVIOContext *s, int b, int count)
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() and chilren.
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define APE_TAG_FLAG_CONTAINS_HEADER
#define APE_TAG_FLAG_IS_BINARY
Opaque data information usually sparse.
enum AVMediaType codec_type
#define APE_TAG_FOOTER_BYTES
AVIOContext * pb
I/O context.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int ff_ape_write_tag(AVFormatContext *s)
Write an APE tag into a file.
AVDictionary * metadata
Metadata that applies to the whole file.
#define APE_TAG_FLAG_IS_HEADER
int disposition
AV_DISPOSITION_* bit field.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
enum AVCodecID ff_guess_image2_codec(const char *filename)
static int ape_tag_read_field(AVFormatContext *s)
#define AV_DICT_IGNORE_SUFFIX
This structure stores compressed data.
AVPacket attached_pic
For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet will contain the attached pictu...