DVBCore
1.0
Open source DVB engine
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2004 Ocean Blue Software Ltd 00004 * 00005 * This file is part of a DTVKit Software Component 00006 * You are permitted to copy, modify or distribute this file subject to the terms 00007 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00008 * 00009 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00010 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00011 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00012 * 00013 * If you or your organisation is not a member of DTVKit then you have access 00014 * to this source code outside of the terms of the licence agreement 00015 * and you are expected to delete this and any associated files immediately. 00016 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00017 *******************************************************************************/ 00024 // pre-processor mechanism so multiple inclusions don't cause compilation error 00025 00026 #ifndef _AP_CNTRL_H 00027 #define _AP_CNTRL_H 00028 00029 #include "stbhwav.h" 00030 #include "vtctype.h" 00031 #include "stbdpc.h" 00032 #include "ap_si.h" 00033 00034 //---Constant and macro definitions for public use----------------------------- 00035 00036 00037 //---Enumerations for public use----------------------------------------------- 00038 00039 typedef enum 00040 { 00041 ACTL_SI_NO_SEARCH, 00042 ACTL_SI_CHANNEL_SEARCH, 00043 ACTL_SI_CHANNEL_SEARCH_NO_NIT, 00044 ACTL_SI_STARTUP_SEARCH, 00045 ACTL_SI_EVENT_SCHED_SEARCH, 00046 ACTL_SI_DVB_SSU_SEARCH, 00047 ACTL_SI_TOT_SEARCH, 00048 ACTL_SI_USER_DEFINED 00049 } E_ACTL_SI_SRCH_REQD; 00050 00051 typedef enum 00052 { 00053 ACTL_FREQ_SEARCH, 00054 ACTL_NETWORK_SEARCH 00055 } E_ACTL_SEARCH_TYPE; 00056 00057 typedef enum 00058 { 00059 ACTL_STANDBY_MODE, 00060 ACTL_STANDBY_SCART_MODE, 00061 ACTL_TV_MODE, 00062 ACTL_SCART_MODE, 00063 ACTL_INT_DVD_MODE 00064 } E_ACTL_AV_MODE; 00065 00066 00067 //---Global type defs for public use------------------------------------------- 00068 typedef struct 00069 { 00070 S8BIT offset; 00071 E_STB_DP_ANALOG_VIDEO_TYPE vtype; 00072 } S_MANUAL_ANA_TUNING_PARAMS; 00073 00074 typedef struct 00075 { 00076 E_STB_DP_TBWIDTH bwidth; 00077 E_STB_DP_TMODE mode; 00078 E_STB_DP_TTYPE type; 00079 U8BIT plp_id; 00080 } S_MANUAL_TERR_TUNING_PARAMS; 00081 00082 typedef struct 00083 { 00084 E_STB_DP_CMODE mode; 00085 U16BIT symbol_rate; 00086 } S_MANUAL_CABLE_TUNING_PARAMS; 00087 00088 typedef struct 00089 { 00090 void *satellite; 00091 E_STB_DP_POLARITY polarity; 00092 U16BIT symbol_rate; 00093 E_STB_DP_FEC fec; 00094 BOOLEAN dvb_s2; 00095 E_STB_DP_MODULATION modulation; 00096 } S_MANUAL_SAT_TUNING_PARAMS; 00097 00098 typedef struct 00099 { 00100 U32BIT freq; 00101 union 00102 { 00103 S_MANUAL_ANA_TUNING_PARAMS ana; 00104 S_MANUAL_TERR_TUNING_PARAMS terr; 00105 S_MANUAL_CABLE_TUNING_PARAMS cab; 00106 S_MANUAL_SAT_TUNING_PARAMS sat; 00107 } u; 00108 } S_MANUAL_TUNING_PARAMS; 00109 00110 00111 typedef struct 00112 { 00113 E_STB_DP_RES_OWNER owner; 00114 void *data; 00115 U32BIT data_size; 00116 } S_ACTL_OWNER_INFO; 00117 00118 00119 //---Global type defs for public use------------------------------------------- 00120 00128 typedef void (*DSM_FILE_CALLBACK)(void *user_data, U8BIT *file_data, U32BIT data_size); 00129 00130 //---Global Function prototypes for public use--------------------------------- 00131 00139 BOOLEAN ACTL_StartServiceSearch(E_STB_DP_SIGNAL_TYPE tuner_type, E_ACTL_SEARCH_TYPE type); 00140 00147 BOOLEAN ACTL_IsTargetRegionRequired(void); 00148 00152 void ACTL_StopServiceSearch(void); 00153 00158 void ACTL_CompleteServiceSearch(void); 00159 00166 BOOLEAN ACTL_StartStartupSearch(void); 00167 00172 BOOLEAN ACTL_StartSSUSearch(void); 00173 00179 BOOLEAN ACTL_StartTotSearch(void); 00180 00184 void ACTL_StopTotSearch(void); 00185 00190 BOOLEAN ACTL_StartEitSearch(void); 00191 00195 void ACTL_StopEitSearch(void); 00196 00202 BOOLEAN ACTL_IsSearchComplete(void); 00203 00211 U8BIT ACTL_GetSearchProgress(void); 00212 00221 BOOLEAN ACTL_StartManualSearchById(E_STB_DP_SIGNAL_TYPE tuner_type, U16BIT chan_id, 00222 BOOLEAN start_search); 00223 00232 BOOLEAN ACTL_StartManualSearch(E_STB_DP_SIGNAL_TYPE tuner_type, 00233 S_MANUAL_TUNING_PARAMS *tuning_params, E_ACTL_SEARCH_TYPE type); 00234 00239 void ACTL_FinishManualSearch(void); 00240 00249 BOOLEAN ACTL_StartSSUUpdate(void *t_ptr); 00250 00256 void ACTL_FinishSSUUpdate(BOOLEAN do_update); 00257 00264 U8BIT ACTL_AcquireLivePathForService(void *s_ptr, S_ACTL_OWNER_INFO *owner); 00265 00271 void ACTL_ReleaseLivePathForService(void *s_ptr, E_STB_DP_RES_OWNER owner); 00272 00279 BOOLEAN ACTL_AcquirePathOwnership(U8BIT path, S_ACTL_OWNER_INFO *owner_info); 00280 00288 BOOLEAN ACTL_ReleasePathOwnership(U8BIT path, E_STB_DP_RES_OWNER owner); 00289 00297 BOOLEAN ACTL_CanServiceBeViewed(void *s_ptr); 00298 00304 void* ACTL_GetCurrentSatellite(U8BIT path); 00305 00315 void ACTL_TuneToTransport(U8BIT path, S_ACTL_OWNER_INFO *owner_info, void *t_ptr, 00316 E_ACTL_SI_SRCH_REQD reqd_si, BOOLEAN relock_on); 00317 00331 U8BIT ACTL_TuneToService(U8BIT path, S_ACTL_OWNER_INFO *owner_info, void *s_ptr, 00332 BOOLEAN override_lock, BOOLEAN for_live); 00333 00350 BOOLEAN ACTL_TuneUsingDSD(U8BIT path, SI_DELIVERY_SYS_DESC_TYPE dsd_type, 00351 SI_DELIVERY_SYS_DESC *dsd, U16BIT service_id, E_ACTL_SI_SRCH_REQD reqd_si); 00352 00358 BOOLEAN ACTL_IsTuned(U8BIT path); 00359 00364 void ACTL_TuneOff(U8BIT path); 00365 00370 void ACTL_DecodeOff(U8BIT path); 00371 00376 void ACTL_ReTuneAudio(void); 00377 00382 void ACTL_ReTuneSubtitles(void); 00383 00389 BOOLEAN ACTL_HasDecodingStarted(U8BIT path); 00390 00396 BOOLEAN ACTL_IsDecodingLocked(U8BIT path); 00397 00402 void ACTL_ReleaseChannelLock(void); 00403 00412 BOOLEAN ACTL_TuneToRfChanArrayEntry(U8BIT path, U16BIT id, E_ACTL_SI_SRCH_REQD reqd_si, BOOLEAN relock_on); 00413 00420 BOOLEAN ACTL_TuneToRfChanArrayAnalogEntry(U8BIT path, U16BIT id); 00421 00430 BOOLEAN ACTL_TuneToUserDefinedParams(U8BIT path, S_MANUAL_TUNING_PARAMS *tuning_params, 00431 E_ACTL_SI_SRCH_REQD reqd_si, BOOLEAN relock_on); 00432 00437 void ACTL_EnterStandby(void); 00438 00446 void ACTL_LeaveStandby(void *s_ptr, BOOLEAN tune_to_service); 00447 00452 void ACTL_SetStandbyState(BOOLEAN state); 00453 00457 void ACTL_SetStandbyVCRActive(void); 00458 00467 void ACTL_SetVideoWindow(S16BIT win_x, S16BIT win_y, U16BIT win_width, U16BIT win_height); 00468 00473 void ACTL_SetTVAspectRatio(E_STB_AV_ASPECT_RATIO aspect_ratio); 00474 00479 E_STB_AV_ASPECT_RATIO ACTL_GetTVAspectRatio(void); 00480 00487 void ACTL_SetTVAspectMode(E_STB_AV_ASPECT_MODE aspect_mode); 00488 00493 E_STB_AV_ASPECT_MODE ACTL_GetTVAspectMode(void); 00494 00502 void ACTL_SetTVAspectConversion(E_STB_AV_ASPECT_RATIO aspect_ratio, E_STB_AV_ASPECT_MODE aspect_mode); 00503 00511 E_STB_AV_VIDEO_FORMAT ACTL_GetActualVideoMode(U16BIT *width, U16BIT *height); 00512 00518 void ACTL_HDMIConnected(void); 00519 00524 void ACTL_HDMIDisconnected(void); 00525 00530 BOOLEAN ACTL_IsHDMIConnected(void); 00531 00541 U16BIT ACTL_GetHDMIResolutions(E_STB_AV_VIDEO_FORMAT **video_formats, U16BIT *current_index); 00542 00551 void ACTL_UpdateVideoMode(E_STB_AV_ASPECT_RATIO aspect, BOOLEAN force); 00552 00559 void ACTL_ApplyHDCP(void *s_ptr); 00560 00565 E_ACTL_AV_MODE ACTL_GetAvModeStatus(void); 00566 00567 /* RF channel details utility functions */ 00568 00574 U16BIT ACTL_GetNumRfChanArrayEntries(E_STB_DP_SIGNAL_TYPE tuner_type); 00575 00582 U8BIT* ACTL_GetRfChanName(E_STB_DP_SIGNAL_TYPE tuner_type, U16BIT id); 00583 00590 U8BIT* ACTL_GetRfNameFromFreq(E_STB_DP_SIGNAL_TYPE tuner_type, U32BIT freq_hz); 00591 00598 U32BIT ACTL_GetRfChanFreqHz(E_STB_DP_SIGNAL_TYPE tuner_type, U16BIT id); 00599 00606 U16BIT ACTL_GetRfSymbolRate(E_STB_DP_SIGNAL_TYPE tuner_type, U16BIT id); 00607 00614 U8BIT ACTL_GetRfModulation(E_STB_DP_SIGNAL_TYPE tuner_type, U16BIT id); 00615 00621 E_STB_DP_TTYPE ACTL_GetTerRfChanType(U16BIT id); 00622 00623 #ifdef COMMON_INTERFACE 00624 /* CI functions */ 00625 00634 void ACTL_TuneToCIService(U8BIT path, S_ACTL_OWNER_INFO *owner_info, void *s_ptr, E_APP_SI_MODE si_mode); 00635 00642 void ACTL_ContinueCIPLUSTune(BOOLEAN continue_tuning); 00643 #endif 00644 00648 void ACTL_EnableCiModule(void); 00649 00653 void ACTL_DisableCiModule(void); 00654 00659 BOOLEAN ACTL_IsCiUiRequired(void); 00660 00666 BOOLEAN ACTL_GetDecodePausedState(U8BIT path); 00667 00674 BOOLEAN ACTL_StartSubtitles(void); 00675 00679 void ACTL_PauseSubtitles(void); 00680 00684 void ACTL_ResumeSubtitles(void); 00685 00689 void ACTL_StopSubtitles(void); 00690 00694 BOOLEAN ACTL_AreSubtitlesDisplayed(void); 00695 00699 BOOLEAN ACTL_AreSubtitlesStarted(void); 00700 00705 BOOLEAN ACTL_IsAudioDescriptionOn(void); 00706 00714 BOOLEAN ACTL_StartAudioDescription(U8BIT path); 00715 00720 void ACTL_StopAudioDescription(U8BIT path); 00721 00726 void ACTL_SetADVolume(U8BIT volume); 00727 00735 void ACTL_SetParentalControl(BOOLEAN enabled); 00736 00742 BOOLEAN ACTL_ParentalControlEnabled(void); 00743 00750 void ACTL_SetParentalControlAge(U8BIT age); 00751 00757 U8BIT ACTL_GetParentalControlAge(void); 00758 00765 void ACTL_ApplyParentalControl(U8BIT path, void *s_ptr); 00766 00767 #ifdef FREEVIEW_PLAYBACK 00768 00774 BOOLEAN ACTL_IsTrailerBookingAvailable(void *serv_ptr); 00775 #endif 00776 00780 void ACTL_SetupPlayback(void); 00781 00786 void ACTL_StartPlayback(void *s_ptr); 00787 00792 U8BIT ACTL_GetActivePath(void); 00793 00801 void ACTL_StartDecoding(U8BIT path, void *s_ptr); 00802 00807 void ACTL_SetMhegAVControl(BOOLEAN control); 00808 00813 void ACTL_SetMhegVolumeAdjustment(S8BIT volume); 00814 00819 U8BIT ACTL_GetVolume(void); 00820 00826 U8BIT ACTL_SetVolume(U8BIT volume); 00827 00833 U8BIT ACTL_ChangeVolume(S8BIT volume_change); 00834 00839 void ACTL_SetMute(BOOLEAN mute); 00840 00845 BOOLEAN ACTL_ToggleMute(void); 00846 00851 BOOLEAN ACTL_IsMuted(void); 00852 00860 BOOLEAN ACTL_SetActiveProfile(void *profile); 00861 00862 00863 //---Function prototypes for internal use--------------------------------- 00864 00868 void ACTL_InitialiseAppControl(void); 00869 00874 void ACTL_ActionEvent(U32BIT event, void *event_data); 00875 00881 BOOLEAN ACTL_CheckLiveServiceChange(void); 00882 00888 BOOLEAN ACTL_HandlePrivateTimerEvent(U32BIT timer_handle); 00889 00890 void ACTL_SetAnalogChanIdString(U8BIT *str_ptr); 00891 00896 void ACTL_AllowAnalogVideo(BOOLEAN allow_analog_video); 00897 00898 #endif // _AP_CNTRL_H