29 #define APE_TAG_VERSION 2000
30 #define APE_TAG_FOOTER_BYTES 32
31 #define APE_TAG_FLAG_CONTAINS_HEADER (1 << 31)
32 #define APE_TAG_FLAG_IS_HEADER (1 << 29)
33 #define APE_TAG_FLAG_IS_BINARY (1 << 1)
44 for (i = 0; i <
sizeof(key) - 1; i++) {
46 if (c < 0x20 || c > 0x7E)
67 size -=
avio_get_str(pb, size, filename,
sizeof(filename));
122 uint32_t val, fields, tag_bytes;
133 if (strncmp(buf,
"APETAGEX", 8)) {
156 if (fields > 65536) {
167 avio_seek(pb, file_size - tag_bytes, SEEK_SET);
169 for (i=0; i<fields; i++)
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int64_t avio_size(AVIOContext *s)
Get the filesize.
int index
stream index in AVFormatContext
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AV_DISPOSITION_ATTACHED_PIC
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
#define AV_DICT_DONT_STRDUP_VAL
AVCodecID
Identify the syntax and semantics of the bitstream.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
unsigned int avio_rl32(AVIOContext *s)
void av_log(void *avcl, int level, const char *fmt,...)
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
int64_t ff_ape_parse_tag(AVFormatContext *s)
Read and parse an APE tag.
int flags
A combination of AV_PKT_FLAG values.
int avio_r8(AVIOContext *s)
AVCodecContext * codec
Codec context associated with this stream.
#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.
#define FF_INPUT_BUFFER_PADDING_SIZE
#define APE_TAG_FLAG_IS_HEADER
#define AVERROR_INVALIDDATA
int disposition
AV_DISPOSITION_* bit field.
enum AVCodecID ff_guess_image2_codec(const char *filename)
static int ape_tag_read_field(AVFormatContext *s)
int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen)
Read a string from pb into buf.
This structure stores compressed data.
AVPacket attached_pic
For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet will contain the attached pictu...