34#define APE_TAG_FLAG_CONTAINS_HEADER (1U << 31)
35#define APE_TAG_FLAG_LACKS_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++) {
65 uint8_t filename[1024];
114 uint32_t
val, fields, tag_bytes;
148 if (fields > 65536) {
159 avio_seek(pb, file_size - tag_bytes, SEEK_SET);
164 tag_start = file_size - tag_bytes;
166 for (
i=0;
i<fields;
i++)
174 while (*str && *str >= 0x20 && *str <= 0x7e ) str++;
181 int size, ret, count = 0;
197 val_len = strlen(e->
value);
static double val(void *priv, double ch)
static int ape_tag_read_field(AVFormatContext *s)
int64_t ff_ape_parse_tag(AVFormatContext *s)
Read and parse an APE tag.
#define APE_TAG_FLAG_IS_BINARY
int ff_ape_write_tag(AVFormatContext *s)
Write an APE tag into a file.
static int string_is_ascii(const uint8_t *str)
#define APE_TAG_FLAG_IS_HEADER
#define APE_TAG_FLAG_CONTAINS_HEADER
#define APE_TAG_HEADER_BYTES
#define APE_TAG_FOOTER_BYTES
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
void avio_wl32(AVIOContext *s, unsigned int val)
int avio_put_str(AVIOContext *s, const char *str)
Write a NULL-terminated string.
int64_t avio_size(AVIOContext *s)
Get the filesize.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
unsigned int avio_rl32(AVIOContext *s)
int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen)
Read a string from pb into buf.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
int avio_r8(AVIOContext *s)
int avio_get_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
void ffio_fill(AVIOContext *s, int b, int64_t count)
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size)
Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end which is always set to 0 and f...
int ff_add_attached_pic(AVFormatContext *s, AVStream *st, AVIOContext *pb, AVBufferRef **buf, int size)
Add an attached pic to an AVStream.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
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 AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
@ AVMEDIA_TYPE_ATTACHMENT
Opaque data information usually sparse.
enum AVCodecID ff_guess_image2_codec(const char *filename)
Memory handling functions.
int ff_standardize_creation_time(AVFormatContext *s)
Standardize creation_time metadata in AVFormatContext to an ISO-8601 timestamp string.
enum AVMediaType codec_type
General type of the encoded data.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
AVCodecParameters * codecpar
Codec parameters associated with this stream.