35 #include "mheg5_version.h" 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 88 const char *short_name;
89 const char *long_name;
90 MHEG5Bool (*
function)(
void *);
99 E_COUNTRY_PROFILE type;
104 MHEG5_SCALE_CAPS_QUARTER,
105 MHEG5_SCALE_CAPS_STANDARD,
106 MHEG5_SCALE_CAPS_DOUBLE,
107 MHEG5_SCALE_CAPS_HDGRAPHICS,
108 MHEG5_SCALE_CAPS_HDVIDEO,
109 MHEG5_SCALE_CAPS_HDGRAPHICS_AND_HDVIDEO
110 } E_ScalingCapabilities;
113 static MHEG5Bool UniversalEngineProfile(
void *str);
114 static MHEG5Bool HDExtension(
void *p_val);
115 static MHEG5Bool PVRFunction(
void *p_val);
116 static MHEG5Bool ICProfile(
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);
141 MHEG5Byte **pString);
146 {
"UEP",
"UniversalEngineProfile", UniversalEngineProfile, FUNC_TYPE_STRING },
147 {
"HDE",
"HDExtension", HDExtension, FUNC_TYPE_ONEINT },
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 },
154 {
"VSc",
"VideoScaling", VideoScaling, FUNC_TYPE_THRINT },
155 {
"BSc",
"BitmapScaling", BitmapScaling, FUNC_TYPE_THRINT },
156 {
"BFo",
"BitmapFormat", BitmapFormat, FUNC_TYPE_ONEINT },
157 {
"VDO",
"VideoDecodeOffset", VideoDecodeOffset, FUNC_TYPE_TWOINT },
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 },
174 { NULL, NULL, NULL, FUNC_TYPE_ERROR }
178 static char mheg5EngineString[10] =
"MHGDTV000";
179 static char dsmccEngineString[10] =
"DSMDTV000";
180 static char manufacturerString[10] =
"123456789";
182 static const char *buildRevisionString = BUILD_REVISION;
185 { 9, manufacturerString, TRUE, 0 },
186 { 9, mheg5EngineString, TRUE, 0 },
187 { 9, dsmccEngineString, TRUE, 0 },
193 static E_MHEG5_CAPABILITES receiver_caps = VC_DEFAULT;
196 #ifdef INCLUDE_CI_PLUS 197 { 9,
"CIPLUS001", TRUE, 0 },
199 { 4,
"1285", FALSE, CPROFILE_UK },
200 { 15,
"INT002001000000", TRUE, CPROFILE_NZ },
201 { 15,
"INTAUS001000000", TRUE, CPROFILE_AU },
202 { 15,
"INT003001000000", TRUE, CPROFILE_HK },
203 #ifdef INCLUDE_SA_PROFILE 204 { 14,
"INTZA001000000", TRUE, CPROFILE_SA },
206 #ifdef INCLUDE_FREESAT 207 { 4,
"1285", FALSE, CPROFILE_FREESAT }
211 static E_ProfileId current_profile;
212 static E_MHEG_PROFILE mheg_profile;
213 static MHEG5Int max_storage_file_len = UK_MAX_FILE_LEN;
214 static char user_agent[MAX_USER_AGENT];
220 const char* MHEG5VersionString(
void)
222 return MHEG5_VER_STRING;
225 const char* MHEG5RevisionString(
void)
227 return BUILD_REVISION;
237 E_MhegErr result = MHERR_OK;
241 pchr = pConfig->manufacturerString;
242 if (pchr == NULL || *pchr == 0)
244 result = MHERR_BAD_PARAMETER;
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;
261 receiver_caps = pConfig->capabilities;
264 #ifndef INCLUDE_MHEG_PVR 265 if (receiver_caps & VC_SUPPORT_MHEG_PVR)
267 DPL1((
"ERROR: PVR Extension not supported\n"));
268 result = MHERR_UNSUPPORTED_EXTENSION;
271 #ifndef INCLUDE_PVR_AU 272 if (receiver_caps & VC_SUPPORT_MHEG_AU_PVR)
274 DPL1((
"ERROR: PVR for Australia not supported\n"));
275 result = MHERR_UNSUPPORTED_EXTENSION;
279 mheg_profile = pConfig->countryProfile;
280 #ifndef INCLUDE_NZ_PROFILE 281 if (mheg_profile & CPROFILE_NZ)
283 DPL1((
"ERROR: New Zealand profile not supported\n"));
284 mheg_profile &= ~CPROFILE_NZ;
285 if (pConfig->countryProfile != CPROFILE_ALL)
287 result = MHERR_UNSUPPORTED_PROFILE;
291 #ifndef INCLUDE_AU_PROFILE 292 if (mheg_profile & CPROFILE_AU)
294 DPL1((
"ERROR: Australia profile not supported\n"));
295 mheg_profile &= ~CPROFILE_AU;
296 if (pConfig->countryProfile != CPROFILE_ALL)
298 result = MHERR_UNSUPPORTED_PROFILE;
302 #ifndef INCLUDE_SA_PROFILE 303 if (mheg_profile & CPROFILE_SA)
305 DPL1((
"ERROR: South Africa profile not supported\n"));
306 mheg_profile &= ~CPROFILE_SA;
307 if (pConfig->countryProfile != CPROFILE_ALL)
309 result = MHERR_UNSUPPORTED_PROFILE;
314 #ifdef INCLUDE_DSM_FG 315 if (mheg_profile & CPROFILE_SA)
317 if (pConfig->nvmSize < SA_NVM_MINIMUM_SIZE)
319 DPL1((
" MHEG5 SA profile nvmSize 0x%x >= 0x%x ?\n", pConfig->nvmSize, SA_NVM_MINIMUM_SIZE));
320 result = MHERR_BAD_NVM_SIZE;
323 else if (mheg_profile & CPROFILE_AU)
325 if (pConfig->nvmSize < AU_NVM_MINIMUM_SIZE)
327 DPL1((
" MHEG5 AU profile nvmSize 0x%x >= 0x%x ?\n", pConfig->nvmSize, AU_NVM_MINIMUM_SIZE));
328 result = MHERR_BAD_NVM_SIZE;
332 if (mheg_profile & CPROFILE_AU)
334 max_storage_file_len = AU_MAX_FILE_LEN;
336 #ifdef INCLUDE_FREESAT 337 if (mheg_profile & CPROFILE_FREESAT)
339 max_storage_file_len = FREESAT_MAX_FILE_LEN;
342 if (mheg_profile & CPROFILE_SA)
344 max_storage_file_len = SA_MAX_FILE_LEN;
347 #ifndef INCLUDE_FREESAT 348 if (mheg_profile & CPROFILE_FREESAT)
350 DPL1((
"ERROR: Freesat profile not supported\n"));
351 result = MHERR_UNSUPPORTED_PROFILE;
355 engine_strings[REV_STRING].whoami = FALSE;
358 #if (MHEG5_VER_MAJOR < 10) 359 mheg5EngineString[6] =
'0' + MHEG5_VER_MAJOR;
361 mheg5EngineString[6] =
'a' + MHEG5_VER_MAJOR - 0xa;
363 #if (MHEG5_VER_MINOR < 10) 364 mheg5EngineString[7] =
'0' + MHEG5_VER_MINOR;
366 mheg5EngineString[7] =
'a' + MHEG5_VER_MINOR - 0xa;
368 #if (MHEG5_VER_PATCH < 10) 369 mheg5EngineString[8] =
'0' + MHEG5_VER_PATCH;
371 mheg5EngineString[8] =
'a' + MHEG5_VER_PATCH - 0xa;
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;
395 engine_strings[REV_STRING].c_data = buildRevisionString;
396 engine_strings[REV_STRING].c_len = strlen(buildRevisionString);
407 return (U8BIT *)manufacturerString;
416 return (U8BIT *)mheg5EngineString;
425 if (receiver_caps & VC_SUPPORT_MHEG_INTERACTION_CHANNEL)
438 if (receiver_caps & (VC_SUPPORT_MHEG_IC_STREAMING | VC_SUPPORT_MHEG_IC_STREAMING_HD))
453 if (current_profile == PROFILE_BROADCAST &&
454 (mheg_profile & profile))
467 return (MG_IsHdSupported()) ? MHEG5TRUE : MHEG5FALSE;
476 return (!(receiver_caps & VC_HD_VIDEO_NOT_SUPPORTED)) ? MHEG5TRUE : MHEG5FALSE;
485 #ifdef INCLUDE_NATIVE_APP 486 if (receiver_caps & VC_SUPPORT_MHEG_NATIVE_APP)
500 #ifdef INCLUDE_MHEG_PVR 501 if (receiver_caps & VC_SUPPORT_MHEG_PVR)
515 #ifdef INCLUDE_SI_EXTENSION 530 current_profile = profile;
531 if (profile == PROFILE_BROADCAST)
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 );
595 if (feature.data[3] == OPEN_BRACKET || feature.len == 3)
598 while (table_item->short_name != NULL)
600 if (strncmp(table_item->short_name, (
char *)feature.data, 3) == 0)
611 while (flen != feature.len &&
612 feature.data[flen] !=
'\0' &&
613 feature.data[flen] != OPEN_BRACKET)
616 while (table_item->long_name != NULL)
618 if (strncmp(table_item->long_name, (
char *)feature.data, flen) == 0)
626 switch (table_item->func_type)
628 case FUNC_TYPE_ERROR:
633 if (table_item->function != NULL)
634 answer = table_item->function( &feature );
639 case FUNC_TYPE_STRING:
640 if (feature.data[flen] != OPEN_BRACKET ||
641 feature.data[feature.len - 1] != CLOSE_BRACKET)
647 assert( table_item->function != NULL );
648 feature.data += flen + 1;
649 feature.len -= flen + 2;
650 answer = table_item->function( &feature );
656 ftype = table_item->func_type;
657 assert( ftype >= FUNC_TYPE_ONEINT && ftype <= FUNC_TYPE_THRINT );
658 if (feature.data[flen] != OPEN_BRACKET ||
659 feature.data[feature.len] != CLOSE_BRACKET ||
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 736 added[i] = MHEG5TRUE;
739 #ifdef INCLUDE_CI_PLUS 742 added[i] = MHEG5FALSE;
747 #ifdef INCLUDE_CI_PLUS 749 if (!added[PRF_NDX_CIPLUS])
751 AddProfileStringLen(&profile_strings[PRF_NDX_CIPLUS], &whoAmI.len);
755 whoAmI.data = STR_DataAlloc( 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)
797 MHEG5Bool answer = MHEG5FALSE;
800 if (pFeature->len == 1 && *pFeature->data ==
'2')
806 for (i = 0; i != ENGINE_STRING_TOTAL; i++)
808 if (engine_strings[i].c_len == pFeature->len &&
809 memcmp(engine_strings[i].c_data, pFeature->data, pFeature->len) == 0)
815 if (i == ENGINE_STRING_TOTAL)
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)
827 if (profile_strings[PRF_NDX_UK].c_len == pFeature->len &&
828 memcmp(profile_strings[PRF_NDX_UK].c_data, pFeature->data, pFeature->len) == 0)
834 for (i = PRF_NDX_UK+1; i != PRF_TOTAL; i++)
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)
858 MHEG5Bool capable = MHEG5FALSE;
860 switch (*((
unsigned int *)p_val))
863 if (MG_IsHdSupported())
870 if (!(receiver_caps & VC_HD_VIDEO_NOT_SUPPORTED))
885 static MHEG5Bool PVRFunction(
void *p_val)
887 MHEG5Bool capable = MHEG5FALSE;
889 switch (*((
unsigned int *)p_val))
892 #ifdef INCLUDE_PVR_AU 893 if (receiver_caps & VC_SUPPORT_MHEG_AU_PVR)
901 #ifdef INCLUDE_MHEG_PVR 902 if (receiver_caps & VC_SUPPORT_MHEG_PVR)
917 static MHEG5Bool ICProfile(
void *p_val)
919 MHEG5Bool capable = MHEG5FALSE;
922 switch (*((
unsigned int *)p_val))
929 if ((receiver_caps & VC_SUPPORT_MHEG_IC_STREAMING) &&
938 if ((receiver_caps & VC_SUPPORT_MHEG_IC_STREAMING_HD) &&
947 if (receiver_caps & VC_SUPPORT_MHEG_INTERACTION_CHANNEL)
965 static MHEG5Bool IPStreamingProfile(
void *p_val)
967 MHEG5Bool capable = MHEG5FALSE;
969 switch (*((
unsigned int *)p_val))
972 #if defined(INCLUDE_IC) && defined(INCLUDE_ICS) && defined(INCLUDE_FREESAT) 973 if (receiver_caps & VC_SUPPORT_MHEG_IC_STREAMING)
990 static MHEG5Bool NonLinearPlaybackKeys(
void *v)
992 MHEG5Bool capable = MHEG5FALSE;
995 if ((receiver_caps & VC_SUPPORT_MHEG_IC_STREAMING) &&
996 (receiver_caps & VC_SUPPORT_NON_LINEAR_PLAYBACK_KEYS))
1010 static MHEG5Bool DownloadableFont(
void *p_val)
1012 MHEG5Bool capable = MHEG5FALSE;
1015 if (*((
unsigned int *)p_val) == 10)
1029 static MHEG5Bool CommonScaling(
unsigned int *p_uint)
1031 unsigned int scaleX, scaleY;
1032 MHEG5Bool capable = MHEG5TRUE;
1033 E_ScalingCapabilities scaling = MHEG5_SCALE_CAPS_QUARTER;
1046 scaling = MHEG5_SCALE_CAPS_STANDARD;
1049 scaling = MHEG5_SCALE_CAPS_DOUBLE;
1052 capable = MHEG5FALSE;
1055 #ifdef INCLUDE_FREESAT 1063 scaling = MHEG5_SCALE_CAPS_STANDARD;
1066 scaling = MHEG5_SCALE_CAPS_DOUBLE;
1069 capable = MHEG5FALSE;
1078 scaling = MHEG5_SCALE_CAPS_STANDARD;
1081 scaling = MHEG5_SCALE_CAPS_DOUBLE;
1084 capable = MHEG5FALSE;
1087 #ifdef INCLUDE_FREESAT 1093 scaling = MHEG5_SCALE_CAPS_STANDARD;
1096 scaling = MHEG5_SCALE_CAPS_DOUBLE;
1099 capable = MHEG5FALSE;
1107 scaling = MHEG5_SCALE_CAPS_STANDARD;
1113 scaling = MHEG5_SCALE_CAPS_DOUBLE;
1116 capable = MHEG5FALSE;
1125 scaling = MHEG5_SCALE_CAPS_DOUBLE;
1128 capable = MHEG5FALSE;
1138 scaling = MHEG5_SCALE_CAPS_DOUBLE;
1141 capable = MHEG5FALSE;
1145 capable = MHEG5FALSE;
1148 if (capable == MHEG5TRUE)
1150 if ((receiver_caps & VC_ONLY_SD_QUARTER_SCALING) &&
1151 (scaling != MHEG5_SCALE_CAPS_QUARTER))
1153 capable = MHEG5FALSE;
1155 else if ((receiver_caps & VC_ONLY_SD_STANDARD_SCALING) &&
1156 (scaling != MHEG5_SCALE_CAPS_QUARTER) &&
1157 (scaling != MHEG5_SCALE_CAPS_STANDARD))
1159 capable = MHEG5FALSE;
1170 static MHEG5Bool VideoScaling(
void *p_val)
1172 MHEG5Bool capable = MHEG5FALSE;
1173 unsigned int *p_uint = (
unsigned int *)p_val;
1178 case CHOOK_STREAM_IC:
1180 case CHOOK_STREAM_NORMAL:
1182 capable = CommonScaling( p_uint );
1194 static MHEG5Bool BitmapScaling(
void *p_val)
1196 MHEG5Bool capable = MHEG5FALSE;
1197 unsigned int *p_uint = (
unsigned int *)p_val;
1201 case CHOOK_BITMAP_H264_IFRAME:
1202 case CHOOK_BITMAP_NORMAL_IFRAME:
1204 capable = CommonScaling( p_uint );
1216 static MHEG5Bool BitmapFormat(
void *p_val)
1218 MHEG5Bool capable = MHEG5FALSE;
1220 switch (*((
unsigned int *)p_val))
1222 case CHOOK_BITMAP_NORMAL_IFRAME:
1223 capable = MHEG5TRUE;
1226 case CHOOK_BITMAP_PNG:
1227 capable = MHEG5TRUE;
1230 case CHOOK_BITMAP_JPG:
1231 capable = MHEG5TRUE;
1234 case CHOOK_BITMAP_H264_IFRAME:
1235 if (!(receiver_caps & VC_HD_VIDEO_NOT_SUPPORTED))
1237 capable = MHEG5TRUE;
1240 #ifdef INCLUDE_FREESAT 1241 case CHOOK_BITMAP_IMAGE_PLANE_IFRAME:
1244 capable = MHEG5TRUE;
1257 static MHEG5Bool VideoDecodeOffset(
void *p_val)
1259 MHEG5Bool capable = MHEG5FALSE;
1260 unsigned int *p_uint = (
unsigned int *)p_val;
1265 case CHOOK_STREAM_IC:
1267 case CHOOK_STREAM_NORMAL:
1270 (*p_uint == 1 && !(receiver_caps & VC_NO_VIDEO_OFF_SCREEN)))
1272 capable = MHEG5TRUE;
1285 static MHEG5Bool BitmapDecodeOffset(
void *p_val)
1287 MHEG5Bool capable = MHEG5FALSE;
1288 unsigned int *p_uint = (
unsigned int *)p_val;
1292 #ifdef INCLUDE_FREESAT 1293 case CHOOK_BITMAP_IMAGE_PLANE_IFRAME:
1298 case CHOOK_BITMAP_H264_IFRAME:
1299 case CHOOK_BITMAP_NORMAL_IFRAME:
1302 (*p_uint == 1 && !(receiver_caps & VC_NO_BITMAP_OFF_SCREEN)))
1304 capable = MHEG5TRUE;
1317 static MHEG5Bool SceneCoordinateSystem(
void *p_val)
1319 unsigned int *p_uint = (
unsigned int *)p_val;
1320 MHEG5Bool capable = MHEG5FALSE;
1326 capable = MHEG5TRUE;
1337 static MHEG5Bool SceneAspectRatio(
void *p_val)
1339 unsigned int *p_uint = (
unsigned int *)p_val;
1340 MHEG5Bool capable = MHEG5FALSE;
1347 capable = MHEG5TRUE;
1355 capable = MHEG5TRUE;
1369 static MHEG5Bool SubtitlesAndGraphics(
void *v)
1373 if (receiver_caps & VC_SUBTITLES_NOT_SIMULTANEOUS)
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)
1444 if (receiver_caps & VC_SUPPORT_OIPF_BROWSER_PROFILE)
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;
1537 MHEG5Byte **pString)
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";
1555 static BOOLEAN first = TRUE;
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;
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.
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...
void MG_SetMaxFonts(U16BIT max)
Set Max allowable fonts for profile.
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...
Mheg5 logging and debug printing.
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...
MHEG5Bool MH5_SupportHDGraphics(void)
Returns whether supporting HD Graphics extension.
MHEG5Bool MH5_SupportICStreaming(void)
Return whether Interaction channel Streaming is supported.
E_ProfileId MH5_GetCurrentProfile(void)
Get current profile - CI plus or broadcast.
Engine support utility functions for MHEG5.