1 /****************************************************************************** 2 * * 3 * Copyright (C) 2018 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ***************************************************************************** 18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19 */ 20 #ifndef __METADATA_H 21 #define __METADATA_H 22 23 #define MAX_TRACKS_PER_LAYER 50 24 25 typedef struct { 26 UWORD32 *ia_mp4_stsz_size; 27 UWORD32 ia_mp4_stsz_entries; 28 UWORD32 fill_once; 29 UWORD32 movie_time_scale; 30 UWORD32 media_time_scale; 31 32 UWORD32 dec_info_init; 33 UWORD32 g_track_count; 34 UWORD32 useEditlist[MAX_TRACKS_PER_LAYER]; 35 UWORD32 startOffsetInSamples[MAX_TRACKS_PER_LAYER]; 36 UWORD32 playTimeInSamples[MAX_TRACKS_PER_LAYER]; 37 38 } metadata_info; 39 40 int ixheaacd_read_metadata_info(FILE *fp, metadata_info *meta_info); 41 42 int get_metadata_dec_info_init(metadata_info meta_info); 43 44 int get_metadata_dec_exec(metadata_info meta_info, int frame); 45 46 int get_start_offset_in_samples(metadata_info meta_info); 47 48 int get_play_time_in_samples(metadata_info meta_info); 49 50 void update_start_offset_in_samples(metadata_info meta_info, int update); 51 52 void update_play_time_in_samples(metadata_info meta_info, int update); 53 54 #endif 55