MHEG5  18.9.0
MHEG5 Documentation
mh5scene.c
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
31 /*---includes for this file--------------------------------------------------*/
32 #include <string.h>
33 
34 #include "mh5base.h"
35 #include "mh5profile.h"
36 #include "mh5scene.h"
37 #include "mh5object.h" /* for actions */
38 #include "mh5gate.h"
39 #include "mh5variable.h" /* for actions */
40 #include "mh5memory.h" /* for constructor/destructor */
41 #include "tmcursor.h" /* for CursorEffects */
42 #include "mh5application.h" /* get currentApplication */
43 #include "mh5display.h" /* for display of Initial Obj. */
44 #include "mh5final.h" /* for deactivation etc, */
45 #include "mh5cursorshape.h" /* for actions */
46 #include "mh5queue.h" /* Events */
47 #include "mh5fileorm.h"
48 #include "mh5keypress.h"
49 #include "mh5debug.h"
50 #include "dvb_video.h"
51 #include "dvb_misc.h"
52 #include "mg_osd.h"
53 
54 #include "fpa1_parserInvoke.h"
55 
56 #ifdef ASN1TEST
57 #include "asn1_testHarness.h"
58 #endif /* ASN1TEST */
59 
60 
61 
62 /*---local typedef structs for this file-------------------------------------*/
63 
64 /*---local (static) variable declarations for this file----------------------*/
65 
66 static MHEG5Scene *currentScene = 0;
67 
68 /*---local function definitions----------------------------------------------*/
69 
70 /*---global function definitions---------------------------------------------*/
71 
72 
73 #ifdef MH5PRINTOUT
74 extern int mheg_trace_source;
81 void MHEG5scenePrint(MHEG5Scene *scene, char *out)
82 {
83  MHEG5String path;
84  int save_indent = MHEG5setIndent(0);
85 
86  path = MHEG5convertGID(&scene->group.groupName);
87  STB_DebugLogOpen( path.data );
88  MHEG5stringDestruct(&path);
89 
90  /* inherited classes */
91  MHEG5groupPrint(&scene->group, out);
92 
93  /* exchanged attributes */
94  MHEG5indent(out);
95  MHEG_PRINT(out, ":InputEventReg ");
96  MHEG5intPrint(scene->inputEventRegister, out);
97  MHEG5newLine(out);
98 
99  MHEG5indent(out);
100  MHEG_PRINT(out, ":SceneCS ");
101  MHEG5intPrint(scene->sceneCoordinateSystem[0], out);
102  MHEG_PRINT(out, " ");
103  MHEG5intPrint(scene->sceneCoordinateSystem[1], out);
104  MHEG5newLine(out);
105 
106  if (scene->aspectRatio != ASPECT_UNDEFINED)
107  {
108  MHEG5indent(out);
109  MHEG_PRINT(out, ":AspectRatio ");
110  MHEG5intPrint(scene->aspectRatio, out);
111  MHEG5newLine(out);
112  }
113 
114  if (scene->movingCursor)
115  {
116  MHEG5indent(out);
117  MHEG_PRINT(out, ":MovingCursor :GBoolean true");
118  MHEG5newLine(out);
119  }
120  if (scene->nextScenes.params)
121  {
122  MHEG5indent(out);
123  MHEG_PRINT(out, ":NextScenes ");
124  MHEG5gListPrint(scene->nextScenes.params, out, 255);
125  MHEG5newLine(out);
126  }
127 
128  MHEG5decIndent();
129  MHEG5indent(out);
130  MHEG_PRINT(out, "}");
131  MHEG5newLine(out);
132 
133  STB_DebugLogClose();
134  MHEG5setIndent(save_indent);
135 }
136 
137 #endif /* MH5PRINTOUT */
138 
146 static void MHEG5sceneParseNextScenes(MHEG5GList *nextScenes)
147 {
148  MHEG5GList *nextScene;
149 
150  nextScene = nextScenes;
151  while (nextScene)
152  {
153  MHEG5String groupID;
154 
155  /* The first entry in the list should be an open bracket */
156  if (nextScene->generic.type != MHEG5BRACKETOPEN)
157  {
158  ERROR_PRINT(("ERROR: NextScene parsing expected a (\n"));
159  break;
160  }
161  nextScene = nextScene->next;
162 
163  /* The next entry is an octet string containing the group identifier
164  * of a scene object that may be displayed after the current one
165  */
166  if ((nextScene == 0) ||
167  (nextScene->generic.type != MHEG5OCTETSTRING))
168  {
169  ERROR_PRINT(("ERROR: NextScene parsing expected an OctetString\n"));
170  break;
171  }
172  groupID = nextScene->generic.value.s;
173  nextScene = nextScene->next;
174 
175  /* The next entry is an integer value in the range [0,255] representing
176  * the weight factor with which this scene might be used.
177  */
178  if ((nextScene == 0) ||
179  (nextScene->generic.type != MHEG5INT))
180  {
181  ERROR_PRINT(("ERROR: NextScene parsing expected an integer\n"));
182  break;
183  }
184  nextScene = nextScene->next;
185 
186  /* Last entry should be a close bracket */
187  if ((nextScene == 0) ||
188  (nextScene->generic.type != MHEG5BRACKETCLOSE))
189  {
190  ERROR_PRINT(("ERROR: NextScene parsing expected an OctetString\n"));
191  break;
192  }
193  nextScene = nextScene->next;
194 
195  /* This was a valid sequence. Pass the group ID onto DSM-CC so that it
196  * can prefetch the next scene.
197  */
198  MHEG5FileOrmPreloadHint(groupID);
199  }
200 }
201 
208 {
209  return currentScene;
210 }
211 
219 static void MHEG5sceneRetrieved( void *userData, S_CONTENT *content )
220 {
222  MHEG5Ingredient *item;
223  MHEG5Scene *newScene;
224  MHEG5String path;
225 
226  USE_UNWANTED_PARAM(userData);
227 
228  assert( app );
229  assert( content );
230  assert( content->data );
231 
232  TRACE(TFILE | TEVNTS, ("Got Scene (datalen=%ld)", content->size))
233  /* Event processing was disabled when the file load was initiated. Re-enable
234  * event processing now to allow queued actions to execute.
235  */
237 
238  TRACE_MEM();
239 
240  /* Parse Scene */
241  if (*(content->data) == 0xA1) /* ASN1 */
242  {
243  newScene = asn1_parseScene( content->data, content->size );
244 
245  #ifdef MH5PRINTOUT
246  if (mheg_trace_source)
247  MHEG5scenePrint(newScene, 0);
248  #endif
249  }
250  else /* TEXT */
251  {
252  TRACE(TERROR, ("This scene is Text, and not ASN1 encoded!"))
253  newScene = NULL;
254  }
255 
256  if (newScene != NULL)
257  {
259 
260  /* Lock screen to prevent visibles being erased one at a time */
261  app->lockCount++;
262  item = app->group.itemTail;
263  while (item)
264  {
265  if (item->shared == MHEG5FALSE)
266  {
267  MHEG5finalDeactivate(&item->root);
268  }
269  item = item->prev;
270  }
271  /* Unlock the screen. At this stage all visibles have been destructed */
272  app->lockCount--;
273 
274  /* Destroy the old scene */
275  if (currentScene)
276  {
277  MHEG5Scene *scene;
278 
279  scene = currentScene;
280 
281  MHEG5sceneDeactivate(scene);
282 
283  /* An Scene transition constitutes a context change, as defined in
284  * section 53.3 of ISO/IEC13522-5. This causes pending elementary actions
285  * and events, which were sourced from that scene, to be destroyed.
286  */
287  MHEG5queueResetScene((MHEG5Root *)scene );
288 
289  /* If the application contains actions with scene ingredients
290  * as targets, now is a good time to "unresolve" these targets.
291  * Note that this shouldn't happen according to section 51 of
292  * ISO/IEC 13552-5, but it does.
293  * This must be done after the queue is reset, to make sure
294  * that there are no such actions in the action queue.
295  */
297 
298  MHEG5sceneDestruct(scene);
299 
300  MHEG5sceneFree(scene);
301  MHEG5freeMem(scene);
302  }
303  else
304  {
305  /* An Scene transition constitutes a context change, as defined in
306  * section 53.3 of ISO/IEC13522-5. This causes pending elementary actions
307  * and events, which were sourced from the startup app, to be destroyed.
308  */
309  MHEG5queueResetScene( NULL );
310 
311  /* There is no scene, but the application links must still
312  * be prepared to be resolved.
313  */
315  }
317 
318  TRACE((TFILE | TPERFORM), ("Preparing %.*s", (int)newScene->group.groupName.len, (char *)newScene->group.groupName.data))
319  TRACE_MEM();
320 
321  /* Set the current scene to be the new scene */
322  currentScene = newScene;
323 
324  /* Make the current scene GID an absolute reference */
325  path = MHEG5convertGID(&currentScene->group.groupName);
326  MHEG5stringDestruct(&currentScene->group.groupName);
327  currentScene->group.groupName = path;
328 
329  /* Resolve any unresolved targets (they may be pointing at
330  * scene ingredients, even though they shouldn't)
331  */
333 
334  /* Pass on the NextScenes information to DSM-CC */
335  MHEG5sceneParseNextScenes(currentScene->nextScenes.params);
336 
337  MHEG5scenePrepare(currentScene);
338  TRACE((TFILE | TPERFORM), ("Running Scene"))
339  MHEG5sceneActivate(currentScene);
340  TRACE((TFILE | TPERFORM), ("Started Scene"))
341  TRACE_MEM();
342  }
343  else
344  {
345  /* If we failed to parse the scene then we quit the current application
346  and restart the previous one - we DON'T send a GroupIDRefError EngineEvent */
347  TRACE(TERROR, ("Bad Scene data"))
348 #ifdef MHEG5LOG
349  MHEG5LogPrintf(MHEG5WARNING, "Couldn't parse scene\n");
350 #endif /*MHEG5LOG*/
351  }
352 }
353 
358 static void MHEG5sceneRetrieveFail( void *userData )
359 {
361 
362  TRACE(TERROR, (" Failed to get scene file"))
363 
364  /* Re-enable event processing following a failed Scene TransitionTo */
366  if (app)
367  {
368  /* Raise a GroupIDRefError engine event */
370  }
371 }
372 
379 {
380  assert(scene);
381 
382  MHEG5groupInit(&scene->group);
383 
384  scene->sceneCoordinateSystem[0] = 720;
385  scene->sceneCoordinateSystem[1] = 576;
386 }
387 
396 {
397  assert(scene);
398 
399  MHEG5groupFree(&scene->group);
400 
401  if (scene->nextScenes.params)
402  {
404  }
405 }
406 
415 {
416  assert(scene);
417 
418 #ifdef MHEG5LOG
419  MHEG5LogPrintf(MHEG5CALLS, "Scene Prepare ");
420  MHEG5LogPrintObjectPtr(MHEG5CALLS, (MHEG5Root *) scene);
421  MHEG5LogPrintf(MHEG5CALLS, "\n");
422 #endif
423 
424  scene->currentInteractible = 0;
425 
427  (U16BIT)scene->sceneCoordinateSystem[1], scene->aspectRatio );
428 
429  if (scene->movingCursor)
430  {
431  OSDshowCursor(0);
432  }
433  else
434  {
435  OSDhideCursor();
436  }
437  MHEG5groupPrepare(&scene->group);
439 }
440 
447 {
448  if (!scene)
449  {
450  return;
451  }
452 
453 #ifdef MHEG5LOG
454  MHEG5LogPrintf(MHEG5CALLS, "Scene Destruct ");
455  MHEG5LogPrintObjectPtr(MHEG5CALLS, (MHEG5Root *) scene);
456  MHEG5LogPrintf(MHEG5CALLS, "\n");
457 #endif
458 
459  MHEG5groupDestruct(&scene->group);
460 
461  if (scene == currentScene)
462  {
463  currentScene = 0;
464  }
465 }
466 
475 {
476  assert(scene);
477 
478 #ifdef MHEG5LOG
479  MHEG5LogPrintf(MHEG5CALLS, "Scene Activate ");
480  MHEG5LogPrintObjectPtr(MHEG5CALLS, (MHEG5Root *)scene);
481  MHEG5LogPrintf(MHEG5CALLS, "\n");
482 #endif
483 
484  if (!scene->group.root.runningStatus)
485  {
486  DVB_MhegSetAspectRatio( currentScene->aspectRatio );
487 
488  MHEG5groupActivate(&scene->group);
489 
490  /* With synchronous file loading Activate can call TransitionTo, so
491  * scene no longer exists. Check for this before continuing.
492  */
493  if (scene == currentScene)
494  {
495  /* Pass on the input event register value. This nofities the
496  * environment which keys are required by the MHEG-5 engine.
497  */
500  }
501  }
502 }
503 
512 {
513  assert(scene);
514 
515  if (scene->group.root.runningStatus)
516  {
517  MHEG5groupDeactivate(&scene->group);
518  }
519 }
520 
567 {
568  MH5GroupRef gref;
569  MHEG5Int id = 0;
570 
571  /*
572  Fill groupid and id with param-values
573  */
574  MHEG5resolveGenericORefProper(params, &gref, &id);
575 
576  /* ID of a scene must be zero. Check it. */
577  if (id != 0)
578  {
579  ERROR_PRINT(("ERROR: TransitionTo targeted to object with ID of %ld\n", id));
580  }
581 
582  if (gref.len)
583  {
584  MHEG5String gname;
585  if (currentScene)
586  {
587  if (MHEG5sameGroup(&currentScene->group, gref))
588  {
589  WARNING_PRINT(("MHEG5transitionTo - aborting TransitionTo, scene already active \n"));
590 
591  /* Ignore a TransitionTo to the currently running Scene */
592  return MHEG5ERR_IGNORE_ACTION;
593  }
594  }
595 
596  /* The file retrieval process is asynchronous, but any queued actions
597  * should not be processed until the file is loaded. Therefore we
598  * disable event processing whilst loading this file.
599  */
601 
602  gname.len = gref.len;
603  gname.data = gref.ptr.name;
604 
605  TRACE(TFILE | TEVNTS, ("(%.*s)", (int)gname.len, gname.data));
606  /* Retreive the file. We do not know the cache priority yet, so use
607  * the default.
608  */
609  (void)MHEG5FileOrmGet( gname, FRP_SCENE | FRP_CACHE_DEFAULT, (MHEG5Root *)currentScene,
610  MHEG5sceneRetrieved, MHEG5sceneRetrieveFail );
611  }
612 
613  return MHEG5ERR_NOERROR;
614 }
615 
641 {
642  MHEG5GList *thirdParam = 0, *fourthParam = 0;
643  MHEG5Root *emulatedSource = 0;
644  MHEG5Generic value;
645 
646  assert(target);
647 
648  if (target != (MHEG5Root *) currentScene)
649  {
650  return MHEG5ERR_WRONGTARGET;
651  }
652 
653  if (!params)
654  {
656  }
657  thirdParam = MHEG5resolveGenericORef(params, &emulatedSource);
658 
659  if ((thirdParam) && (!thirdParam->generic.indirect) &&
660  (thirdParam->generic.type == MHEG5EVENT))
661  {
662  int i = 0;
663  fourthParam = thirdParam->next;
664  if (fourthParam)
665  {
666  /* Get the optional EmulatedEventData parameter */
667  MHEG5resolveGenericGeneric(fourthParam, &value);
668  switch (value.type)
669  {
670  case MHEG5OCTETSTRING:
671  i = LNK_GetStringIndex( value.value.s );
672  break;
673  case MHEG5BOOL:
674  i = value.value.b;
675  break;
676  case MHEG5INT:
677  default:
678  i = value.value.i;
679  }
680  }
681  if (thirdParam->generic.value.e >= MHEG5ANCHORFIRED)
682  {
683  MHEG5sendEvent(emulatedSource, thirdParam->generic.value.e, i);
684  }
685  else
686  {
687  MHEG5sendSync(emulatedSource, thirdParam->generic.value.e, i);
688  }
689  }
690  else
691  {
693  }
694 
695  return MHEG5ERR_NOERROR;
696 }
697 
716 {
717  MHEG5Root *cursorShape = 0;
718  MHEG5Int newShape = 0;
719 
720  if (!currentScene)
721  {
722  return MHEG5ERR_NOSCENE;
723  }
724  if (!currentScene->movingCursor)
725  {
726  return MHEG5ERR_NOERROR;
727  }
728 
729  assert(target);
730 
731  if (target != (MHEG5Root *) currentScene)
732  {
733  return MHEG5ERR_WRONGTARGET;
734  }
735 
736  if (!params)
737  {
738  OSDhideCursor();
739  return MHEG5ERR_NOERROR;
740  }
741 
742  MHEG5resolveGenericORef(params, &cursorShape);
743  if (!cursorShape)
744  {
746  }
747  if (cursorShape->clazz != MHEG5CURSORSHAPE)
748  {
749  return MHEG5ERR_WRONGPARAM;
750  }
751  newShape = MHEG5strToInt(((MHEG5CursorShape *)cursorShape)->ingredient.content.ref.included);
752 
753  OSDshowCursor((int)newShape);
754 
755  return MHEG5ERR_NOERROR;
756 }
757 
783 {
784  MHEG5GList *thirdParam = 0;
785  MHEG5Int x = 0, y = 0;
786 
787  if (!currentScene)
788  {
789  return MHEG5ERR_NOSCENE;
790  }
791  if (!currentScene->movingCursor)
792  {
793  return MHEG5ERR_NOERROR;
794  }
795 
796  assert(target);
797 
798  if (target != (MHEG5Root *) currentScene)
799  {
800  return MHEG5ERR_WRONGTARGET;
801  }
802 
803  if (!params)
804  {
806  }
807  thirdParam = MHEG5resolveGenericInteger(params, &x);
808 
809  if (!thirdParam)
810  {
812  }
813  MHEG5resolveGenericInteger(thirdParam, &y);
814 
815  OSDsetCursorPosition(x, y);
816 
817  return MHEG5ERR_NOERROR;
818 }
819 
838 {
839  MHEG5GList *thirdParam = 0;
840  MHEG5Root *x, *y;
841  MHEG5Int xx, yy;
842 
843  if (!currentScene)
844  {
845  return MHEG5ERR_NOSCENE;
846  }
847  if (!currentScene->movingCursor)
848  {
849  return MHEG5ERR_NOERROR;
850  }
851 
852  assert(target);
853 
854  if (target != (MHEG5Root *) currentScene)
855  {
856  return MHEG5ERR_WRONGTARGET;
857  }
858 
859  if (!params)
860  {
862  }
863  thirdParam = MHEG5resolveORef(params, &x);
864 
865  if (!thirdParam)
866  {
868  }
869  MHEG5resolveORef(thirdParam, &y);
870 
871  OSDgetCursorPosition(&xx, &yy);
872 
873  if (x && y)
874  {
875  if ((x->clazz == MHEG5INTEGERVARIABLE) && (y->clazz == MHEG5INTEGERVARIABLE) &&
876  (x->runningStatus) && (y->runningStatus))
877  {
878  ((MHEG5IntegerVariable *) x)->value = xx;
879  ((MHEG5IntegerVariable *) y)->value = yy;
880  }
881  }
882 
883  return MHEG5ERR_NOERROR;
884 }
885 
898 {
899  MHEG5Int inputRegister;
900 
901  if (!currentScene)
902  {
903  return MHEG5ERR_NOSCENE;
904  }
905 
906  assert(target);
907 
908  if (target != (MHEG5Root *) currentScene)
909  {
910  return MHEG5ERR_WRONGTARGET;
911  }
912 
913  if (!params)
914  {
916  }
917 
918  MHEG5resolveGenericInteger(params, &inputRegister);
919 
920  ((MHEG5Scene *)target)->inputEventRegister = inputRegister;
921  MHEG5setInputEventRegister(inputRegister);
922 
923  return MHEG5ERR_NOERROR;
924 }
925 
938 {
939  MHEG5Bool invalidString;
940  MHEG5String inputMask;
941  MHEG5Scene *scene;
942 
943  if (!currentScene)
944  {
945  return MHEG5ERR_NOSCENE;
946  }
947 
948  assert(target);
949 
950  if (target != (MHEG5Root *) currentScene)
951  {
952  return MHEG5ERR_WRONGTARGET;
953  }
954 
955  if (!params)
956  {
958  }
959 
960  scene = (MHEG5Scene *)target;
961 
962  MHEG5resolveGenericOctetString(params, &inputMask, &invalidString);
963  if ((invalidString) || (inputMask.len == 0))
964  {
965  /* Parameter was not an octet string or a zero length string */
966  return MHEG5ERR_WRONGPARAM;
967  }
969  scene->inputMask = MHEG5stringCopy(inputMask);
970  MHEG5setInputEventMask(&inputMask);
971 
972  return MHEG5ERR_NOERROR;
973 }
#define TRACE_MEM()
Definition: glue_debug.h:124
U8BIT indirect
Definition: mh5base.h:149
Basis MHEG5 data types.
void MHEG5groupDestruct(MHEG5Group *group)
Implementation of the Destruction behaviour Destruction.
Definition: mh5group.c:497
Distributor for Prepare, Destruct, Activate, Deactivate and Clone calls. Distribute the +Prepare +Des...
MHEG5Bool MHEG5sameGroup(MH5GroupPtr gptr, MH5GroupRef gref)
Compares group ptr with group ref to see whether they both reference the same group. The first is pointer to group, the second can be a relative group name and will be converted to absolute prior to the comparison, so two different references that resolve to reference the same group name produces a True return value.
Definition: mh5gate.c:517
ParamList nextScenes
Definition: mh5scene.h:53
U32BIT size
Definition: fs_types.h:54
MHEG5ErrorCode MHEG5sendEventAction(MHEG5Root *target, MHEG5GList *params)
The actions inserts an event defined by the given parameters into the systems event queue...
Definition: mh5scene.c:640
void MHEG5sceneActivate(MHEG5Scene *scene)
Apply the activation behaviour of the scene class. As this class has no own activation behaviour this...
Definition: mh5scene.c:474
void MHEG5setInputEventRegister(MHEG5Int inputEventRegister)
Change the input event register. This indicates which keypresses the MHEG-5 engine requires to be pas...
Definition: mh5keypress.c:320
MHEG5Int i
Definition: mh5base.h:154
MHEG5String s
Definition: mh5base.h:156
MHEG5Bool shared
Definition: mh5ingredient.h:72
void MHEG5finalDeactivate(MHEG5Root *item)
Definition: mh5final.c:354
U16BIT type
Definition: mh5base.h:151
void MHEG5sceneFree(MHEG5Scene *scene)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5scene.c:395
void MHEG5groupInit(MHEG5Group *group)
Initialise an Group object with default Values.
Definition: mh5group.c:285
Implement the MHEG5 Cursorshape Class Defines encapsulation for the data structures used to represent...
MHEG5GList * MHEG5resolveGenericInteger(MHEG5GList *params, MHEG5Int *value)
Definition: mh5object.c:510
void MHEG5groupDeactivate(MHEG5Group *group)
Implementation of the Deactivation behaviour Deactivation If group is not active, ignore behaviour...
Definition: mh5group.c:802
void MHEG5groupFree(MHEG5Group *group)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5group.c:315
MHEG5Final clazz
Definition: mh5root.h:55
MHEG5Bool b
Definition: mh5base.h:155
union sMH5GroupRef::@5 ptr
MHEG5Scene * asn1_parseScene(unsigned char *asnData, unsigned long dataLength)
Top level ASN.1 parser interface function. Creates and fills a MHEG5Scene object from a char array co...
void * MHEG5FileOrmGet(MHEG5String name, U16BIT priority, void *userData, F_CB_Good cbGood, F_CB_Fail cbFail)
Get a file. The file will be loaded and one of the callback functions called when request is resolved...
Definition: mh5fileorm.c:1179
void MHEG5groupPrepare(MHEG5Group *group)
Implementation of the Preparation behaviour Preparation.
Definition: mh5group.c:349
MHEG5Int MHEG5strToInt(MHEG5String string)
Convert a MHEG5String to a MHEG5Integer.
Definition: mh5base.c:739
Interface functions for invoking the ASN.1 parser.
union MHEG5Generic::@6 value
void MHEG5sceneInit(MHEG5Scene *scene)
Initialise a scene object with default values.
Definition: mh5scene.c:378
void MHEG5FileOrmReset(MHEG5FileOrmResetMode resetMode)
Reset the ORM module. This function supports two modes:
Definition: mh5fileorm.c:595
MHEG5String MHEG5stringCopy(MHEG5String source)
<Function description>="">
Definition: mh5base.c:574
#define FRP_CACHE_DEFAULT
Definition: mh5fileorm.h:38
void MHEG5applicationClearGroupTargets(MHEG5Application *application, MHEG5Group *group)
Clear targets of actions if they are ingredients of the given group.
Implement the MHEG5 Variable Class 21 Variable Class Defines a variable within the context of a Group...
MHEG5ErrorCode MHEG5getCursorPosition(MHEG5Root *target, MHEG5GList *params)
The effect of this action is that the current cursor position is retrieved and stored in the given va...
Definition: mh5scene.c:837
#define FRP_SCENE
Definition: mh5fileorm.h:41
void MHEG5stringDestruct(MHEG5String *item)
Destruct a MHEG5String.
Definition: mh5base.c:686
long MHEG5Int
Definition: mh5base.h:73
DVB Video functions are required by MHEG5 engine. All required functions should be non-blocking...
void MHEG5gListDestruct(MHEG5GList *item)
Destruct a list of MHEG5Generic objects.
Definition: mh5base.c:933
#define MHEG5freeMem
Definition: glue_memory.h:94
MHEG5Group group
This file defines the profile for the MHEG engine.
MHEG5GList * MHEG5resolveGenericOctetString(MHEG5GList *params, MHEG5String *value, MHEG5Bool *invalidString)
Resolve a parameter reference to a generic octet string. The reference can be either direct or indire...
Definition: mh5object.c:478
void MHEG5FileOrmPreloadHint(MHEG5String name)
Provide a preload hint to DSM-CC that the specified file may be required in the future. DSM-CC could (but is not required to) acquire the file into cache.
Definition: mh5fileorm.c:1554
E_ASPECT_RATIO aspectRatio
Definition: mh5scene.h:51
MHEG5Bool movingCursor
Definition: mh5scene.h:52
Implement Functions to support Service Gateways. Functions for standarizing several GroupIDs like +DS...
MHEG5Int inputEventRegister
Definition: mh5scene.h:49
MHEG5String inputMask
Definition: mh5scene.h:54
MHEG5ErrorCode MHEG5setInputMask(MHEG5Root *target, MHEG5GList *params)
Change the InputMask attribute of the target Scene object. Changing the registermask will affect how ...
Definition: mh5scene.c:937
void MHEG5queueResetScene(MHEG5Root *grp)
Reset both event queues and the action queue, discarding any pending events and actions for this scen...
Definition: mh5queue.c:957
short MHEG5Bool
Definition: mh5base.h:71
MHEG5ErrorCode
Definition: mh5base.h:222
void OSDshowCursor(int cursorShape)
Definition: tmcursor.c:46
Interface to OSD.
struct sMHEG5Ingredient * prev
Definition: mh5ingredient.h:84
Event handling. Implementation of a combined queue for events and actions. This is the eventsystem wh...
void MG_OSDMhegInit(U16BIT inWidth, U16BIT inHeight, E_ASPECT_RATIO sar)
Initialise the on screen display Initialise the font and fill in font info.
Definition: mg_osd.c:250
void DVB_MhegSetAspectRatio(E_ASPECT_RATIO aspect)
Set display aspect ratio.
MHEG5Byte * data
Definition: mh5base.h:85
MHEG5GList * MHEG5resolveGenericORef(MHEG5GList *params, MHEG5Root **object)
Definition: mh5object.c:281
#define MHEG5TRUE
Definition: mh5base.h:49
void MHEG5sceneDestruct(MHEG5Scene *scene)
Destruct a scene object.
Definition: mh5scene.c:446
MHEG5ErrorCode MHEG5transitionTo(MHEG5Root *target, MHEG5GList *params)
This function performs the TransitionTo action which leads to a new scene. Implementation of the Tran...
Definition: mh5scene.c:566
MHEG5Group group
Definition: mh5scene.h:46
uint16_t U16BIT
Definition: techtype.h:84
Implement functions to retrieve MHEG5objects by GroupID and ID.
MHEG5Int sceneCoordinateSystem[2]
Definition: mh5scene.h:50
Implementation of the MHEG5 Application Class Defines a set of Ingredient objects, which are shared within an application scope. Base class: Group Subclasses: None Status: Concrete class.
Implementation of the MHEG5 Scene Class Scene Class Defines a set of Ingredient objects to be activat...
Mheg5 logging and debug printing.
void OSDhideCursor(void)
Definition: tmcursor.c:50
MHEG5Int len
Definition: mh5base.h:99
MHEG5Bool runningStatus
Definition: mh5root.h:51
File interface functions to DSMCC component.
MHEG5Byte * name
Definition: mh5base.h:102
MHEG5String groupName
Definition: mh5group.h:53
MHEG5Root root
Definition: mh5group.h:50
redirection include
MHEG5ErrorCode MHEG5setCursorShape(MHEG5Root *target, MHEG5GList *params)
This action sets a new cursor shape. Implementation of the SetCursorShape (NewCursorShape) action of ...
Definition: mh5scene.c:715
void MHEG5applicationResolveTargets(MHEG5Application *application)
Resolve unresolved targets of actions in the application.
tmcursor
#define ERROR_PRINT(x)
Definition: mh5debug.h:76
void MHEG5sendEvent(MHEG5Root *source, MHEG5EventType event, MHEG5Int data)
Store an event in the asynchronous event queue.
Definition: mh5queue.c:1540
void MHEG5scenePrepare(MHEG5Scene *scene)
Apply the preparation behaviour of the scene class. As this class has no own preparation behaviour th...
Definition: mh5scene.c:414
void MHEG5setInputEventMask(MHEG5String *inputEventMask)
Change the input mask. This indicates which keypresses the MHEG-5 engine requires to be passed...
Definition: mh5keypress.c:1146
MHEG5Root * currentInteractible
Definition: mh5scene.h:56
void OSDgetCursorPosition(MHEG5Int *x, MHEG5Int *y)
Definition: tmcursor.c:36
MHEG5EventType e
Definition: mh5base.h:157
MHEG5ErrorCode MHEG5setInputRegister(MHEG5Root *target, MHEG5GList *params)
Change the InputEventRegister attribute of the target Scene object. Changing the register will affect...
Definition: mh5scene.c:897
MHEG5Int len
Definition: mh5base.h:84
MHEG5Scene * MHEG5getCurrentScene(void)
This function returns the current scene.
Definition: mh5scene.c:207
MHEG5ErrorCode MHEG5setCursorPosition(MHEG5Root *target, MHEG5GList *params)
This action sets the cursor position to the values given as parameters. Implementation of the SetCurs...
Definition: mh5scene.c:782
MHEG5GList * params
Definition: mh5base.h:182
U8BIT * data
Definition: fs_types.h:55
#define USE_UNWANTED_PARAM(param)
Definition: techtype.h:48
void MHEG5displayShowAll(void)
Redisplay all active visible objects. AKD: Optimised 12/5/99.
Definition: mh5display.c:1362
MHEG5String MHEG5convertGID(MHEG5String *inRef)
Convert a group ID from a relative reference to an absolute reference. See UK1.05 section 8...
Definition: mh5gate.c:269
void MHEG5displayStreamUpdate(MHEG5Application *application)
Definition: mh5display.c:1997
MHEG5GList * MHEG5resolveORef(MHEG5GList *params, MHEG5Root **object)
Definition: mh5object.c:126
MHEG5GList * MHEG5resolveGenericGeneric(MHEG5GList *params, MHEG5Generic *value)
Definition: mh5object.c:364
#define WARNING_PRINT(x)
Definition: mh5debug.h:73
References: [1] UK1 Profile - Digital Terrestrial Television - Requirements for interoperability (The...
Implement generic MHEG5-display functions - independent from the OSD These are generic functions used...
void MHEG5sceneDeactivate(MHEG5Scene *scene)
Apply the deactivation behaviour of the scene class. As this class has no own deactivation behaviour ...
Definition: mh5scene.c:511
void MHEG5enableEventProcessing(MHEG5Bool enable)
Enable or disable engine event processing. This function is used to implement the Call action for res...
Definition: mh5queue.c:1751
MHEG5Generic generic
Definition: mh5base.h:171
struct sMHEG5GList * next
Definition: mh5base.h:172
void OSDsetCursorPosition(MHEG5Int x, MHEG5Int y)
Definition: tmcursor.c:42
#define MHEG5FALSE
Definition: mh5base.h:48
void MHEG5sendSync(MHEG5Root *source, MHEG5EventType event, MHEG5Int data)
Store an event in the synchronous event queue.
Definition: mh5queue.c:1651
Key Press related functionality.
MHEG5GList * MHEG5resolveGenericORefProper(MHEG5GList *params, MH5GroupRef *pgroupRef, MHEG5Int *id)
Resolve a generic object reference, returning the object reference. The reference can be direct or in...
Definition: mh5object.c:177
MHEG5Ingredient * itemTail
Definition: mh5group.h:63
void MHEG5groupActivate(MHEG5Group *group)
Implementation of the Activation behaviour Activation.
Definition: mh5group.c:672
MHEG5Application * MHEG5getCurrentApplication(void)
<Function description>="">
#define TRACE(t, x)
Definition: glue_debug.h:118