MHEG-5  19.3.0
MHEG-5 Documentation
fpa1_sce.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_sce.h"
34 #include "fpa1_set.h"
35 #include "fpa1_seq.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 SCENE_SET_COMPS 14
43 
44 #define SCENE_COORD_SYS_SEQ_COMPS 2
45 #define NEXT_SCENE_SEQ_COMPS 2
46 
47 
48 /*---local (static) variable declarations for this file----------------------*/
49 
50 /* doesn't include COMPONENTS OF - only explicit types */
51 int sceneSetCompsArr[ 2 * SCENE_SET_COMPS + 1 ]
52  = { 2 * SCENE_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  /* Scene */
63  INEVENT, SYN_NEEDED,
64  SCENECOORDS, SYN_NEEDED,
65  ASPECT, SYN_DEFAULT,
66  MOVING, SYN_DEFAULT,
67  NEXTSCN, SYN_OPTIONAL,
68  OINPUTMASK, SYN_OPTIONAL };
69 
70 /* SEQUENCES */
71 int sneCoordSysSeqCompArr[ 2 * SCENE_COORD_SYS_SEQ_COMPS + 1 ]
72  = { 2 * SCENE_COORD_SYS_SEQ_COMPS, /* limit */
73  INTEGER, SYN_NEEDED,
74  INTEGER, SYN_NEEDED };
75 
76 int nextSceneSeqCompArr[ 2 * NEXT_SCENE_SEQ_COMPS + 1 ]
77  = { 2 * NEXT_SCENE_SEQ_COMPS, /* limit */
78  OCTETSTRING, SYN_NEEDED,
79  INTEGER, SYN_NEEDED };
80 
81 /*---local function definitions----------------------------------------------*/
82 
83 /*---global function definitions---------------------------------------------*/
84 
85 #ifdef DEBUG_TAGS
86 
90 static void fpa1_decodeSceneSetList( fpa1_syntaxList *listPtr, int indentCount )
91 {
92  int spaceCount = indentCount;
93  fpa1_syntaxList *startPtr = listPtr;
94 
95  while (listPtr != NULL)
96  {
97  spaceCount = indentCount;
98 
99  while (spaceCount > 0)
100  {
101  printf( " " );
102  spaceCount--;
103  }
104 
105  printf( "Scene Tag %d\n", listPtr->tag );
106  fpa1_decodeSceneSetList( listPtr->children, indentCount + 1 );
107 
108  listPtr = listPtr->next;
109  }
110 
111  fpa1_delList( startPtr );
112 } /* fpa1_decodeSceneSetList() */
113 
114 #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 to decode MHEG-5 ASN.1 Scene class components.
Contains functions used to parse MHEG-5 ASN.1 SETs. SETs can have components in any order and as such...
Contains functions used to parse MHEG-5 ASN.1 SEQUENCEs. SEQUENCEs have components in order...