MHEG5  15.3.0
include/mheg5_control.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2012 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  *******************************************************************************/
00050 #ifndef _MHEG5_CONTROL_H
00051 #define _MHEG5_CONTROL_H
00052 
00053 #include "techtype.h"
00054 #include "dvblocator.h"
00055 #include "mherrors.h"
00056 
00057 /*---Constant and macro definitions for public use-----------------------------*/
00058 
00059 /* Section buffer, buffer size (bytes) */
00060 #define SECTION_BUFFER_SIZE               (4 * 1024)
00061 
00062 /* Minimum section buffers */
00063 #define MHEG5_MIN_SECTION_BUFFERS           (100)
00064 
00065 /* Minimum task priority */
00066 #define MHEG5_MIN_TASK_PRIORITY           (4)
00067 
00068 #define NVM_STORE_SIZE_AU                 (64 * 1024)
00069 #define NVM_STORE_SIZE_SA                 (512 * 1024)
00070 #define AU_NVM_MINIMUM_SIZE               ((1024 * 1024 * 2) + NVM_STORE_SIZE_AU)
00071 #define SA_NVM_MINIMUM_SIZE               ((1024 * 1024 * 32) + NVM_STORE_SIZE_SA)
00072 
00073 /* Interaction Channel Streamer: buffer sizes (bytes) */
00074 #define ICS_DEFAULT_BUFFER_SIZE            (3 * 1024 * 1024)
00075 #define ICS_MINIMUM_BUFFER_SIZE            (768 * 1024)
00076 
00077 /* Values for colourDepth */
00078 #define COLOUR_FORMAT_PALETTE    8
00079 #define COLOUR_FORMAT_ARGB4444   16
00080 #define COLOUR_FORMAT_ARGB7888   31 /* ST based platform */
00081 #define COLOUR_FORMAT_ARGB8888   32
00082 
00083 /*---Enumerations for public use-----------------------------------------------*/
00084 
00085 typedef enum
00086 {
00087    CPROFILE_NONE,
00088 
00089    CPROFILE_UK = (1 << 0),     /* United Kingdom only */
00090    CPROFILE_NZ = (1 << 1),     /* New Zealand only */
00091    CPROFILE_AU = (1 << 2),     /* Australia only */
00092    CPROFILE_HK = (1 << 3),     /* Hong Kong only */
00093    CPROFILE_SA = (1 << 4),     /* South Africa only */
00094    CPROFILE_ALL = 0x1f,        /* all countries above (but not FreeSat) */
00095    CPROFILE_FREESAT = (1 << 8)   /* FreeSat profile only */
00096 } E_COUNTRY_PROFILE, E_MHEG_PROFILE;
00097 
00098 /*
00099  * Receiver Capabilities
00100  */
00101 typedef enum
00102 {
00103    VC_DEFAULT = 0,
00104 
00105    VC_SUPPORT_MHEG_NATIVE_APP = (1 << 0),
00106    VC_SUPPORT_MHEG_UK_PVR = (1 << 0),
00107    VC_SUPPORT_MHEG_PVR = (1 << 1),
00108    VC_SUPPORT_MHEG_NZ_PVR = (1 << 1),
00109    VC_SUPPORT_MHEG_AU_PVR = (1 << 2),
00110    VC_SUPPORT_MHEG_INTERACTION_CHANNEL = (1 << 3),
00111    VC_SUPPORT_MHEG_IC_STREAMING = (1 << 4),
00112    VC_SUPPORT_NON_LINEAR_PLAYBACK_KEYS = (1 << 5),
00113    VC_SUPPORT_MHEG_IC_STREAMING_HD = (1 << 6),
00114    VC_SUPPORT_OIPF_BROWSER_PROFILE = (1 << 7),
00115 
00116 /* Unless VC_HD_VIDEO_NOT_SUPPORTED is set, it is assumed that the receiver
00117  * can and must support decoding of:
00118  *    1.  H.264 video/iframes
00119  *    2.  HE-AAC audio
00120  *    3.  E-AC3 audio. */
00121    VC_HD_VIDEO_NOT_SUPPORTED = (1 << 17),
00122 
00123 /* Unless VC_SUBT_NOT_SIMULTANEOUS is set, it is assumed the receiver can present
00124  * DVB subtitles and presentation engine Visibles simultaneously,
00125  * without restriction (see [1] 16.5.1.1) */
00126    VC_SUBTITLES_NOT_SIMULTANEOUS = (1 << 18),
00127 
00128    /* The following MHEG SD scalings are unlikely to be specified, but are here for completeness */
00129    VC_NO_VIDEO_OFF_SCREEN = (1 << 27),
00130    VC_NO_BITMAP_OFF_SCREEN = (1 << 28),
00131    VC_ONLY_SD_DOUBLE_SCALING = (1 << 29),
00132    VC_ONLY_SD_STANDARD_SCALING = (1 << 30),
00133    VC_ONLY_SD_QUARTER_SCALING = (1 << 31)
00134 } E_MHEG5_CAPABILITES;
00135 
00136 typedef enum
00137 {
00138    /* Display banner and new channel info to user to indicate that channel has changed */
00139    CHANNEL_START_NORMAL,
00140 
00141    /* No banner displayed, act to user as though on original channel */
00142    CHANNEL_START_QUIETLY,
00143 
00144    /* No banner displayed, but still show new channel info to user */
00145    CHANNEL_START_QUIET_SHOW_INFO,
00146 } E_ChannelStartMode;
00147 
00148 /*---Global type defs for public use-------------------------------------------*/
00149 
00150 /* MHEG5 engine setup structure */
00151 typedef struct
00152 {
00153    /* MHEG5 engine task priority value - passed to STB_OSCreateTask
00154     * The specified task priority value is used by the main task for MHEG5 engine
00155     * MHEG5 engine's timer task is 2 levels ABOVE this
00156     */
00157    U32BIT taskPriority;
00158 
00159    /*
00160     * Receiver Capabilities - as given by E_MHEG5_CONFIG above
00161     */
00162    E_MHEG5_CAPABILITES capabilities;
00163 
00164    /*
00165     * Screen resolution parameters - required by MHEG5 engine graphics
00166     */
00167    U16BIT screenWidth;
00168    U16BIT screenHeight;
00169    U8BIT colourDepth;
00170 
00171    /* Manufacturer string (passed to MHEG) indicating hardware and software specific
00172     * support.
00173     * Format: mmmcccvvv
00174     *      Where:
00175     *          mmm = unique manufacturer name
00176     *          ccc = unique model code
00177     *          vvv = principal version
00178     */
00179    U8BIT *manufacturerString;
00180 
00181    /*
00182     * Country profile support required
00183     * Set to CPROFILE_NONE if only require HbbTv support
00184     */
00185    E_COUNTRY_PROFILE countryProfile;
00186 
00187    /* Size of Non-Volitile Memory file system for caching broadcast data
00188     * MHEG5 Australia profile requires a minimum of 2MB plus 64K.
00189     * MHEG5 South Africa profile requires minimum of 32MB plus 512K.
00190     * MHEG5 engine monitors the size of the cached data and ensures that the limit
00191     * is not exceeded.
00192     */
00193    U32BIT nvmSize;
00194 
00195    /* IP streamer buffer
00196     *
00197     * Streaming content from IP connection requires a buffer. The size is
00198     * not specified, but the MHEG-5 component is not allowed to buffer more
00199     * than 3 Megabytes.
00200     *
00201     * The size affects the ability of the receiver to deal with jitter and
00202     * variable bitrate. Minimum size is 768 Kbytes.
00203     * Less than minimum size, or NULL will disable IP streaming.
00204     */
00205    void *streamerBuffer;
00206    U32BIT streamerBufferSize;
00207 
00208    /*
00209     * Pointer to version string as defined by macro "MHEG5_VER_STRING"
00210     */
00211    const char *version_string;
00212 } S_MhegConfig;
00213 
00214 /*---Global Function prototypes for public use---------------------------------*/
00215 
00236 E_MhegErr MHEG5_Open( S_MhegConfig *pSetup );
00237 
00246 E_MhegErr MHEG5_Close(void);
00247 
00267 E_MhegErr MHEG5_Start( S32BIT serviceIndex, E_ChannelStartMode *quietMode );
00268 
00277 E_MhegErr MHEG5_Stop( void );
00278 
00291 E_MhegErr MHEG5_Suspend( void );
00292 
00303 E_MhegErr MHEG5_Pause(void);
00304 
00315 E_MhegErr MHEG5_Resume(void);
00316 
00331 E_MhegErr MHEG5_SetScreenResolution( U16BIT screenWidth, U16BIT screenHeight );
00332 
00346 E_MhegErr MHEG5_SetSurfaceThreshold(S32BIT pixels);
00347 
00353 void MHEG5_RestoreScreen(void);
00354 
00359 void* MHEG5_DsmccInstance(void);
00360 
00369 E_ChannelStartMode MHEG5_GetTuningInfoMode( S32BIT serviceIndex );
00370 
00371 #endif /* _PM_CONTROL_H */
 All Data Structures Files Functions Variables Typedefs Defines