67 U32BIT actions_cnt = 0;
70 token_ptr->actions_ptr = actions_ptr;
72 while (currItem != NULL)
74 if (currItem->tag == SEQ_SIZE_OF_ELEMENTARY_ACTION)
82 currItem = currItem->next;
84 token_ptr->actions_num = actions_cnt;
100 assert( tmpItem != NULL );
102 if (tmpItem->tag == EXTERNAL_REFERENCE_TYPE)
104 tmpItem = tmpItem->children;
111 if (tmpItem->data.stringData.len == 0)
114 token_ptr->groupid.len = 0;
115 token_ptr->groupid.ptr.group = asn1_mainGroupPtr;
119 token_ptr->groupid.len = tmpItem->data.stringData.len;
120 token_ptr->groupid.ptr.name = tmpItem->data.stringData.data;
124 tmpItem->data.stringData.len = 0;
125 tmpItem->data.stringData.data = NULL;
127 tmpItem = tmpItem->next;
134 token_ptr->id = tmpItem->data.intData;
140 token_ptr->id = tmpItem->data.intData;
142 token_ptr->groupid.len = 0;
143 token_ptr->groupid.ptr.group = asn1_mainGroupPtr;
164 DPL5((
">> asn1_decodeTokenGroup(%X,%X)\n", listPtr, tokenGrp));
169 token_ptr = tokenGrp->tokens_ptr;
174 currItem = listPtr->children;
177 while (currItem != NULL)
180 switch (currItem->tag)
183 child = currItem->children;
184 while (child != NULL)
186 if (child->tag == TOKEN_GROUP_ITEM_TYPE)
188 gchild = child->children;
191 errVal |= decodeTokenSlotRef(gchild, token_ptr);
192 gchild = gchild->next;
195 actions_ptr = decodeActionSlot(gchild->children, token_ptr, actions_ptr);
204 actions_ptr = decodeActionSlot(currItem->children, tokenGrp->tokens_ptr, actions_ptr);
209 child = currItem->children;
210 while (child != NULL)
212 if (child->tag == SEQ_SIZE_OF_INTEGER)
215 gchild = child->children;
216 while (gchild != NULL)
218 if (gchild->tag == INTEGER)
224 DPL2((
"WARNING:[ASN.1] Unexpected tag in movementTable\n"));
227 gchild = gchild->next;
235 case EXTERNAL_REFERENCE_TYPE:
237 assert( currItem->children );
238 child = currItem->children->next;
240 child->data.intData < 1)
247 tokenGrp->ingredient.root.id = child->data.intData;
251 if (currItem->data.intData < 1)
258 tokenGrp->ingredient.root.id = currItem->data.intData;
262 if (currItem->data.boolData == 0)
264 tokenGrp->ingredient.initiallyStopped = MHEG5TRUE;
268 tokenGrp->ingredient.contentHook = currItem->data.intData;
271 if (currItem->data.boolData != 0)
273 tokenGrp->ingredient.shared = MHEG5TRUE;
280 currItem = currItem->next;
286 DPL2((
"WARNING:[ASN.1] asn1_decodeTokenGroup() returns errVal = %d\n", errVal));
290 DPL5((
"<< asn1_decodeTokenGroup() Returns %d\n", errVal));
302 U32BIT itm_cnt = 1, ast_cnt = 0;
305 while (currItem != NULL)
308 switch (currItem->tag)
311 itm_cnt += currItem->childCount[0];
312 ast_cnt += currItem->childCount[2];
315 ast_cnt += currItem->childCount[0];
320 currItem = currItem->next;
322 return itm_cnt << 16 | ast_cnt;
335 U32BIT itm_cnt, ast_cnt, size;
340 ast_cnt = itm_cnt & 0xffff;
348 if (tokenGrp != NULL)
350 memset(tokenGrp, 0, size);
351 tokenGrp->ingredient.root.clazz = MHEG5TOKENGROUP;
352 tokenGrp->tokens_num = itm_cnt;
357 MHEG5freeMem( tokenGrp );
asnErr asn1_decodeTokenGroup(fpa1_syntaxList *listPtr, MHEG5TokenGroup *tokenGrp)
Decodes TokenGroup class. Refer to MHEG5 Specification (ISO/IEC 13522-2:1996), Appendix A...
Functions to create a MHEG5Action from a MHEG5 script (in the form of a list of fpa1_syntaxList struc...
Functions to create a MHEG5Ingredient from a MHEG5 script (in the form of a list of fpa1_syntaxList s...
void MHEG5tokenManagerAddRow(MHEG5TokenManager *tokenManager)
Add a new row to a TokenManager.
Contains functions/structure used to do MHEG-5 ASN.1 syntax parsing.
Functions to create a MHEG5Group from a MHEG5 script (in the form of a list of fpa1_syntaxList struct...
U32BIT asn1_getTokenGroupItemCount(fpa1_syntaxList *currItem)
Gets total count of TG Items and Action Slots.
Typedefs, macros used by all of parser. These may be duplicated elsewhere.
void MHEG5tokenManagerAddNumber(MHEG5TokenManager *tokenManager, MHEG5Int number)
Insert a number into the last element of the movement table.
typedefs etc for the whole object creation section.
Contains macros for MHEG-5 ASN.1 tags and structures.
MHEG5Ingredient * asn1_createTokenGroup(fpa1_syntaxList *listPtr)
Decodes TokenGroup class. Refer to MHEG5 Specification (ISO/IEC 13522-2:1996), Appendix A...
Functions to create a MHEG5TokenManager from a MHEG5 script (in the form of a list of fpa1_syntaxList...
Implement the MHEG5 Tokengroup Class 29 TokenGroup Class. Defines a group of Visible objects for navi...
void asn1_decodeActions(fpa1_syntaxList *listPtr, MHEG5ActionList *p_actions)
Decodes action class Refer to MHEG5 Specification (ISO/IEC 13522-2:1996), Appendix A...
Functions to create a MHEG5TokenGroup from a MHEG5 script (in the form of a list of fpa1_syntaxList s...