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 LATM_DEMUX_H 21 #define LATM_DEMUX_H 22 23 #define LATM_MAX_PROG 8 24 #define LATM_MAX_LAYER 8 25 #define LATM_MAX_VAR_CHUNKS 16 26 #define LATM_MAX_ID 16 27 28 typedef struct { 29 AUDIO_OBJECT_TYPE aot; 30 UWORD32 sampling_freq_index; 31 UWORD32 sampling_freq; 32 WORD32 channel_config; 33 UWORD32 samples_per_frame; 34 } ixheaacd_latm_specs; 35 36 typedef struct { 37 UWORD32 frame_len_type; 38 UWORD32 buffer_fullness; 39 UWORD32 frame_len_bits; 40 ixheaacd_latm_specs asc; 41 } ixheaacd_latm_layer_info; 42 43 typedef struct { 44 UWORD32 use_same_stream_mux; 45 UWORD32 audio_mux_version; 46 UWORD32 all_streams_same_time_framing; 47 UWORD32 num_sub_frames; 48 UWORD32 num_program; 49 UWORD32 num_layer; 50 UWORD32 use_same_config; 51 52 UWORD32 other_data_present; 53 UWORD32 other_data_length; 54 UWORD32 crc_check_present; 55 UWORD32 crc_check_sum; 56 UWORD32 frame_length; 57 ixheaacd_latm_layer_info layer_info[LATM_MAX_PROG][LATM_MAX_LAYER]; 58 } ixheaacd_latm_struct; 59 60 WORD32 ixheaacd_latm_au_chunk_length_info(ia_bit_buf_struct *it_bit_buff); 61 62 WORD32 ixheaacd_latm_payload_length_info(ia_bit_buf_struct *it_bit_buff, 63 ixheaacd_latm_struct *latm_element); 64 65 #endif 66