MHEG-5  19.3.0
MHEG-5 Documentation
fpa1_app.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 <stdio.h>
28 #include <stdlib.h>
29 
30 #include "vpa1_tgs.h"
31 #include "vpa1_rdf.h"
32 
33 #include "fpa1_app.h"
34 #include "fpa1_cho.h"
35 #include "fpa1_set.h"
36 #include "fpa1_syn.h"
37 #include "fpa1_BlockAlloc.h"
38 
39 /*---local typedef structs for this file-------------------------------------*/
40 
41 /*---constant definitions for this file--------------------------------------*/
42 #define APP_SET_COMPS 12
43 
44 #define DEF_ATT_CHOICE_COMPS 13
45 #define FNT_BDY_CHOICE_COMPS 2
46 
47 
48 /*---local (static) variable declarations for this file----------------------*/
49 
50 /* doesn't include COMPONENTS OF - only explicit types */
51 int appSetCompsArr[ 2 * APP_SET_COMPS + 1 ]
52  = { 2 * APP_SET_COMPS, /* array limit */
53  /* Group */
54  EXTERNAL_REFERENCE_TYPE, SYN_NEEDED,
55  STDID, SYN_OPTIONAL,
56  STDVER, SYN_OPTIONAL,
57  OBJINFO, SYN_OPTIONAL,
58  STARTUP, SYN_OPTIONAL,
59  CLOSEDOWN, SYN_OPTIONAL,
60  GCPRIO, SYN_DEFAULT,
61  ITEMS, SYN_OPTIONAL,
62  /* Application */
63  SPAWNCLOSE, SYN_OPTIONAL,
64  RESTART, SYN_OPTIONAL,
65  DEFATTS, SYN_OPTIONAL,
66  ODESKTOPCOLOUR, SYN_OPTIONAL };
67 
68 int defAttChoiceCompArr[ DEF_ATT_CHOICE_COMPS + 1 ] = { DEF_ATT_CHOICE_COMPS + 1,
69  CHARSET,
70  BACKCOL,
71  TCHOOK,
72  TCOL,
73  DEFFONT,
74  FONTATTS,
75  INTPRGCHOOK,
76  STREAMCHOOK,
77  BITMAPCHOOK,
78  LINEARTCHOOK,
79  BUTTONREFCOL,
80  HIGHREFCOL,
81  SLIDEREFCOL };
82 
83 int fontBodyChoiceCompArr[ FNT_BDY_CHOICE_COMPS + 1 ] = { FNT_BDY_CHOICE_COMPS + 1,
84  OCTETSTRING,
85  OBJECT_REFERENCE_TYPE };
86 
87 
88 /*---local function definitions----------------------------------------------*/
89 
90 /*---global function definitions---------------------------------------------*/
91 #ifdef DEBUG_TAGS
92 
93 static void fpa1_decodeAppSetList( fpa1_syntaxList *, int );
94 
99 void fpa1_decodeAppSetList( fpa1_syntaxList *listPtr, int indentCount )
100 {
101  int spaceCount = indentCount;
102  fpa1_syntaxList *startPtr = listPtr;
103 
104  while (listPtr != NULL)
105  {
106  spaceCount = indentCount;
107 
108  while (spaceCount > 0)
109  {
110  printf( " " );
111  spaceCount--;
112  }
113 
114  printf( "Application Tag %d\n", listPtr->tag );
115 
116  fpa1_decodeAppSetList( listPtr->children, indentCount + 1 );
117 
118  listPtr = listPtr->next;
119  }
120 
121  fpa1_delList( startPtr );
122 } /* fpa1_decodeAppSetList() */
123 
124 #endif
Contains functions/structure used to do MHEG-5 ASN.1 syntax parsing.
Typedefs for script reading functions.
Contains macros for MHEG-5 ASN.1 tags and structures.
syntax item block manager Contains functions to create a mini memory manager for allocating syntax li...
int fpa1_delList(fpa1_syntaxList *firstComp)
Contains functions used to parse MHEG-5 ASN.1 SETs. SETs can have components in any order and as such...
Contains functions to decode MHEG-5 ASN.1 Application class components.