MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
Macros | Enumerations | Functions
mh5control.c File Reference

(STB) can call directly. They build the interface to the MHEG5 engine. This file defines the api to the MHEG engine and the functions the engine needs from the system to run properly. All engine specific functions start with |MHEG5|, all system specific functions start with |OSD|. More...

#include "mheg5_events.h"
#include "dvb_service.h"
#include "dvb_native.h"
#include "mh5application.h"
#include "mh5scene.h"
#include "mh5queue.h"
#include "glue_memory.h"
#include "glue_queue.h"
#include "glue_timers.h"
#include "glue_main.h"
#include "glue_debug.h"
#include "mh5display.h"
#include "mh5fileorm.h"
#include "mh5misc.h"
#include "mh5streamevent.h"
#include "mh5gate.h"
#include "mg_osd.h"
#include "mg_api.h"
#include "dvb_video.h"
#include "dvb_audio.h"
#include "mh5storage.h"
#include "glue_dsmcc.h"
#include "dsm_control.h"
#include "mh5control.h"
#include "mh5keypress.h"
#include "mheg5_ci.h"

Macros

#define MAX_HANDLERS   2
 
#define ENG_STAT_STRING()
 
#define TINFO_QUIET_BIT   0x01
 
#define TINFO_NON_DESTRUCT_BIT   0x02
 
#define TINFO_EXPLICIT_CRSL_BIT   0x04
 
#define TINFO_MAP_CRSL_INIT_BIT   0x08
 
#define TINFO_NATIVE_APP_BIT   0x10
 
#define LC_STATE_NONE   0x00
 
#define LC_STATE_QUIET   TINFO_QUIET_BIT
 
#define LC_STATE_NDT_ENABLE   TINFO_NON_DESTRUCT_BIT
 
#define LC_STATE_NATIVE_APP   TINFO_NATIVE_APP_BIT
 
#define LC_STATE_MHG_TUNING   0x80
 
#define INVALID_CI_MODULE   0xFFFFFFFF
 
#define InformCiAppStopped(sc)
 
#define CI_APP_ABORT_SYSTEM   0x02
 

Enumerations

enum  E_ENGINE_STATUS {
  ENG_STOPPED, ENG_DSM_STARTING, ENG_DSM_STARTED, ENG_CI_STARTING,
  ENG_CI_STARTED
}
 
enum  E_SPECIAL_APP { SA_NORMAL, SA_EPG, SA_INFO, SA_LIST }
 

Functions

int ASN1_MemInit (void)
 
void ASN1_MemExit (void)
 
E_MhegErr MHEG5Initialise (S_MhegConfig *cfg_params)
 initialise MHEG5 component More...
 
void MHEG5_Terminate (void)
 Terminate MHEG5 component. More...
 
void MHEG5RefreshDisplay (void)
 
E_MhegErr MHEG5ResetResolution (U16BIT screenWidth, U16BIT screenHeight)
 
void MHEG5NotifyEvent (E_MhegEvent event, U32BIT data)
 
BOOLEAN MHEG5_DvbRegisterEventHandler (F_NotifyMhegEvent handler)
 
void MHEG5_DvbUnregisterEventHandler (F_NotifyMhegEvent handler)
 
void MHEG5engineStart (U8BIT *app_name, BOOLEAN isCi, BOOLEAN special)
 Start the engine with the initial application. More...
 
void MHEG5NotifyEngineStarted (void)
 
void MHEG5NotifyCarouselBooted (S_DsmccEvent *param)
 
void MHEG5AutoPathComplete (E_FsStatus result)
 
void MHEG5NotifyEngineStartFailed (void)
 
void MHEG5NotifyEngineQuit (void)
 
void MHEG5engineTerminate (void)
 Force the engine to terminate. More...
 
void MHEG5engineDsmTerminate (void)
 Force the engine to terminate any DSM-CC based MHEG application. More...
 
MHEG5Bool MHEG5TuneIndex (MHEG5Int serviceIndex)
 Ref: [1] - 3.10.6.2 Tune to the specified service. If the tuner fails to tune to the service it should attempt to return to the previous tuned service. If tuning to previously tuned service fails, the receiver shall allow the user to choose another service. More...
 
void MHEG5TuneIndexInfo (MHEG5Int tuneInfo)
 Sets the way the application expects the receiver is to perform all subsequence application initiated tuning. Normal (0) means subsequent tuning will be performed as if the user had tuned via the remote control. Silently (1) means subsequent tuning will be performed without showing any OSD (channel info banner) and the user initiating a channel change will use the source channel as the reference point This function is used by the SI_TuneIndexInfo resident program. See UK1.06 profile section 3.10.6.4. More...
 
E_ChannelStartMode MHEG5_GetTuningInfoMode (S32BIT serviceIndex)
 Get the current tuning mode for the target service. This is only relevant when MHEG5 has requested a tune, and DVB has not yet tuned to that service. More...
 
U32BIT MHEG5tuneProcess (S_DvbLocator *pDvbLoc, S32BIT serviceIndex)
 
void MHEG5NotifyCarouselLoaded (S_DsmccEvent *param)
 
void MHEG5NotifyCarouselUnload (S_DsmccEvent *param)
 
BOOLEAN MHEG5isProcessingNDT (BOOLEAN *native_app_ok)
 
U8BIT MHEG5HandleEngineStopAction (U8BIT action)
 
BOOLEAN MHEG5engineIsCiAppRunning (void)
 
void MHEG5StartReboot (void *param)
 
void MHEG5Pause (void)
 
void MHEG5Resume (void)
 
void MHEG5RefreshStreams (U16BIT service_id)
 
void MHEG5RefreshDefaultAudio (void)
 

Detailed Description

(STB) can call directly. They build the interface to the MHEG5 engine. This file defines the api to the MHEG engine and the functions the engine needs from the system to run properly. All engine specific functions start with |MHEG5|, all system specific functions start with |OSD|.

Date
01/02/2002
Author
R.Freeman

Macro Definition Documentation

#define ENG_STAT_STRING ( )
Value:
(mheg_engine_status == ENG_STOPPED) ? "STOPPED" : \
(mheg_engine_status == ENG_DSM_STARTING) ? "STARTING DSM" : \
(mheg_engine_status == ENG_DSM_STARTED) ? "STARTED DSM" : \
(mheg_engine_status == ENG_CI_STARTING) ? "STARTING CI" : "STARTED CI"

Function Documentation

E_ChannelStartMode MHEG5_GetTuningInfoMode ( S32BIT  serviceIndex)

Get the current tuning mode for the target service. This is only relevant when MHEG5 has requested a tune, and DVB has not yet tuned to that service.

Get the current tuning mode for the target service. This is only relevant when MHEG5 has requested a tune, and DVB has not yet tuned to that service. The return value will be the same as that given back by next call to MHEG5_Start().

Parameters
serviceIndex"Service Index" for the new service
Returns
E_ChannelStartMode
void MHEG5_Terminate ( void  )

Terminate MHEG5 component.

Returns
none
void MHEG5engineDsmTerminate ( void  )

Force the engine to terminate any DSM-CC based MHEG application.

Returns
none
BOOLEAN MHEG5engineIsCiAppRunning ( void  )
Returns
TRUE if CI app exists
void MHEG5engineStart ( U8BIT *  app_name,
BOOLEAN  isCi,
BOOLEAN  special 
)

Start the engine with the initial application.

Parameters
app_nameName of initial application
isCiTRUE if started from StartCIApp
specialTRUE when special App (EPG/Info/Slist App)
Returns
void
void MHEG5engineTerminate ( void  )

Force the engine to terminate.

Returns
None.
E_MhegErr MHEG5Initialise ( S_MhegConfig cfg_params)

initialise MHEG5 component

Returns
MHERR_OK - success MHERR_INTERNAL - failure
MHEG5Bool MHEG5TuneIndex ( MHEG5Int  serviceIndex)

Ref: [1] - 3.10.6.2 Tune to the specified service. If the tuner fails to tune to the service it should attempt to return to the previous tuned service. If tuning to previously tuned service fails, the receiver shall allow the user to choose another service.

Parameters
serviceIndexThe service to which the tuner is to attempt to tune.
Returns
Boolean MHEG5TRUE - service available. MHEG5FALSE - service not available.
void MHEG5TuneIndexInfo ( MHEG5Int  tuneInfo)

Sets the way the application expects the receiver is to perform all subsequence application initiated tuning. Normal (0) means subsequent tuning will be performed as if the user had tuned via the remote control. Silently (1) means subsequent tuning will be performed without showing any OSD (channel info banner) and the user initiating a channel change will use the source channel as the reference point This function is used by the SI_TuneIndexInfo resident program. See UK1.06 profile section 3.10.6.4.

Parameters
tuneInfotuning information
Returns
TRUE if successful, else FALSE.