MHEG-5  19.3.0
MHEG-5 Documentation
fpa1_enu.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_enu.h"
34 #include "fpa1_rdf.h"
35 #include "fpa1_syn.h"
36 #include "fpa1_tgs.h"
37 
38 /*---local typedef structs for this file-------------------------------------*/
39 
40 /*---constant definitions for this file--------------------------------------*/
41 
42 
43 /*---local (static) variable declarations for this file----------------------*/
44 
45 /*---local function definitions----------------------------------------------*/
46 
47 /*---global function definitions---------------------------------------------*/
48 
53 fpa1_syntaxList* fpa1_decodeEnumeratedType( vpa1_filePos filePosLimit )
54 {
55  /* could do some range checking here .... */
56 
57  int tag;
58  vpa1_filePos curFilePosition, nextTagPosition;
59  fpa1_syntaxList *itemPtr = NULL;
60 
61  /* tag position must be set up already */
62 
63  /* get next tag */
64  curFilePosition = fpa1_rdfGetCurrentFilePosition();
65  tag = fpa1_rdfGetTag();
66 
67  if (tag == ENUMERATED)
68  {
69  nextTagPosition = fpa1_rdfGetNextTagPosn();
70 
71  itemPtr = fpa1_synCreateListItem( tag,
72  curFilePosition,
73  nextTagPosition );
74  fpa1_parseDataInt(itemPtr);
75  }
76 
77  return itemPtr;
78 } /* fpa1_decodeEnumerated ( ) */
79 
fpa1_syntaxList * fpa1_synCreateListItem(int, vpa1_filePos, vpa1_filePos)
Definition: fpa1_syn.c:161
vpa1_filePos fpa1_rdfGetCurrentFilePosition(void)
Definition: fpa1_rdf.c:253
Contains functions/globals used to read MHEG-5 ASN.1 scripts.
Contains function to parse MHEG-5 ASN.1 tags.
vpa1_filePos fpa1_rdfGetNextTagPosn(void)
Definition: fpa1_rdf.c:336
fpa1_syntaxList * fpa1_decodeEnumeratedType(vpa1_filePos filePosLimit)
Definition: fpa1_enu.c:53
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.
int fpa1_parseDataInt(fpa1_syntaxList *listPtr)
Definition: fpa1_tgs.c:346
int fpa1_rdfGetTag(void)
Definition: fpa1_rdf.c:142
Contains functions to decode MHEG-5 ASN.1 enumerated types.