23 #include "libavutil/intreadwrite.h"
24 #include "libavutil/dict.h"
30 #define APE_TAG_FLAG_CONTAINS_HEADER (1 << 31)
31 #define APE_TAG_FLAG_CONTAINS_FOOTER (1 << 30)
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)
65 size -=
avio_get_str(pb, size, filename,
sizeof(filename));
119 uint32_t
val, fields, tag_bytes;
153 if (fields > 65536) {
164 avio_seek(pb, file_size - tag_bytes, SEEK_SET);
166 for (i=0; i<fields; i++)
174 while (*str && *str >= 0x20 && *str <= 0x7e ) str++;
201 val_len = strlen(e->
value);
235 if (dyn_bc && !dyn_buf)
const char const char void * val
#define AV_LOG_WARNING
Something somehow does not look correct.
#define APE_TAG_FLAG_CONTAINS_FOOTER
AVDictionaryEntry * av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
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 ...
static av_cold int end(AVCodecContext *avctx)
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.
void ffio_fill(AVIOContext *s, int b, int count)
static int string_is_ascii(const uint8_t *str)
#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
#define APE_TAG_FOOTER_BYTES
enum AVMediaType codec_type
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.
#define APE_TAG_FLAG_IS_HEADER
int disposition
AV_DISPOSITION_* bit field.
enum AVCodecID ff_guess_image2_codec(const char *filename)
Opaque data information usually sparse.
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...