MHEG5  18.9.0
MHEG5 Documentation
mh5ingredient.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  *******************************************************************************/
26 /*---includes for this file--------------------------------------------------*/
27 #include <string.h>
28 #include "mh5ingredient.h"
29 #include "mh5object.h"
30 #include "mh5final.h"
31 #include "mh5display.h" /*for SetData Action */
32 #include "mh5visible.h" /*for SetData Action */
33 #include "mh5fileorm.h" /*for SetData Action */
34 #include "mh5streamevent.h" /*for Prepare Action */
35 #include "mh5memory.h"
36 #include "mh5queue.h" /* Events */
37 #include "mh5scene.h"
38 #include "mh5application.h"
39 #include "mh5variable.h" /*for Clone Action */
40 #include "mh5hypertext.h"
41 #include "mh5listgroup.h"
42 #include "mh5stream.h"
43 #include "mh5video.h"
44 #include "mh5debug.h"
45 /* for print functions */
46 #include "mh5palette.h"
47 #include "mh5cursorshape.h"
48 #include "mh5font.h"
49 #include "mh5program.h"
50 #include "mh5variable.h"
51 #include "mh5audio.h"
52 #include "mh5rtgraphics.h"
53 #include "mh5slider.h"
54 #include "mh5dynamiclineart.h"
55 #include "mh5entryfield.h"
56 #include "mh5hotspot.h"
57 #include "mh5pushbutton.h"
58 #include "mh5switchbutton.h"
59 #include "mh5profile.h"
60 #if defined(INCLUDE_IC) && defined(INCLUDE_ICS)
61 #include "mh5streamer.h"
62 #endif
63 
64 #include "mg_api.h"
65 #include "mg_fontapi.h"
66 #include "mh5drawtext.h"
67 
68 /*---constant definitions for this file--------------------------------------*/
69 
70 
71 /*---local typedef structs for this file-------------------------------------*/
72 
73 /*---local (static) variable declarations for this file----------------------*/
74 
75 /*---local function definitions----------------------------------------------*/
76 
77 /*---global function definitions---------------------------------------------*/
78 
79 #ifdef MH5PRINTOUT
80 
87 static void MHEG5contentBodyPrint(MHEG5ContentBody b, char *out)
88 {
89  if (b.referenced)
90  {
91  MHEG_PRINT(out, " :ContentRef ( ");
92  MHEG5stringPrint(b.ref.referenced.reference, out);
93  if (b.ref.referenced.priority != FRP_CACHE_DEFAULT)
94  {
95  MHEG_PRINT(out, " :CCPriority ");
96  MHEG5intPrint(b.ref.referenced.priority, out);
97  }
98  MHEG_PRINT(out, " )");
99  }
100  else
101  {
102  MHEG5stringPrint(b.ref.included, out);
103  }
104  MHEG5newLine(out);
105 }
106 
113 void MHEG5ingredientPrint(MHEG5Ingredient *ingredient, char *out)
114 {
115  MHEG5rootPrint(&ingredient->root, out);
116 
117  /* Exchanged attributes */
118  if (ingredient->initiallyStopped)
119  {
120  MHEG5indent(out);
121  MHEG_PRINT(out, ":InitiallyActive FALSE");
122  MHEG5newLine(out);
123  }
124 
125  if (ingredient->contentHook != MHEG5CHOOK_UNDEFINED && ingredient->contentHook != 0)
126  {
127  MHEG5indent(out);
128  MHEG_PRINT(out, ":CHook ");
129  MHEG5intPrint(ingredient->contentHook, out);
130  MHEG5newLine(out);
131  }
132 
133  if (ingredient->originalContent.referenced || ingredient->originalContent.ref.included.data)
134  {
135  MHEG5indent(out);
136  MHEG_PRINT(out, ":OrigContent ");
137  MHEG5contentBodyPrint(ingredient->originalContent, out);
138  }
139 
140  if (ingredient->shared &&
141  ingredient->root.clazz != MHEG5AUDIO &&
142  ingredient->root.clazz != MHEG5VIDEO)
143  {
144  MHEG5indent(out);
145  MHEG_PRINT(out, ":Shared TRUE");
146  MHEG5newLine(out);
147  }
148 
149  /* local attributes */
150  if (ingredient->content.referenced || ingredient->content.ref.included.len)
151  {
152  MHEG5indent(out);
153  MHEG_PRINT(out, "// :Content ");
154  MHEG5contentBodyPrint(ingredient->content, out);
155  }
156 }
157 
158 #endif /* #ifdef MH5PRINTOUT */
159 
160 
168 static void MHEG5updateContentHook(MHEG5Ingredient *item)
169 {
171 
172  if (!application)
173  {
174  return;
175  }
176 
177  /* If content hook was not encoded, use the default from the application.
178  * This depends on the type of object. Store the application default back
179  * in the ingredient object to avoid this lookup elsewhere.
180  */
181  if (item->contentHook == MHEG5CHOOK_UNDEFINED)
182  {
183  switch (item->root.clazz)
184  {
185  case MHEG5BITMAP:
186  item->contentHook = application->bitmapContentHook;
187  break;
188  case MHEG5STREAM:
189  item->contentHook = application->streamContentHook;
190  break;
191  case MHEG5TEXT:
192  case MHEG5ENTRYFIELD:
193  case MHEG5HYPERTEXT:
194  item->contentHook = application->textContentHook;
195  break;
196  case MHEG5LINEART:
197  case MHEG5RECTANGLE:
198  case MHEG5DYNAMICLINEART:
199  item->contentHook = application->lineArtContentHook;
200  break;
202  item->contentHook = application->interchangedProgramContentHook;
203  break;
204  default:
205  /* This type does not have an application default content hook.
206  * Do nothing - an error will be produced by the switch statement
207  * below
208  */
209  break;
210  }
211  }
212 }
213 
225 static void MHEG5contentAdapt( MHEG5Ingredient *item, S_CONTENT *content )
226 {
227  MHEG5Visible *vis;
228 
229  assert(item);
230 
231  /* Set default adapted content values */
232  item->data = 0;
233  item->dataLen = 0;
234 
235  /* Interpret the content hook. The interpretation is different depending on
236  * the type of the object
237  */
238  switch (item->root.clazz)
239  {
240  case MHEG5PALETTE:
241  case MHEG5CURSORSHAPE:
242  /* No content encoding for this class in UK1 profile */
243  ERROR_PRINT(("ERROR: content not allowed for this type %d\n", item->root.clazz));
244  return;
245  case MHEG5FONT:
246  if (item->contentHook == CHOOK_FONT_TRUE_TYPE)
247  {
248  /* Store the 'font index' provided by Mheg Graphics module */
249  ((MHEG5Font *)item)->mg_fnt_index = MG_FontLoadFile( content->data, content->size );
251  }
252  else
253  {
254  /* Defensive behaviour (see D-Book 15.3.1.3)*/
255  ((MHEG5Font *)item)->mg_fnt_index = 0;
257  }
258  return;
259  case MHEG5STREAM:
260  MHEG5streamContentAdapt((MHEG5Stream *)item, content );
261  return;
262  case MHEG5BITMAP:
263  vis = (MHEG5Visible *) item;
264  assert( vis->graphic_data == 0 );
265  switch (item->contentHook)
266  {
267  case CHOOK_BITMAP_PNG:
268  #ifdef DRAW_IN_ADVANCE
269  MG_DrawPng( content->data, content->size, vis );
270  break;
271  #endif /*DRAW_IN_ADVANCE*/
272  case CHOOK_BITMAP_JPG:
273  #ifdef DRAW_IN_ADVANCE
274  MG_DrawJpg( content->data, content->size, vis );
275  break;
276  #endif /*DRAW_IN_ADVANCE*/
279  #ifdef INCLUDE_FREESAT
280  case CHOOK_BITMAP_IMAGE_PLANE_IFRAME:
281  #endif
282  /* Bitmap object - Copy IFrame data below */
283  break;
284  default:
285  ERROR_PRINT(("ERROR: invalid chook for Bitmap %ld\n", item->contentHook));
286  return;
287  }
288  break;
289  case MHEG5TEXT:
290  case MHEG5ENTRYFIELD:
291  case MHEG5HYPERTEXT:
292  switch (item->contentHook)
293  {
294  case CHOOK_TEXT_UTF8:
295  MHEG5textUtf8Content((MHEG5Text *)item, content->data, content->size );
296  break;
297 
298  case CHOOK_TEXT_UTF16:
299  MHEG5textUtf16Content((MHEG5Text *)item, content->data, content->size );
300  break;
301  default:
302  ERROR_PRINT(("ERROR: invalid chook for Text %ld\n", item->contentHook));
303  }
304  return;
305 
306  default:
307  /* This is an internal error - this function should not have been called
308  * with an item that cannot have content
309  */
310  ERROR_PRINT(("INTERNAL ERROR: invalid object class\n"));
311  assert(0);
312  return;
313  }
314 
315  /* Copy the input data */
316  if (item->content.referenced)
317  {
318  /* Make a copy of the referenced content */
319  item->data = MHEG5getMem( content->size );
320  if (item->data)
321  {
322  memcpy(item->data, content->data, content->size );
323  item->dataLen = content->size;
324  TRACE(TFILE, ("Cref: id=%ld, clz=%d ptr=0x%p len=%d", item->root.id, item->root.clazz, item->data, item->dataLen))
325  }
326  }
327  else
328  {
329  /* Set pointers to the included content */
330  item->data = item->content.ref.included.data;
331  item->dataLen = item->content.ref.included.len;
332  TRACE(TFILE, ("Cinc: id=%ld, clz=%d ptr=0x%p len=%d", item->root.id, item->root.clazz, item->data, item->dataLen))
333  }
334 }
335 
341 static void MHEG5contentFree(MHEG5Ingredient *item)
342 {
343  assert(item);
344 
345  switch (item->root.clazz)
346  {
347  case MHEG5STREAM:
349  break;
350 
351  case MHEG5BITMAP:
352  switch (item->contentHook)
353  {
354  case CHOOK_BITMAP_PNG:
355  case CHOOK_BITMAP_JPG:
356  if (((MHEG5Visible *)item)->graphic_data)
357  {
358  /* free resources for png data */
359  MG_FreeData(((MHEG5Visible *)item)->graphic_data );
360  ((MHEG5Visible *)item)->graphic_data = 0;
361  }
362  break;
363 
366  #ifdef INCLUDE_FREESAT
367  case CHOOK_BITMAP_IMAGE_PLANE_IFRAME:
368  #endif
369  break;
370  default:
371  if (item->data)
372  {
373  ERROR_PRINT(("\nERROR: invalid Bmp chook %ld, id=%d data=%p", item->contentHook, item->root.id, item->data));
374  }
375  return;
376  }
377  break;
378 
379  case MHEG5TEXT:
380  case MHEG5ENTRYFIELD:
381  case MHEG5HYPERTEXT:
382  if (((MHEG5Visible *)item)->graphic_data)
383  {
384  MG_FreeData(((MHEG5Visible *)item)->graphic_data );
385  ((MHEG5Visible *)item)->graphic_data = 0;
386  }
387  if (item->dataLen > 0)
388  {
389  MHEG5freeMem(item->data);
390  item->data = 0;
391  item->dataLen = 0;
392  }
393  break;
394 
395  case MHEG5FONT:
396  if (((MHEG5Font *)item)->mg_fnt_index != INVALID_MG_FNT_INDEX)
397  MG_FontFreeFile(((MHEG5Font *)item)->mg_fnt_index );
398  break;
399 
400  default:;
401  }
402 
403  if ((item->content.referenced) && (item->data))
404  {
405  TRACE(TFILE, ("Cfree id=%ld, clz=%d ptr=0x%p len=%d", item->root.id, item->root.clazz, item->data, item->dataLen))
406  /* Free off memory for referenced content */
407  MHEG5freeMem(item->data);
408  /* Ensure that old data cannot be used. */
409  item->data = 0;
410  item->dataLen = 0;
411  }
412 }
413 
422 static void MHEG5ingredientContentPrepareAsync(
423  MHEG5Ingredient *ingredient, S_CONTENT *content )
424 {
425  /*
426  * The visible object does not have it's own implementation of
427  * ContentAvailable since it is very similar to the ingredient one.
428  * The difference is that the visible must be redisplayed once new content
429  * is available.
430  */
431 
432  /* Destroy the existing content for this object */
433  MHEG5contentFree(ingredient);
434 
435  //TRACE(TEVNTS,(" c=%d id=%ld len=%d",ingredient->root.clazz,ingredient->root.id, content->size ))
436 
437  /* For a hypertext object reset the current hypertext link */
438  if (((MHEG5Root *) ingredient)->clazz == MHEG5HYPERTEXT)
439  {
441  }
442  /* For text objects, take a straight copy of the content. For other objects
443  * we need to adapt it (e.g. PNG decode)
444  */
445  if (content->data != NULL && content->size != 0)
446  {
447  MHEG5contentAdapt( ingredient, content );
448  }
449 
450  /* For a text object clear text data if len is 0 */
451  if (((MHEG5Root *) ingredient)->clazz == MHEG5TEXT && content->size == 0)
452  {
453  MHEG5textClearTextData((MHEG5Text *)ingredient);
454  }
455 
456  /* Refresh Stream Object for stream events */
457  if (ingredient->root.clazz == MHEG5STREAM)
458  {
459  MHEG5refreshStreamObject((MHEG5Stream *)ingredient);
460  }
461 
462  /* Generate the event to say that new content is available for this object
463  */
464  MHEG5sendEvent((MHEG5Root *) ingredient, MHEG5CONTENTAVAILABLE, 0);
465 
466  if (((MHEG5Root *) ingredient)->runningStatus)
467  {
468  /* Display I-Frame bitmap objects */
469  if (ingredient->root.clazz == MHEG5BITMAP &&
470  (ingredient->contentHook == CHOOK_BITMAP_NORMAL_IFRAME ||
471  ingredient->contentHook == CHOOK_BITMAP_H264_IFRAME
472  #ifdef INCLUDE_FREESAT
473  || ingredient->contentHook == CHOOK_BITMAP_IMAGE_PLANE_IFRAME
474  #endif
475  )
476  )
477  {
478  /* Check that we have something to show */
479  if ((ingredient->data != NULL) && (ingredient->dataLen > 0))
480  {
481  MHEG5displayIFrameStart((MHEG5Bitmap *)ingredient );
482  }
483  }
484 
485  /* If we have a running visible, redraw it to display the new content.
486  */
487  if (MHEG5visibleIs((MHEG5Root *) ingredient))
488  {
489  MHEG5displayRedraw((MHEG5Visible *) ingredient);
490 #ifndef NO_SCREEN_UPDATE_ON_SYNC
491  if (ingredient->cpState == CP_STATE_CHANGED)
492  {
493  /* Data will have changed in the visible so update display */
495  }
496 #endif
497  }
498 
499  /* Display stream objects */
500  if (ingredient->root.clazz == MHEG5STREAM)
501  {
502  MHEG5displayStreamPlay((MHEG5Stream *)ingredient);
503  }
504  }
505  ingredient->cpState = CP_STATE_INITIAL;
506 }
507 
519 static void MHEG5ingredientContentRetrieved( void *userData, S_CONTENT *content )
520 {
521  MHEG5Ingredient *ingredient = (MHEG5Ingredient *)userData;
522 
523  assert(ingredient); /* valid object pointer */
524  if (!ingredient)
525  {
526  /* should never get here */
527  TRACE(TERROR, (" Null pointer to Ingredient"))
528  }
529  else
530  {
531  ingredient->ormHandle = NULL; /* after callback this handle is no longer valid */
532 
533  assert(ingredient->root.id); /* object is not a group */
534  if (ingredient->root.id == 0)
535  {
536  /* should never get here */
537  TRACE(TERROR, (" Null object: %p", ingredient))
538  }
539  else
540  {
541  TRACE(TFILE, (" got id=%ld", ingredient->root.id))
542  /* Prepare included ingredient content */
543  MHEG5ingredientContentPrepareAsync( ingredient, content );
544  }
545  }
546 }
547 
556 static void MHEG5ingredientContentRetrievalFail( void *userData )
557 {
558  MHEG5Ingredient *ingredient = (MHEG5Ingredient *)userData;
559  MHEG5Root *application = (MHEG5Root *)MHEG5getCurrentApplication();
560 
561  if (!ingredient)
562  {
563  /* No object - should never get here! */
564  TRACE(TERROR, (" No object %p", userData))
565  }
566  else
567  {
568  TRACE(TFILE, (" No content: id=%ld", ingredient->root.id))
569 
570  /* Check that an application is running,
571  * and that this result of direct MHEG action (i.e. Setdata action)*/
572  if (application && ingredient->cpState != CP_STATE_PRELOAD &&
573  !MHEG5FileOrmIsReset(NULL))
574  {
575  /* Raise a ContentRefError engine event */
577  }
578 
579  ingredient->ormHandle = NULL; /* after callback this handle is no longer valid */
580 
581  if (((MHEG5Root *)ingredient)->clazz == MHEG5STREAM)
582  {
583  if (((MHEG5Root *)ingredient)->runningStatus)
584  {
585  /* Stop the stream */
586  MHEG5displayStreamStop((MHEG5Stream *)ingredient );
587  }
588 
589  /* Clear the stream (there is no ContentRefError event) */
590  MHEG5contentFree(ingredient);
591  }
592 
593  if (((MHEG5Root *)ingredient)->clazz == MHEG5FONT)
594  {
595  /* Font cannot be loaded, use in-built font */
596  ((MHEG5Font *)ingredient)->mg_fnt_index = 0;
597  MHEG5fontRefreshTexts((MHEG5Font *)ingredient );
598  }
599 
600  if (((MHEG5Root *) ingredient)->runningStatus)
601  {
602  /* If we have a running visible, redraw it to display the new content.
603  */
604  if (MHEG5visibleIs((MHEG5Root *) ingredient))
605  {
606  MHEG5displayRedraw((MHEG5Visible *) ingredient);
607  }
608  }
609  ingredient->cpState = CP_STATE_INITIAL;
610  }
611 }
612 
619 {
620  assert(ingredient);
621 
622  MHEG5rootInit(&ingredient->root);
623 
624  ingredient->originalContent.ref.referenced.priority = FRP_CACHE_DEFAULT;
625  ingredient->contentHook = MHEG5CHOOK_UNDEFINED;
626 }
627 
636 {
637  assert(ingredient);
638 
639  MHEG5rootFree(&ingredient->root);
640 
641  if (ingredient->originalContent.referenced)
642  {
643  MHEG5stringDestruct(&ingredient->originalContent.ref.referenced.reference);
644  }
645  else
646  {
648  }
649 }
650 
658 {
659  assert(source);
660  assert(destination);
661 
662  MHEG5rootClone(&destination->root, &source->root);
663 
664  destination->initiallyStopped = source->initiallyStopped;
665  destination->contentHook = source->contentHook;
666  destination->originalContent.referenced = source->originalContent.referenced;
667  if (source->originalContent.referenced)
668  {
669  destination->originalContent.ref.referenced.reference = MHEG5stringCopy(source->originalContent.ref.referenced.reference);
670  destination->originalContent.ref.referenced.priority = source->originalContent.ref.referenced.priority;
671  }
672  else
673  {
675  }
676  destination->shared = source->shared;
677 }
678 
685 static MHEG5Bool MHEG5canHaveContent(MHEG5Ingredient *ingredient)
686 {
687  MHEG5Bool hasContent = MHEG5FALSE;
688 
689  assert(ingredient);
690 
691  switch (ingredient->root.clazz)
692  {
693  case MHEG5STREAM:
694  TRACE(TSTRM, ("Stream CHook=%d", ingredient->contentHook))
695  /* fallthrough */
696 
697 #ifndef MHEG5PROFILE_UK1_06
698  case MHEG5PALETTE:
699  case MHEG5CURSORSHAPE:
700 #endif
701  case MHEG5FONT:
702  case MHEG5BITMAP:
703  case MHEG5TEXT:
704  case MHEG5ENTRYFIELD:
705  case MHEG5HYPERTEXT:
706  hasContent = MHEG5TRUE;
707 
708  default:;
709  }
710  return hasContent;
711 }
712 
713 /*
714  * Internal behaviours
715  */
716 
724 {
725  CALL_PRINT((">> MHEG5ingredientPrepare(%p)\n", ingredient));
726 
727  assert(ingredient);
728 
729  ingredient->content.referenced = ingredient->originalContent.referenced;
730  if (ingredient->originalContent.referenced)
731  {
732  /* Copy content reference */
733  ingredient->content.ref.referenced.reference = MHEG5stringCopy(ingredient->originalContent.ref.referenced.reference);
734  ingredient->content.ref.referenced.priority = ingredient->originalContent.ref.referenced.priority;
735  }
736  else
737  {
738  /* Copy the included content */
739  ingredient->content.ref.included = MHEG5stringCopy(ingredient->originalContent.ref.included);
740  }
741 
742  MHEG5rootPrepare(&ingredient->root);
743 
744  /* 6. Perform the ContentPreparation behaviour.
745  */
746  if (MHEG5canHaveContent(ingredient))
747  {
748  MHEG5ingredientContentPrepare(ingredient);
749  }
750 
751  CALL_PRINT(("<< MHEG5ingredientPrepare\n"));
752 }
753 
770 {
771  MHEG5String ref;
772  U16BIT priority;
773 
774  CALL_PRINT((">> MHEG5ingredientContentPrepare(%p)\n", ingredient));
775 
776  assert(ingredient);
777 
778  MHEG5updateContentHook(ingredient);
779 
780  if (!ingredient->content.referenced)
781  {
782  /* Included content */
783  S_CONTENT content;
784  /* Prepare retrieved ingredient content */
785  content.size = ingredient->content.ref.included.len;
786  content.data = ingredient->content.ref.included.data;
787  content.destroy = NULL;
788  content.fs_handle = NULL;
789  MHEG5ingredientContentPrepareAsync( ingredient, &content );
790  }
791  else
792  {
793  /* Referenced content */
794  INFO_PRINT(("MHEG5ingredientContentPrepare referenced content\n"));
795  ref = ingredient->content.ref.referenced.reference;
796  if (ref.len != 0)
797  {
798  TRACE(TFILE, ("id=%ld running=%d ref=%d,%s", ingredient->root.id, ingredient->root.runningStatus, ref.len, ref.data))
799  if ((ingredient->root.clazz == MHEG5STREAM) &&
800  (ingredient->contentHook == CHOOK_STREAM_IC))
801  {
802  #ifdef INCLUDE_ICS
803  /* Stream from IP connection */
804  MHEG5StreamerPrepare((MHEG5Stream *)ingredient);
805  #endif /* INCLUDE_ICS */
806  }
807  else
808  {
809  /* Initiate file request */
810  priority = ingredient->content.ref.referenced.priority & FRP_CACHE_MASK;
811  if (ingredient->root.grp == (MHEG5Group *)MHEG5getCurrentApplication())
812  {
813  /* When fileorm does reset for scene, this request should live on */
814  priority |= FRP_IN_APP;
815  }
816  if ((ingredient->root.clazz == MHEG5STREAM) &&
817  (ingredient->contentHook == CHOOK_STREAM_NORMAL))
818  {
819  /* Request deferred service locator */
820  priority |= FRP_DEFER_SERV;
821  }
822  ingredient->ormHandle =
823  MHEG5FileOrmGet( ref, priority, &ingredient->root,
824  MHEG5ingredientContentRetrieved,
825  MHEG5ingredientContentRetrievalFail );
826  }
827  }
828  else
829  {
830  TRACE(TERROR, ("referenced content, but len is zero: id=%ld", ingredient->root.id))
831  }
832  }
833  CALL_PRINT(("<< MHEG5ingredientContentPrepare\n"));
834 }
835 
851 {
852  assert(ingredient);
853 
854  if (MHEG5canHaveContent(ingredient))
855  {
856  if (ingredient->content.referenced && ingredient->ormHandle != NULL)
857  {
858  MHEG5FileOrmClear( ingredient->ormHandle );
859  }
860  MHEG5contentFree(ingredient);
861  }
862 
863  MHEG5rootDestruct(&ingredient->root);
864 
865  if (ingredient->content.referenced)
866  {
867  MHEG5stringDestruct(&ingredient->content.ref.referenced.reference);
868  }
869  else
870  {
871  MHEG5stringDestruct(&ingredient->content.ref.included);
872  }
873 }
874 
882 {
883  assert(ingredient);
884  MHEG5rootActivate(&ingredient->root);
885 }
886 
894 {
895  assert(ingredient);
896  MHEG5rootDeactivate(&ingredient->root);
897 }
898 
899 /*
900  * Actions
901  */
902 
903 
937 {
938  MHEG5GList *optionalParam = 0;
939  MHEG5String newRef;
940  MHEG5Bool valid = MHEG5FALSE;
941  MHEG5Bool referenced = MHEG5FALSE;
942 
943  assert(target);
944 
945  if (!params)
946  {
947  TRACE(TERROR, ("err wrong no param"))
949  }
950 
951  if (!MHEG5canHaveContent((MHEG5Ingredient *) target ))
952  {
953  if (target->clazz != MHEG5OCTETSTRINGVARIABLE)
954  {
955  TRACE(TERROR, ("err wrong class=%d", target->clazz))
956  }
957  return MHEG5ERR_WRONGTARGET;
958  }
959 
960  optionalParam = MHEG5resolveGenericCRef(params, &newRef, &referenced, &valid);
961  if (valid == MHEG5FALSE)
962  {
963  TRACE(TERROR, ("err wrong param"))
964  return MHEG5ERR_WRONGPARAM;
965  }
966 
967  if (((MHEG5Ingredient *) target)->content.referenced != referenced)
968  {
969  /* Do not allow ingredient to change from included to referenced data and vice versa */
970  return MHEG5ERR_WRONGPARAM;
971  }
972 
973  if (((MHEG5Ingredient *) target)->content.referenced)
974  {
975  MHEG5stringDestruct(&((MHEG5Ingredient *) target)->content.ref.referenced.reference);
976  }
977  else
978  {
979  MHEG5stringDestruct(&((MHEG5Ingredient *) target)->content.ref.included);
980  }
981  ((MHEG5Ingredient *) target)->content.referenced = referenced;
982  if (referenced)
983  {
984  /*Setting ContentCachePriority back to default.
985  May be set by optional parameter*/
986  ((MHEG5Ingredient *) target)->content.ref.referenced.priority = FRP_CACHE_DEFAULT;
987 
988  if (optionalParam)
989  {
990  /* NewContSize */
991  MHEG5Int contentSize = 0;
992  optionalParam = MHEG5resolveGenericInteger(optionalParam, &contentSize);
993 
994  if (optionalParam)
995  {
996  /* NewContentCachePriority */
997  MHEG5resolveGenericInteger(optionalParam,
998  &(((MHEG5Ingredient *) target)->content.ref.referenced.priority));
999  }
1000  }
1001  ((MHEG5Ingredient *) target)->content.ref.referenced.reference = MHEG5stringCopy(newRef);
1002  }
1003  else
1004  { /* Included Content */
1005  ((MHEG5Ingredient *) target)->content.ref.included = MHEG5stringCopy(newRef);
1006  }
1007  ((MHEG5Ingredient *) target)->cpState = CP_STATE_CHANGED;
1008 
1009 #ifdef TRACING
1010  if (mheg_trace_debug & (TACTIONS | TFILE))
1011  {
1012  DBG_PRINTF(T_NL "SetData( %ld, %s=\"%s\" )", target->id, (referenced) ? "Ref" : "Txt", newRef.data);
1013  }
1014 #endif
1015 
1016 #ifndef MHEG5PROFILE_UK1
1017  /* The following corrigenda changes have been overridden by UK1 profile. */
1018 
1019  /* COR1: 16.1 : When a setdata is performed on a bitmap, scaling is reset.
1020  * NOTE: Redraw is forced as part of ContentPrepare, either with new content
1021  * or with a place holder.
1022  */
1023  if (target->clazz == MHEG5BITMAP)
1024  {
1025  ((MHEG5Bitmap *)target)->scaleSet = MHEG5FALSE;
1026  }
1027 
1028  /* COR1: 20.8 : When a setdata is performed on a stream, scaling of
1029  * contained video objects is reset
1030  */
1031  if (target->clazz == MHEG5STREAM)
1032  {
1033  MHEG5Ingredient **multiplexItem;
1034 
1035  multiplexItem = ((MHEG5Stream *)target)->multiplex;
1036 
1037  while (*multiplexItem)
1038  {
1039  if ((*multiplexItem)->root.clazz == MHEG5VIDEO)
1040  {
1041  ((MHEG5Video *)*multiplexItem)->scaleSet = MHEG5FALSE;
1042  }
1043  multiplexItem++;
1044  }
1045  }
1046 #endif
1047 
1048 #ifdef INCLUDE_ICS
1049  if (target->clazz == MHEG5STREAM)
1050  {
1051  /* SetData on Stream object implicitly resets the counter position and
1052  * the counter end position.
1053  * This behaviour is not specified anywhere, but is required
1054  * by IP streaming tests.
1055  */
1056  MHEG5Stream *stream = (MHEG5Stream *)target;
1057 
1058  if (stream->ingredient.contentHook == CHOOK_STREAM_IC)
1059  {
1060  stream->counterPosition = 0;
1061  stream->counterEndPosition = -1;
1062  }
1063  }
1064 #endif /* INCLUDE_ICS */
1065 
1067 
1068  return MHEG5ERR_NOERROR;
1069 }
1070 
1106 {
1107  MHEG5Root *cloneRefVar = 0, *newItem = 0;
1108  MHEG5ObjectRefVariable *objref;
1109  MHEG5Int newId = 5555;
1110  MH5GroupRef gref;
1111 
1112  assert(target);
1113 
1114  if (!params)
1115  {
1117  }
1118  MHEG5resolveORef(params, &cloneRefVar);
1119  if (!cloneRefVar)
1120  {
1122  }
1123 
1124  switch (target->clazz)
1125  {
1126  case MHEG5SCENE:
1127  case MHEG5APPLICATION:
1128  case MHEG5STREAM:
1129  case MHEG5AUDIO:
1130  case MHEG5VIDEO:
1131  case MHEG5RTGRAPHICS:
1132  ERROR_PRINT(("ERROR: Clone not supported for class %d\n", target->clazz));
1133  return MHEG5ERR_WRONGPARAM;
1134 
1135  default:
1136  ERROR_PRINT(("ERROR: Clone not supported by this engine for class %d\n", target->clazz));
1138 
1139  case MHEG5BITMAP:
1140  newItem = (MHEG5Root *)MHEG5bitmapClone((MHEG5Bitmap *)target);
1141  break;
1142 
1143  case MHEG5TEXT:
1144  newItem = (MHEG5Root *)MHEG5textClone((MHEG5Text *)target);
1145  break;
1146 
1147  case MHEG5RECTANGLE:
1148  newItem = (MHEG5Root *)MHEG5rectangleClone((MHEG5Rectangle *)target);
1149  break;
1150  }
1151  if (newItem != NULL)
1152  {
1153  newId += target->id;
1154 
1155  gref.len = 0;
1156  gref.ptr.group = target->grp;
1157  while (MHEG5findObject(gref, newId))
1158  {
1159  newId++;
1160  }
1161 
1162  newItem->id = newId;
1163  MHEG5groupAddItem((MHEG5Group *)target->grp, (MHEG5Ingredient *)newItem );
1164 
1165  objref = (MHEG5ObjectRefVariable *)cloneRefVar;
1166 
1167  MHEG5objRefStoreValue( objref, gref, newId );
1168 
1169  ((MHEG5Ingredient *)newItem)->cloned = MHEG5TRUE;
1170 
1171  switch (newItem->clazz)
1172  {
1173  case MHEG5BITMAP:
1174  MHEG5bitmapPrepare((MHEG5Bitmap *)newItem );
1175  break;
1176  case MHEG5TEXT:
1177  MHEG5textPrepare((MHEG5Text *)newItem );
1178  break;
1179  case MHEG5RECTANGLE:
1181  break;
1182  default:;
1183  }
1184  }
1185 
1186  return MHEG5ERR_NOERROR;
1187 }
1188 
1206 {
1207  assert(target);
1208  if (!target->availabilityStatus)
1209  {
1210  ((MHEG5Ingredient *) target)->cpState = CP_STATE_PRELOAD;
1211  switch (target->clazz)
1212  {
1213  case MHEG5SCENE:
1214  case MHEG5APPLICATION:
1215  ERROR_PRINT(("ERROR: target invalid class %d\n", target->clazz));
1216  break;
1217  case MHEG5LINK:
1218  MHEG5linkPrepare((MHEG5Link *) target);
1219  break;
1220  case MHEG5BITMAP:
1221  MHEG5bitmapPrepare((MHEG5Bitmap *) target);
1222  break;
1223  case MHEG5TEXT:
1224  MHEG5textPrepare((MHEG5Text *) target);
1225  break;
1226  case MHEG5LINEART:
1227  MHEG5lineartPrepare((MHEG5Lineart *) target);
1228  break;
1229  case MHEG5DYNAMICLINEART:
1231  break;
1232  case MHEG5RECTANGLE:
1234  break;
1235  case MHEG5RESIDENTPROGRAM:
1236  case MHEG5REMOTEPROGRAM:
1238  MHEG5programPrepare((MHEG5Program *) target);
1239  break;
1240  case MHEG5BOOLEANVARIABLE:
1242  break;
1243  case MHEG5INTEGERVARIABLE:
1245  break;
1248  break;
1251  break;
1254  break;
1255  case MHEG5STREAM:
1256  MHEG5streamPrepare((MHEG5Stream *) target);
1257  break;
1258  case MHEG5AUDIO:
1259  MHEG5audioPrepare((MHEG5Audio *) target);
1260  break;
1261  case MHEG5VIDEO:
1262  MHEG5videoPrepare((MHEG5Video *) target);
1263  break;
1264  #ifndef MHEG5PROFILE_UK1_06
1265  case MHEG5HOTSPOT:
1266  MHEG5hotspotPrepare((MHEG5Hotspot *)target);
1267  break;
1268  case MHEG5PUSHBUTTON:
1270  break;
1271  case MHEG5SWITCHBUTTON:
1273  break;
1274  case MHEG5RTGRAPHICS:
1276  break;
1277  case MHEG5PALETTE:
1278  MHEG5palettePrepare((MHEG5Palette *)target);
1279  break;
1280  case MHEG5CURSORSHAPE:
1282  break;
1283  #endif
1284  case MHEG5FONT:
1285  MHEG5fontPrepare((MHEG5Font *)target);
1286  break;
1287  case MHEG5TOKENGROUP:
1289  break;
1290  case MHEG5LISTGROUP:
1292  break;
1293  case MHEG5ENTRYFIELD:
1295  break;
1296  case MHEG5HYPERTEXT:
1298  break;
1299  case MHEG5SLIDER:
1300  MHEG5sliderPrepare((MHEG5Slider *)target);
1301  break;
1302  default:
1303  ERROR_PRINT(("ERROR: Preload: Unrecognised class %d\n", target->clazz));
1304  assert(0);
1305  }
1306  }
1307  return MHEG5ERR_NOERROR;
1308 }
1309 
1325 {
1326  assert(target);
1327 
1328  if (target->runningStatus)
1329  {
1330  TRACE(TERROR, ("**** object still running! id=%d ****", target->id))
1331  }
1332  else if (target->clazz != MHEG5APPLICATION && target->clazz != MHEG5SCENE)
1333  {
1334  MHEG5finalDeactivate(target);
1335  MHEG5finalDestruct(target);
1336 
1337  if (((MHEG5Ingredient *)target)->cloned)
1338  {
1339  TRACE(TSTATE, ("cloned id=%d", target->id))
1340 
1341  MHEG5groupDelItem( target->grp, (MHEG5Ingredient *)target );
1342 
1343  switch (target->clazz)
1344  {
1345  case MHEG5BITMAP:
1346  MHEG5bitmapFree((MHEG5Bitmap *)target);
1347  break;
1348  case MHEG5TEXT:
1349  MHEG5textFree((MHEG5Text *)target);
1350  break;
1351  case MHEG5RECTANGLE:
1353  break;
1354  default:
1355  TRACE(TERROR, ("Unrecognised cloned class %d", target->clazz));
1356  assert(0);
1357  }
1358 
1359  MHEG5freeMem(target);
1360  }
1361  }
1362  else
1363  {
1364  TRACE(TERROR, ("*** unload on App/Scene %d ***", target->clazz))
1365  }
1366  return MHEG5ERR_NOERROR;
1367 }
1368 
MHEG5Bool availabilityStatus
Definition: mh5root.h:52
void MHEG5refreshStreamObject(MHEG5Stream *stream)
Refresh the DSM-CC Stream Object for a given MHEG-5 Stream Object.
Implement the MHEG5 Palette Class Palette Class Defines a class to represent a colour look-up table...
void MHEG5textClearTextData(MHEG5Text *text)
Clear text data.
Definition: mh5text.c:1377
MHEG5Byte * data
Definition: mh5ingredient.h:80
MHEG5ErrorCode MHEG5unload(MHEG5Root *target, MHEG5GList *params)
Implementation of the Unload action Unload Destroys an Ingredient and provides a hint to the MHEG-5 e...
void MHEG5finalDestruct(MHEG5Root *item)
<Function description>="">
Definition: mh5final.c:160
Implement the MHEG5 Hypertext Class. The HyperText class is a subclass of the Text class...
void MHEG5rootClone(MHEG5Root *destination, MHEG5Root *source)
Implementation of the root part of the Close action.
Definition: mh5root.c:110
void MHEG5ingredientActivate(MHEG5Ingredient *ingredient)
Implementation of Activate behaviour Inherrited from Root class.
Distributor for Prepare, Destruct, Activate, Deactivate and Clone calls. Distribute the +Prepare +Des...
F_DESTROY destroy
Definition: fs_types.h:56
U32BIT size
Definition: fs_types.h:54
MHEG5Ingredient ingredient
Definition: mh5stream.h:65
Implementation of the RTGraphics class Description Defines the attributes and behaviour of non-persis...
Implement the MHEG5 Dynamiclineart Class Defines means to dynamically draw vectorial graphical object...
#define DBG_PRINTF(...)
Definition: glue_debug.h:127
void MHEG5StreamerPrepare(MHEG5Stream *stream)
Prepare for retrieval of a stream from the IP connection.
const char * data
Definition: mh5gate.c:56
Implementation of the Ingredient class.
void MHEG5requestDisplayUpdate(void)
Request display update at the end of synchronous event processing.
Definition: mh5queue.c:1855
void MHEG5octetStringVariablePrepare(MHEG5OctetStringVariable *variable)
Sets all internal attributes for the specified object to their default values.
Definition: mh5variable.c:458
void MHEG5contentVariablePrepare(MHEG5ContentVariable *variable)
Sets all internal attributes for the specified object to their default values.
Definition: mh5variable.c:606
void MHEG5ingredientInit(MHEG5Ingredient *ingredient)
Initialise a ingredient object with default values.
void MHEG5cursorShapePrepare(MHEG5CursorShape *cursorShape)
Apply the preparation behaviour of the cursorshape class Apply the preparation behaviour of the curso...
MHEG5Bool shared
Definition: mh5ingredient.h:72
void MHEG5booleanVariablePrepare(MHEG5BooleanVariable *variable)
Sets all internal attributes for the specified object to their default values.
Definition: mh5variable.c:376
#define INFO_PRINT(x)
Definition: mh5debug.h:69
void MHEG5finalDeactivate(MHEG5Root *item)
Definition: mh5final.c:354
BOOLEAN MHEG5FileOrmIsReset(MHEG5FileOrmResetMode *resetMode)
Tell whether the ORM module is currently being reset. If it is, the function also returns the current...
Definition: mh5fileorm.c:712
Implementation of the Video class Description Defines the attributes and behaviour of an elementary v...
void MHEG5rootDestruct(MHEG5Root *root)
Implementation of the Destruction behaviour Destruction This behaviour has the basic semantics of ask...
Definition: mh5root.c:247
MHEG5Root * MHEG5findObject(MH5GroupRef gid, MHEG5Int id)
Definition: mh5object.c:65
#define CHOOK_STREAM_NORMAL
Definition: mh5profile.h:107
void MHEG5ingredientContentPrepare(MHEG5Ingredient *ingredient)
Implementation of the ContentPrepare behaviour COR.1 6.6: ContentPreparation Apply the following sequ...
void MHEG5textUtf16Content(MHEG5Text *text, unsigned char *data, int len)
Content for Text objects is encoded using UTF16.
Definition: mh5text.c:961
#define FRP_DEFER_SERV
Definition: mh5fileorm.h:48
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 MG_FontFreeFile(S16BIT font_index)
free memory associated with file
Definition: mg_font.c:379
Implement the MHEG5 Stream Class Stream Class Defines the behaviour of a composition of continuous me...
MHEG5Int interchangedProgramContentHook
Implement the MHEG5 Program Class Defines means to handle execution of external pieces of procedural ...
#define CHOOK_BITMAP_NORMAL_IFRAME
Definition: mh5profile.h:94
void MG_DrawJpg(void *data, int len, MHEG5Visible *visible)
Definition: mg_bmp.c:236
#define MHEG5getMem
Definition: glue_memory.h:93
Implement the MHEG5 Hotspot Class. Defines invisible unlabelled rectangular areas on the screen that ...
MHEG5Final clazz
Definition: mh5root.h:55
Stream event subscription management.
void MG_FreeData(void *data)
free surface buffer
Definition: mg_osd.c:1536
union sMH5GroupRef::@5 ptr
#define FRP_CACHE_MASK
Definition: mh5fileorm.h:39
void MHEG5hyperTextInitCurrentLink(MHEG5Hypertext *hypertext)
Definition: mh5hypertext.c:216
void MHEG5objRefStoreValue(MHEG5ObjectRefVariable *objRef, MH5GroupRef ref, MHEG5Int id)
Definition: mh5variable.c:503
MHEG5Int lineArtContentHook
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
MHEG5ErrorCode MHEG5clone(MHEG5Root *target, MHEG5GList *params)
Implementation of the Clone action Clone (CloneRefVar) If the engine supports the Cloning option the ...
MHEG5ErrorCode MHEG5preload(MHEG5Root *target, MHEG5GList *params)
Implementation of the Preload action Preload Prepares an Ingredient and provides a hint to the MHEG-5...
MHEG5ContentBody content
Definition: mh5ingredient.h:75
MHEG5Int counterEndPosition
Definition: mh5stream.h:76
void MHEG5tokenGroupPrepare(MHEG5TokenGroup *tokenGroup)
MHEG5Rectangle * MHEG5rectangleClone(MHEG5Rectangle *source)
<Function description>="">
Definition: mh5rectangle.c:71
MHEG5String MHEG5stringCopy(MHEG5String source)
<Function description>="">
Definition: mh5base.c:574
#define FRP_CACHE_DEFAULT
Definition: mh5fileorm.h:38
Implement the MHEG5 Slider Class. Slider Class. Defines the behaviour of sliders. Base class: Visible...
void MHEG5textPrepare(MHEG5Text *text)
Apply the preparation behaviour of the text class Apply the preparation behaviour of the text class...
Definition: mh5text.c:293
void MG_DrawPng(void *data, int len, MHEG5Visible *visible)
Definition: mg_bmp.c:161
void MHEG5streamContentAdapt(MHEG5Stream *stream, S_CONTENT *content)
Adapt new content for Stream objects. Content is either a DSM-CC stream object, a DVB URL or an MPEG2...
Definition: mh5stream.c:981
MH5GroupPtr grp
Definition: mh5root.h:57
Implement the MHEG5 Variable Class 21 Variable Class Defines a variable within the context of a Group...
#define CHOOK_TEXT_UTF8
Definition: mh5profile.h:103
void MHEG5stringDestruct(MHEG5String *item)
Destruct a MHEG5String.
Definition: mh5base.c:686
void * graphic_data
Definition: mh5visible.h:64
#define CHOOK_BITMAP_JPG
Definition: mh5profile.h:99
long MHEG5Int
Definition: mh5base.h:73
#define CHOOK_BITMAP_H264_IFRAME
Definition: mh5profile.h:100
void MHEG5objectRefVariablePrepare(MHEG5ObjectRefVariable *variable)
Sets all internal attributes for the specified object to their default values.
Definition: mh5variable.c:560
Implement the MHEG5 ListGroup Class Defines the location of list elements on the screen and theire in...
void MHEG5integerVariablePrepare(MHEG5IntegerVariable *variable)
Sets all internal attributes for the specified object to their default values.
Definition: mh5variable.c:417
#define FRP_IN_APP
Definition: mh5fileorm.h:49
void MHEG5FileOrmClear(void *orm_ref)
Aborts a request for file.
Definition: mh5fileorm.c:979
MHEG5GList * MHEG5resolveGenericCRef(MHEG5GList *params, MHEG5String *data, MHEG5Bool *referenced, MHEG5Bool *valid)
Definition: mh5object.c:299
#define MHEG5freeMem
Definition: glue_memory.h:94
void MHEG5dynamicLineartPrepare(MHEG5DynamicLineart *dynamicLineart)
Apply the preparation behaviour of the dynamiclineart class Apply the preparation behaviour of the dy...
API for IC streamer.
void MHEG5videoPrepare(MHEG5Video *video)
Apply the preparation behaviour of the video class As this class has no own preparation behaviour thi...
Definition: mh5video.c:125
#define CALL_PRINT(x)
Definition: mh5debug.h:68
This file defines the profile for the MHEG engine.
#define CHOOK_FONT_TRUE_TYPE
Definition: mh5profile.h:114
void MHEG5rootPrepare(MHEG5Root *root)
Implementation of the Preparation behaviour Preparation This behaviour has the basic semantics of all...
Definition: mh5root.c:139
#define MHEG5displayRedraw(v)
Definition: mh5display.h:47
void MHEG5hotspotPrepare(MHEG5Hotspot *hotspot)
Definition: mh5hotspot.c:89
MHEG5Bool MHEG5visibleIs(MHEG5Root *target)
<Function description>="">
Definition: mh5visible.c:144
void MHEG5textUtf8Content(MHEG5Text *text, unsigned char *data, int len)
Adapt new content for Text objects. Content is encoded using UTF8 - this is converted to 16 bit unico...
Definition: mh5text.c:765
void MHEG5sliderPrepare(MHEG5Slider *slider)
Apply the preparation behaviour of the slider class Apply the preparation behaviour of the slider cla...
Definition: mh5slider.c:235
void MHEG5groupDelItem(MHEG5Group *group, MHEG5Ingredient *item)
Delete Item from the List.
Definition: mh5group.c:235
void MHEG5rectangleFree(MHEG5Rectangle *rectangle)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5rectangle.c:110
short MHEG5Bool
Definition: mh5base.h:71
void MHEG5rtgraphicsPrepare(MHEG5RTGraphics *rtgraphics)
Apply the preparation behaviour of the RTGraphics class As this class has no own preparation behaviou...
MHEG5ErrorCode
Definition: mh5base.h:222
MHEG5ErrorCode MHEG5setData(MHEG5Root *target, MHEG5GList *params)
Implementation of SetData action SetData (NewContent) Set the Content attribute of the target Ingredi...
Implement the MHEG5 Font Class Font Class Defines a class to represent a character font used for rend...
void MHEG5rootDeactivate(MHEG5Root *root)
Implementation of the Deactivation behaviour Deactivation This behaviour has the basic semantics of n...
Definition: mh5root.c:210
void MHEG5displayIFrameStart(MHEG5Bitmap *bitmap)
Start displaying an I-Frame.
Definition: mh5display.c:2614
#define CHOOK_TEXT_UTF16
Definition: mh5profile.h:104
Event handling. Implementation of a combined queue for events and actions. This is the eventsystem wh...
#define CP_STATE_PRELOAD
Definition: mh5ingredient.h:39
MHEG5Byte * data
Definition: mh5base.h:85
Implement the MHEG5 Visible Class Defines the behaviour of Presentables that have a visual representa...
void MHEG5ingredientClone(MHEG5Ingredient *destination, MHEG5Ingredient *source)
Implementation of the ingredient part of the clone action.
void MHEG5streamPrepare(MHEG5Stream *stream)
Apply the preparation behaviour of the stream class.
Definition: mh5stream.c:227
void MHEG5ingredientDeactivate(MHEG5Ingredient *ingredient)
Implementation of Deactivate behaviour Inherrited from Root class.
void MHEG5displayStreamPlay(MHEG5Stream *stream)
Begin playback of all active components in the specifed stream object.
Definition: mh5display.c:2399
void MHEG5bitmapFree(MHEG5Bitmap *bitmap)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5bitmap.c:109
#define MHEG5TRUE
Definition: mh5base.h:49
MHEG5Int bitmapContentHook
MHEG5Bool initiallyStopped
Definition: mh5ingredient.h:71
MHEG5Text * MHEG5textClone(MHEG5Text *source)
Copy a text object with original values.
Definition: mh5text.c:232
uint16_t U16BIT
Definition: techtype.h:84
Implement functions to retrieve MHEG5objects by GroupID and ID.
void MHEG5palettePrepare(MHEG5Palette *palette)
Definition: mh5palette.c:84
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.
MHEG class interface to graphics text render.
Font file handling with the Freetype.
MHEG5Int len
Definition: mh5base.h:99
MHEG5Bool runningStatus
Definition: mh5root.h:51
void MHEG5groupAddItem(MHEG5Group *group, MHEG5Ingredient *item)
Add an Item to the List.
Definition: mh5group.c:205
void MHEG5rectanglePrepare(MHEG5Rectangle *rectangle)
Definition: mh5rectangle.c:120
MHEG5Int counterPosition
Definition: mh5stream.h:75
File interface functions to DSMCC component.
void MHEG5fontRefreshTexts(MHEG5Font *font)
Refresh Text objects that reference this Font object. This function may be called after the font has ...
Definition: mh5font.c:101
Implement the MHEG5 PushButton Class. Defines labelled, largely rectangular areas on the screen...
redirection include
MHEG5Int id
Definition: mh5root.h:48
void MHEG5switchbuttonPrepare(MHEG5Switchbutton *switchbutton)
Apply the preparation behaviour of the switchbutton class Apply the preparation behaviour of the swit...
void MHEG5pushbuttonPrepare(MHEG5Pushbutton *pushbutton)
#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 MHEG5rootInit(MHEG5Root *root)
Initialise a Root object with default values.
Definition: mh5root.c:87
void MHEG5listGroupPrepare(MHEG5ListGroup *listGroup)
Implementation of the ListGroup Preparation behaviour.
Definition: mh5listgroup.c:304
MH5GroupPtr group
Definition: mh5base.h:103
Implement the MHEG5 SwitchButton Class. Defines the behaviour of pressable buttons. Base class: PushButton. Subclasses: None. Status: Concrete class.
void MHEG5fontPrepare(MHEG5Font *font)
Definition: mh5font.c:142
S16BIT MG_FontLoadFile(const U8BIT *data, U32BIT length)
Load font data file into memory for freetype.
Definition: mg_font.c:210
union sMHEG5ContentBody::@2 ref
MHEG5Int len
Definition: mh5base.h:84
void MHEG5rootActivate(MHEG5Root *root)
Implementation of the Activation behaviour Activation This behaviour has the basic semantics of immed...
Definition: mh5root.c:187
MHEG5ContentBody originalContent
Definition: mh5ingredient.h:70
void MHEG5hypertextPrepare(MHEG5Hypertext *hypertext)
Definition: mh5hypertext.c:262
U8BIT * data
Definition: fs_types.h:55
void MHEG5audioPrepare(MHEG5Audio *audio)
Apply the preparation behaviour off the audio class Apply the preparation behaviour off the audio cla...
Definition: mh5audio.c:127
void MHEG5streamContentClear(MHEG5Stream *stream)
Clear content for Stream objects.
Definition: mh5stream.c:959
void MHEG5ingredientDestruct(MHEG5Ingredient *ingredient)
Implementation of the Destruction behaviour Execute the following sequence of actions: ...
MHEG5GList * MHEG5resolveORef(MHEG5GList *params, MHEG5Root **object)
Definition: mh5object.c:126
#define INVALID_MG_FNT_INDEX
Definition: mh5font.h:40
void MHEG5lineartPrepare(MHEG5Lineart *lineart)
Definition: mh5lineart.c:215
Implement the MHEG5 Audio Class Audio Class Defines the attributes and behaviour of an elementary aud...
MHEG5Int streamContentHook
void MHEG5textFree(MHEG5Text *text)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5text.c:204
MHEG5Bool referenced
Definition: mh5ingredient.h:49
Implement generic MHEG5-display functions - independent from the OSD These are generic functions used...
FS_HANDLE fs_handle
Definition: fs_types.h:57
#define CP_STATE_CHANGED
Definition: mh5ingredient.h:40
void MHEG5ingredientPrepare(MHEG5Ingredient *ingredient)
Implementation of the Preparation behaviour Inherrited from Root class.
void MHEG5bitmapPrepare(MHEG5Bitmap *bitmap)
Apply the preparation behaviour of the bitmap class. As this class has no own preparation behaviour t...
Definition: mh5bitmap.c:146
#define MHEG5CHOOK_UNDEFINED
Definition: mh5ingredient.h:35
#define CHOOK_BITMAP_PNG
Definition: mh5profile.h:95
MHEG5Int contentHook
Definition: mh5ingredient.h:69
#define CHOOK_STREAM_IC
Definition: mh5profile.h:111
void MHEG5ingredientFree(MHEG5Ingredient *ingredient)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
void MHEG5displayStreamStop(MHEG5Stream *stream)
Stops playback of all active component of the specified stream object.
Definition: mh5display.c:2487
void MHEG5rootFree(MHEG5Root *root)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5root.c:99
MHEG5String included
Definition: mh5ingredient.h:52
#define MHEG5FALSE
Definition: mh5base.h:48
void MHEG5programPrepare(MHEG5Program *program)
Definition: mh5program.c:214
MHEG5Int textContentHook
MHEG5Bitmap * MHEG5bitmapClone(MHEG5Bitmap *source)
Copy a bitmap object with original values.
Definition: mh5bitmap.c:121
Implement the MHEG5 EntryField Class. Defines an interaction widget used by the final user to edit an...
MHEG5Application * MHEG5getCurrentApplication(void)
<Function description>="">
void MHEG5entryfieldPrepare(MHEG5Entryfield *entryfield)
Apply the preparation behaviour of the entryfield class Apply the preparation behaviour of the entryf...
#define CP_STATE_INITIAL
Definition: mh5ingredient.h:38
#define TRACE(t, x)
Definition: glue_debug.h:118