void quicktime_mdhd_init(quicktime_mdhd_t *mdhd) { mdhd->version = 0; mdhd->flags = 0; mdhd->creation_time = quicktime_current_time(); mdhd->modification_time = quicktime_current_time(); mdhd->time_scale = 0; mdhd->duration = 0; mdhd->language = 0; mdhd->quality = 100; }
int quicktime_tkhd_init(quicktime_tkhd_t *tkhd) { int i; tkhd->version = 0; tkhd->flags = 15; tkhd->creation_time = quicktime_current_time(); tkhd->modification_time = quicktime_current_time(); tkhd->track_id = 0; tkhd->reserved1 = 0; tkhd->duration = 0; /* need to set this when closing */ for(i = 0; i < 8; i++) tkhd->reserved2[i] = 0; tkhd->layer = 0; tkhd->alternate_group = 0; tkhd->volume = 0.996094; tkhd->reserved3 = 0; quicktime_matrix_init(&(tkhd->matrix)); tkhd->track_width = 0; tkhd->track_height = 0; return 0; }
int quicktime_mvhd_init(quicktime_mvhd_t *mvhd) { int i; mvhd->version = 0; mvhd->flags = 0; mvhd->creation_time = quicktime_current_time(); mvhd->modification_time = quicktime_current_time(); mvhd->time_scale = 90000; mvhd->duration = 0; mvhd->preferred_rate = 1.0; mvhd->preferred_volume = 0.996094; for(i = 0; i < 10; i++) mvhd->reserved[i] = 0; quicktime_matrix_init(&(mvhd->matrix)); mvhd->preview_time = 0; mvhd->preview_duration = 0; mvhd->poster_time = 0; mvhd->selection_time = 0; mvhd->selection_duration = 0; mvhd->current_time = 0; mvhd->next_track_id = 1; return 0; }