1 /* 2 * GPAC - Multimedia Framework C SDK 3 * 4 * Authors: Jean Le Feuvre 5 * Copyright (c) Telecom ParisTech 2000-2012 6 * All rights reserved 7 * 8 * This file is part of GPAC / BIFS codec sub-project 9 * 10 * GPAC is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU Lesser General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 * GPAC is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License for more details. 19 * 20 * You should have received a copy of the GNU Lesser General Public 21 * License along with this library; see the file COPYING. If not, write to 22 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 24 */ 25 26 #ifndef _SFSCRIPT_H 27 #define _SFSCRIPT_H 28 29 #include <gpac/internal/bifs_dev.h> 30 31 #if !defined(GPAC_DISABLE_BIFS) && defined(GPAC_HAS_QJS) 32 33 #define NUMBITS_STATEMENT 3 34 #define NUMBITS_EXPR_TYPE 6 35 #define MAX_NUM_EXPR 100 36 37 enum 38 { 39 ST_IF=0, 40 ST_FOR=1, 41 ST_WHILE=2, 42 ST_RETURN=3, 43 ST_BREAK=5, 44 ST_CONTINUE=6, 45 ST_COMPOUND_EXPR=4, 46 ST_SWITCH=7 47 }; 48 49 enum 50 { 51 ET_CURVED_EXPR=0, 52 ET_NEGATIVE=1, 53 ET_NOT=2, 54 ET_ONESCOMP=3, 55 ET_INCREMENT=4, 56 ET_DECREMENT=5, 57 ET_POST_INCREMENT=6, 58 ET_POST_DECREMENT=7, 59 ET_CONDTEST=8, 60 ET_STRING=9, 61 ET_NUMBER=10, 62 ET_IDENTIFIER=11, 63 ET_FUNCTION_CALL=12, 64 ET_NEW=13, ET_OBJECTCONSTRUCT=13, 65 ET_OBJECT_MEMBER_ACCESS=14, 66 ET_OBJECT_METHOD_CALL=15, 67 ET_ARRAY_DEREFERENCE=16, 68 ET_ASSIGN=17, 69 ET_PLUSEQ=18, 70 ET_MINUSEQ=19, 71 ET_MULTIPLYEQ=20, 72 ET_DIVIDEEQ=21, 73 ET_MODEQ=22, 74 ET_ANDEQ=23, 75 ET_OREQ=24, 76 ET_XOREQ=25, 77 ET_LSHIFTEQ=26, 78 ET_RSHIFTEQ=27, 79 ET_RSHIFTFILLEQ=28, 80 ET_EQ=29, 81 ET_NE=30, 82 ET_LT=31, 83 ET_LE=32, 84 ET_GT=33, 85 ET_GE=34, 86 ET_PLUS=35, 87 ET_MINUS=36, 88 ET_MULTIPLY=37, 89 ET_DIVIDE=38, 90 ET_MOD=39, 91 ET_LAND=40, 92 ET_LOR=41, 93 ET_AND=42, 94 ET_OR=43, 95 ET_XOR=44, 96 ET_LSHIFT=45, 97 ET_RSHIFT=46, 98 ET_RSHIFTFILL=47, 99 ET_BOOLEAN=48, 100 ET_VAR=49, 101 ET_FUNCTION_ASSIGN=50, 102 NUMBER_OF_EXPR_TYPE=51 103 }; 104 105 GF_Err SFScript_Parse(GF_BifsDecoder *codec, SFScript *script_field, GF_BitStream *bs, GF_Node *n); 106 #ifndef GPAC_DISABLE_BIFS_ENC 107 GF_Err SFScript_Encode(GF_BifsEncoder *codec, SFScript *script_field, GF_BitStream *bs, GF_Node *n); 108 #endif 109 110 #endif /* !defined(GPAC_DISABLE_BIFS) && defined(GPAC_HAS_QJS) */ 111 112 #endif 113