/* * Copyright (C) 2017 Amlogic Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef _DTV_INPUT_H_ #define _DTV_INPUT_H_ #include "aml_dump_debug.h" #include "aml_malloc_debug.h" #include "audio_controls.h" #define TEMP_SET_MEDIASYNC_INSTANCE_ID 11 #define NULL_INT64 0xffffffffffffffff #define ES_BUF_SIZE (1024 * 100) #define AUDIO_DEMUX_NUM 2 #define DEMUX0_NAME "/dev/dvb/adapter0/demux0" #define DEMUX1_NAME "/dev/dvb/adapter0/demux1" #define MS_TO_NS 1000000 typedef enum es_data_type { ES_DATA_TYPE_MAIN = 0, ES_DATA_TYPE_AD = 1, } es_data_type_e; struct mAudioEsData { uint8_t *data; int size; uint64_t pts; uint8_t pts_dts_flag; int used_size; uint8_t adfade; uint8_t adpan; }; struct dtv_play_handle { int demux_fd; audio_format_t codec; pthread_t dtv_output_threadID; unsigned int dtv_thread_created; unsigned int dtv_output_thread_exit; }; int dtv_start(adec_play_info_t* dtv_playback_info); int dtv_stop(adec_play_info_t* dtv_playback_info); #endif