34 {
"ALBUMARTIST",
"album_artist"},
35 {
"TRACKNUMBER",
"track" },
36 {
"DISCNUMBER",
"disc" },
37 {
"DESCRIPTION",
"comment" },
42 AVChapter **chapters,
unsigned int nb_chapters)
45 len += strlen(vendor_string);
46 if (chapters && nb_chapters) {
47 for (
int i = 0;
i < nb_chapters;
i++) {
49 len += 4 + 12 + 1 + 10;
51 int64_t len1 = !strcmp(tag->
key,
"title") ? 4 : strlen(tag->
key);
52 len += 4 + 10 + len1 + 1 + strlen(tag->
value);
59 len += 4 +strlen(tag->
key) + 1 + strlen(tag->
value);
66 const char *vendor_string,
67 AVChapter **chapters,
unsigned int nb_chapters)
71 avio_write(pb, vendor_string, strlen(vendor_string));
72 if (chapters && nb_chapters) {
73 for (
int i = 0;
i < nb_chapters;
i++) {
82 int64_t len1 = strlen(tag->
key);
83 int64_t len2 = strlen(tag->
value);
84 if (len1+1+len2 > UINT32_MAX)
91 for (
int i = 0;
i < nb_chapters;
i++) {
93 char chapter_time[13];
94 char chapter_number[4];
102 snprintf(chapter_number,
sizeof(chapter_number),
"%03d",
i);
103 snprintf(chapter_time,
sizeof(chapter_time),
"%02d:%02d:%02d.%03d", h, m, s, ms);
112 int64_t len1 = !strcmp(tag->
key,
"title") ? 4 : strlen(tag->
key);
113 int64_t len2 = strlen(tag->
value);
114 if (len1+1+len2+10 > UINT32_MAX)
119 if (!strcmp(tag->
key,
"title"))
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
void avio_wl32(AVIOContext *s, unsigned int val)
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)
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
#define i(width, name, range_min, range_max)
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
static AVRational av_make_q(int num, int den)
Create an AVRational.
void avio_w8(AVIOContext *s, int b)
AVRational time_base
time base in which the start/end timestamps are specified
#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.