32 #define APE_TAG_FLAG_CONTAINS_HEADER (1 << 31)
33 #define APE_TAG_FLAG_CONTAINS_FOOTER (1 << 30)
34 #define APE_TAG_FLAG_IS_HEADER (1 << 29)
35 #define APE_TAG_FLAG_IS_BINARY (1 << 1)
46 for (i = 0; i <
sizeof(key) - 1; i++) {
48 if (c < 0x20 || c > 0x7E)
70 ret =
avio_get_str(pb, size, filename,
sizeof(filename));
122 uint32_t
val, fields, tag_bytes;
156 if (fields > 65536) {
167 avio_seek(pb, file_size - tag_bytes, SEEK_SET);
169 for (i=0; i<fields; i++)
177 while (*str && *str >= 0x20 && *str <= 0x7e ) str++;
204 val_len = strlen(e->
value);
238 if (dyn_bc && !dyn_buf)
const char const char void * val
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int64_t avio_size(AVIOContext *s)
Get the filesize.
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define APE_TAG_FLAG_CONTAINS_FOOTER
int index
stream index in AVFormatContext
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
void avio_wl32(AVIOContext *s, unsigned int val)
static av_cold int end(AVCodecContext *avctx)
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
#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.
AVDictionary * metadata
Metadata that applies to the whole file.
unsigned int avio_rl32(AVIOContext *s)
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.
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() or another memory allocation functio...
GLsizei GLboolean const GLfloat * value
#define APE_TAG_FLAG_CONTAINS_HEADER
#define APE_TAG_FLAG_IS_BINARY
Opaque data information usually sparse.
#define APE_TAG_FOOTER_BYTES
int avio_put_str(AVIOContext *s, const char *str)
Write a NULL-terminated string.
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)
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
static int ape_tag_read_field(AVFormatContext *s)
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key, ignoring the suffix of the found key string.
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...