39 #define FUNC_TYPE_NONE 0 40 #define FUNC_TYPE_ONEINT 1 41 #define FUNC_TYPE_TWOINT 2 42 #define FUNC_TYPE_THRINT 3 43 #define FUNC_TYPE_STRING 5 44 #define FUNC_TYPE_ERROR 0xff 46 #define OPEN_BRACKET '(' 47 #define CLOSE_BRACKET ')' 49 #define ENGINE_STRING_TOTAL 4 51 #define MAX_USER_AGENT 255 53 #define FREESAT_MAX_FILE_LEN (256 * 1024) 54 #define UK_MAX_FILE_LEN 1024 55 #define AU_MAX_FILE_LEN (64 * 1024) 56 #define SA_MAX_FILE_LEN (512 * 1024) 62 #ifdef INCLUDE_CI_PLUS 69 #ifdef INCLUDE_SA_PROFILE 72 #ifdef INCLUDE_FREESAT 113 static MHEG5Bool UniversalEngineProfile(
void *str);
114 static MHEG5Bool HDExtension(
void *p_val);
115 static MHEG5Bool PVRFunction(
void *p_val);
117 static MHEG5Bool IPStreamingProfile(
void *p_val);
118 static MHEG5Bool NonLinearPlaybackKeys(
void *v);
119 static MHEG5Bool DownloadableFont(
void *p_val);
120 static MHEG5Bool VideoScaling(
void *p_val);
121 static MHEG5Bool BitmapScaling(
void *p_val);
122 static MHEG5Bool BitmapFormat(
void *p_val);
123 static MHEG5Bool VideoDecodeOffset(
void *p_val);
124 static MHEG5Bool BitmapDecodeOffset(
void *p_val);
125 static MHEG5Bool SceneCoordinateSystem(
void *p_val);
126 static MHEG5Bool SceneAspectRatio(
void *p_val);
127 static MHEG5Bool SubtitlesAndGraphics(
void *v);
128 static MHEG5Bool MultipleVideoStreams(
void *p_val);
129 static MHEG5Bool MultipleAudioStreams(
void *p_val);
130 #ifdef INCLUDE_DEBUG_PACKAGE 131 static MHEG5Bool DebugPackageSupport(
void *p_val);
133 #ifdef INCLUDE_CONNECTED_TV 134 static MHEG5Bool ConnectedTVExtension(
void* p_val);
135 static MHEG5Bool ApplicationLaunchExtension(
void* p_val);
146 {
"UEP",
"UniversalEngineProfile", UniversalEngineProfile,
FUNC_TYPE_STRING },
148 {
"HDG",
"HDGraphics", HDExtension, FUNC_TYPE_ONEINT },
149 {
"PVR",
"PVR", PVRFunction, FUNC_TYPE_ONEINT },
150 {
"ICP",
"ICProfile", ICProfile, FUNC_TYPE_ONEINT },
151 {
"IPS",
"IPStreamingProfile", IPStreamingProfile, FUNC_TYPE_ONEINT },
152 {
"NLK",
"NonLinearPlaybackKeys", NonLinearPlaybackKeys,
FUNC_TYPE_NONE },
153 {
"DLF",
"DownloadableFont", DownloadableFont, FUNC_TYPE_ONEINT },
155 {
"BSc",
"BitmapScaling", BitmapScaling, FUNC_TYPE_THRINT },
156 {
"BFo",
"BitmapFormat", BitmapFormat, FUNC_TYPE_ONEINT },
158 {
"BDO",
"BitmapDecodeOffset", BitmapDecodeOffset, FUNC_TYPE_TWOINT },
159 {
"SCS",
"SceneCoordinateSystem", SceneCoordinateSystem, FUNC_TYPE_TWOINT },
160 {
"SAR",
"SceneAspectRatio", SceneAspectRatio, FUNC_TYPE_TWOINT },
161 {
"SAG",
"SubtitlesAndGraphics", SubtitlesAndGraphics, FUNC_TYPE_NONE },
162 {
"Clo",
"Cloning", NULL, FUNC_TYPE_NONE },
163 {
"ASt",
"ApplicationStacking", NULL, FUNC_TYPE_NONE },
164 {
"OvV",
"OverlappingVisibles", NULL, FUNC_TYPE_NONE },
165 {
"MVS",
"MultipleVideoStreams", MultipleVideoStreams, FUNC_TYPE_ONEINT },
166 {
"MAS",
"MultipleAudioStreams", MultipleAudioStreams, FUNC_TYPE_ONEINT },
167 #ifdef INCLUDE_DEBUG_PACKAGE 168 {
"DPS",
"DebugPackageSupport", DebugPackageSupport, FUNC_TYPE_NONE },
170 #ifdef INCLUDE_CONNECTED_TV 171 {
"CTV",
"ConnectedTVExtension", ConnectedTVExtension, FUNC_TYPE_ONEINT },
172 {
"ApE",
"ApplicationLaunchExtension", ApplicationLaunchExtension, FUNC_TYPE_STRING },
178 static char mheg5EngineString[10] =
"MHGDTV000";
179 static char dsmccEngineString[10] =
"DSMDTV000";
180 static char manufacturerString[10] =
"123456789";
185 { 9, manufacturerString,
TRUE, 0 },
186 { 9, mheg5EngineString,
TRUE, 0 },
187 { 9, dsmccEngineString,
TRUE, 0 },
196 #ifdef INCLUDE_CI_PLUS 197 { 9,
"CIPLUS001",
TRUE, 0 },
203 #ifdef INCLUDE_SA_PROFILE 206 #ifdef INCLUDE_FREESAT 242 if (pchr == NULL || *pchr == 0)
248 for (ndx = 0; ndx != 10; ndx++)
252 engine_strings[0].
c_len = ndx;
255 manufacturerString[ndx] = pchr[ndx];
257 for (; ndx != 10; ndx++)
259 manufacturerString[ndx] = 0;
264 #ifndef INCLUDE_MHEG_PVR 267 DPL1((
"ERROR: PVR Extension not supported\n"));
271 #ifndef INCLUDE_PVR_AU 274 DPL1((
"ERROR: PVR for Australia not supported\n"));
280 #ifndef INCLUDE_NZ_PROFILE 283 DPL1((
"ERROR: New Zealand profile not supported\n"));
284 mheg_profile &= ~CPROFILE_NZ;
291 #ifndef INCLUDE_AU_PROFILE 294 DPL1((
"ERROR: Australia profile not supported\n"));
295 mheg_profile &= ~CPROFILE_AU;
302 #ifndef INCLUDE_SA_PROFILE 305 DPL1((
"ERROR: South Africa profile not supported\n"));
306 mheg_profile &= ~CPROFILE_SA;
314 #ifdef INCLUDE_DSM_FG 315 if (mheg_profile & CPROFILE_SA)
323 else if (mheg_profile & CPROFILE_AU)
332 if (mheg_profile & CPROFILE_AU)
336 #ifdef INCLUDE_FREESAT 342 if (mheg_profile & CPROFILE_SA)
347 #ifndef INCLUDE_FREESAT 348 if (mheg_profile & CPROFILE_FREESAT)
350 DPL1((
"ERROR: Freesat profile not supported\n"));
358 #if (MHEG5_VER_MAJOR < 10) 363 #if (MHEG5_VER_MINOR < 10) 368 #if (MHEG5_VER_PATCH < 10) 376 #if (DSMCC_VER_MAJOR < 10) 377 dsmccEngineString[6] =
'0' + DSMCC_VER_MAJOR;
379 dsmccEngineString[6] =
'a' + DSMCC_VER_MAJOR - 0xa;
381 #if (DSMCC_VER_MINOR < 10) 382 dsmccEngineString[7] =
'0' + DSMCC_VER_MINOR;
384 dsmccEngineString[7] =
'a' + DSMCC_VER_MINOR - 0xa;
386 #if (DSMCC_VER_PATCH < 10) 387 dsmccEngineString[8] =
'0' + DSMCC_VER_PATCH;
389 dsmccEngineString[8] =
'a' + DSMCC_VER_PATCH - 0xa;
407 return (
U8BIT *)manufacturerString;
416 return (
U8BIT *)mheg5EngineString;
454 (mheg_profile & profile))
485 #ifdef INCLUDE_NATIVE_APP 500 #ifdef INCLUDE_MHEG_PVR 515 #ifdef INCLUDE_SI_EXTENSION 530 current_profile = profile;
553 return current_profile;
576 return max_storage_file_len;
588 unsigned int values[3] = { 0, 0, 0 };
589 unsigned int *p_value;
592 assert( feature.
len > 2 );
593 assert( feature.
data != NULL );
600 if (strncmp(table_item->
short_name, (
char *)feature.
data, 3) == 0)
611 while (flen != feature.
len &&
612 feature.
data[flen] !=
'\0' &&
618 if (strncmp(table_item->
long_name, (
char *)feature.
data, flen) == 0)
634 answer = table_item->
function( &feature );
647 assert( table_item->
function != NULL );
648 feature.
data += flen + 1;
649 feature.
len -= flen + 2;
650 answer = table_item->
function( &feature );
660 feature.
len < flen + (ftype << 1))
666 assert( table_item->
function != NULL );
669 while (flen != feature.
len)
671 if (feature.
data[flen] >=
'0' && feature.
data[flen] <=
'9')
673 *p_value = ((*p_value) * 10) + (feature.
data[flen] -
'0');
675 else if (feature.
data[flen] ==
',')
688 if (flen != feature.
len || ftype != 1)
695 assert( table_item->
function != NULL );
696 answer = table_item->
function( values );
714 size_t engine_strings_total;
715 size_t profile_strings_total;
716 #ifdef INCLUDE_CI_PLUS 717 MHEG5Boolean added[
sizeof(profile_strings) /
sizeof(*profile_strings)];
720 engine_strings_total =
sizeof(engine_strings) /
sizeof(*engine_strings);
721 profile_strings_total =
sizeof(profile_strings) /
sizeof(*profile_strings);
724 for (i = 0; i < engine_strings_total; i++)
726 AddProfileStringLen(&engine_strings[i], &whoAmI.
len);
730 for (i = 0; i != profile_strings_total; i++)
732 if (profile_strings[i].type & mheg_profile)
734 AddProfileStringLen(&profile_strings[i], &whoAmI.
len);
735 #ifdef INCLUDE_CI_PLUS 739 #ifdef INCLUDE_CI_PLUS 747 #ifdef INCLUDE_CI_PLUS 749 if (!added[PRF_NDX_CIPLUS])
751 AddProfileStringLen(&profile_strings[PRF_NDX_CIPLUS], &whoAmI.
len);
756 if (whoAmI.
data != NULL)
759 for (i = 0; i < engine_strings_total; i++)
761 AppendProfileString(&engine_strings[i], &pstr);
764 for (i = 0; i != profile_strings_total; i++)
766 if (profile_strings[i].type & mheg_profile)
768 AppendProfileString(&profile_strings[i], &pstr);
772 #ifdef INCLUDE_CI_PLUS 773 if (!added[PRF_NDX_CIPLUS])
775 AppendProfileString(&profile_strings[PRF_NDX_CIPLUS], &pstr);
794 static MHEG5Bool UniversalEngineProfile(
void *p_str)
800 if (pFeature->
len == 1 && *pFeature->
data ==
'2')
808 if (engine_strings[i].c_len == pFeature->
len &&
809 memcmp(engine_strings[i].c_data, pFeature->
data, pFeature->
len) == 0)
817 #ifdef INCLUDE_CI_PLUS 818 if (profile_strings[PRF_NDX_CIPLUS].c_len == pFeature->
len &&
819 memcmp(profile_strings[PRF_NDX_CIPLUS].c_data, pFeature->
data, pFeature->
len) == 0)
836 if ((profile_strings[i].type & mheg_profile) &&
837 profile_strings[i].
c_len == pFeature->
len &&
838 memcmp(profile_strings[i].c_data, pFeature->
data, pFeature->
len) == 0)
856 static MHEG5Bool HDExtension(
void *p_val)
860 switch (*((
unsigned int *)p_val))
885 static MHEG5Bool PVRFunction(
void *p_val)
889 switch (*((
unsigned int *)p_val))
892 #ifdef INCLUDE_PVR_AU 901 #ifdef INCLUDE_MHEG_PVR 922 switch (*((
unsigned int *)p_val))
965 static MHEG5Bool IPStreamingProfile(
void *p_val)
969 switch (*((
unsigned int *)p_val))
972 #if defined(INCLUDE_IC) && defined(INCLUDE_ICS) && defined(INCLUDE_FREESAT) 990 static MHEG5Bool NonLinearPlaybackKeys(
void *v)
1010 static MHEG5Bool DownloadableFont(
void *p_val)
1015 if (*((
unsigned int *)p_val) == 10)
1029 static MHEG5Bool CommonScaling(
unsigned int *p_uint)
1031 unsigned int scaleX, scaleY;
1055 #ifdef INCLUDE_FREESAT 1087 #ifdef INCLUDE_FREESAT 1170 static MHEG5Bool VideoScaling(
void *p_val)
1173 unsigned int *p_uint = (
unsigned int *)p_val;
1182 capable = CommonScaling( p_uint );
1194 static MHEG5Bool BitmapScaling(
void *p_val)
1197 unsigned int *p_uint = (
unsigned int *)p_val;
1204 capable = CommonScaling( p_uint );
1216 static MHEG5Bool BitmapFormat(
void *p_val)
1220 switch (*((
unsigned int *)p_val))
1240 #ifdef INCLUDE_FREESAT 1241 case CHOOK_BITMAP_IMAGE_PLANE_IFRAME:
1257 static MHEG5Bool VideoDecodeOffset(
void *p_val)
1260 unsigned int *p_uint = (
unsigned int *)p_val;
1285 static MHEG5Bool BitmapDecodeOffset(
void *p_val)
1288 unsigned int *p_uint = (
unsigned int *)p_val;
1292 #ifdef INCLUDE_FREESAT 1293 case CHOOK_BITMAP_IMAGE_PLANE_IFRAME:
1317 static MHEG5Bool SceneCoordinateSystem(
void *p_val)
1319 unsigned int *p_uint = (
unsigned int *)p_val;
1337 static MHEG5Bool SceneAspectRatio(
void *p_val)
1339 unsigned int *p_uint = (
unsigned int *)p_val;
1369 static MHEG5Bool SubtitlesAndGraphics(
void *v)
1385 static MHEG5Bool MultipleVideoStreams(
void *p_val)
1387 if (*((
unsigned int *)p_val) <= 1)
1399 static MHEG5Bool MultipleAudioStreams(
void *p_val)
1401 if (*((
unsigned int *)p_val) <= 1)
1408 #ifdef INCLUDE_DEBUG_PACKAGE 1416 static MHEG5Bool DebugPackageSupport(
void *p_val)
1423 #ifdef INCLUDE_CONNECTED_TV 1440 static MHEG5Bool ConnectedTVExtension(
void* p_val)
1442 if( *((
unsigned int*)p_val) == 0)
1468 static MHEG5Bool ApplicationLaunchExtension(
void* p_str)
1475 if (pFeature->
len == 1 && *pFeature->
data ==
'0')
1483 else if (pFeature->
len == 2 && memcmp(pFeature->
data,
"-1", 2) == 0)
1495 memcpy(buffer, pFeature->
data, pFeature->
len);
1496 buffer[pFeature->
len] = 0;
1518 if (profile_string->
c_len > 0 && profile_string->
whoami)
1526 *length += profile_string->
c_len;
1539 if (profile_string->
c_len > 0 && profile_string->
whoami)
1541 memcpy(*pString, profile_string->
c_data, profile_string->
c_len);
1542 (*pString) += profile_string->
c_len;
1554 static char *uk_mheg =
"UK-MHEG/1285";
1556 U8BIT *manufacturer;
1557 U8BIT *mheg5_engine;
1562 strcpy(user_agent, uk_mheg);
1563 offset = strlen(uk_mheg);
1565 user_agent[offset] =
' ';
1569 memcpy(user_agent + offset, manufacturer, 6);
1571 user_agent[offset] =
'/';
1573 memcpy(user_agent + offset, manufacturer + 6, 3);
1576 user_agent[offset] =
' ';
1580 memcpy(user_agent + offset, mheg5_engine, 6);
1582 user_agent[offset] =
'/';
1584 memcpy(user_agent + offset, mheg5_engine + 6, 3);
1587 user_agent[offset] =
'\0';
1590 return (
U8BIT *)user_agent;
#define FREESAT_MAX_FILE_LEN
MHEG5Bool MH5_SupportInteractionChannel(void)
Return whether Interaction channel is supported by current profile.
MHEG5Bool MH5_SupportServiceInfoExtension(void)
Return whether Service Info extension is supported.
MHEG5Bool MH5_SupportNativeApplication(void)
Return whether Native Application extension is supported.
U8BIT * manufacturerString
#define ENGINE_STRING_TOTAL
MHEG5Bool MH5_SupportFontClass(void)
Return whether font class is supported by current profile.
MHEG5Int MH5_MaxStorageFileLength(void)
Return maximum length of file for persistent storage depending on supported profiles (e...
E_MhegErr MH5_SupportInitialise(S_MhegConfig *pConfig)
Initialise support module - called when 'Open' engine.
MHEG5Bool MH5_SupportHDVideo(void)
Returns whether supporting HD Video extension.
E_MhegErr DVB_MhegGetMimeTypeSupport(U8BIT *mimeType, BOOLEAN *supported)
Checks whether the receiver supports launching applications whose MIME type is the value given by thi...
#define CHOOK_STREAM_NORMAL
unsigned char * STR_DataAlloc(unsigned int size)
#define CHOOK_BITMAP_NORMAL_IFRAME
E_COUNTRY_PROFILE countryProfile
void MG_SetMaxFonts(U16BIT max)
Set Max allowable fonts for profile.
#define CHOOK_BITMAP_H264_IFRAME
const char * MHEG5RevisionString(void)
This file provides the control interface for MHEG5 engine. The use of this component MUST comply with...
MHEG5Bool MH5_SupportMhegProfile(E_MHEG_PROFILE profile)
Return whether Mheg profile (UK, NZ, AU, HK, SA, FREESAT) is currently supported. ...
This file defines the profile for the MHEG engine.
U8BIT * MH5_GetUserAgent(void)
Return the "User Agent" string for the engine.
MHEG5Bool MH5_SupportPVRExtension(void)
Return whether PVR extension (ETSI, and originally NZ) is supported.
U8BIT * MH5_GetManufacturerString(void)
Returns a pointer to a manufacturer specific platform U8BIT*.
MHEG5Bool MH5_GetEngineSupport(MHEG5String feature)
Used by the GetEngineSupport action.
void MH5_SetCurrentProfile(E_ProfileId profile)
Set current profile - CI plus or broadcast (Could extend this fnc to distuinguish between UK/HK/NZ/AU...
enum E_COUNTRY_PROFILE E_MHEG_PROFILE
MHEG5Bool(* function)(void *)
Mheg5 logging and debug printing.
E_MHEG5_CAPABILITES capabilities
Font file handling with the Freetype.
U8BIT * MH5_GetEngineVersionString(void)
Returns a pointer to the engine version string U8BIT*.
MHEG5String MH5_WhoAmI(void)
Used by the WhoAmI resident program to obtain WhoAmI string. See UK1.06 profile section 3...
struct s_EngineSupportTable S_EngineSupportTable
MHEG5Bool MH5_SupportHDGraphics(void)
Returns whether supporting HD Graphics extension.
MHEG5Bool MH5_SupportICStreaming(void)
Return whether Interaction channel Streaming is supported.
const char * MHEG5VersionString(void)
BOOLEAN MG_IsHdSupported(void)
E_ProfileId MH5_GetCurrentProfile(void)
Get current profile - CI plus or broadcast.
#define AU_NVM_MINIMUM_SIZE
#define SA_NVM_MINIMUM_SIZE
Engine support utility functions for MHEG5.