uint64_t file_size;
uint32_t error;
- /* mvhd */
- int32_t time_scale;
- int32_t duration;
-
/* incremental track index while reading the file */
int32_t total_tracks;
return 0;
}
-static int32_t read_mvhd(struct mp4 *f)
-{
- int32_t i;
-
- read_char(f); /* version */
- read_int24(f); /* flags */
- read_int32(f); /* creation_time */
- read_int32(f); /* modification_time */
- f->time_scale = read_int32(f);
- f->duration = read_int32(f);
- read_int32(f); /* preferred_rate */
- read_int16(f); /* preferred_volume */
- for (i = 0; i < 10; i++)
- read_char(f); /* reserved */
- for (i = 0; i < 9; i++)
- read_int32(f); /* matrix */
- read_int32(f); /* preview_time */
- read_int32(f); /* preview_duration */
- read_int32(f); /* poster_time */
- read_int32(f); /* selection_time */
- read_int32(f); /* selection_duration */
- read_int32(f); /* current_time */
- read_int32(f); /* next_track_id */
- return 0;
-}
-
static int32_t tag_add_field(struct mp4_metadata *tags, const char *item,
const char *value, int32_t len)
{
} else if (atom_type == ATOM_STSD) {
/* sample description box */
read_stsd(f);
- } else if (atom_type == ATOM_MVHD) {
- /* movie header box */
- read_mvhd(f);
} else if (atom_type == ATOM_MDHD) {
/* track header */
read_mdhd(f);