MHEG5
15.3.0
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2004 Ocean Blue Software Ltd 00004 * Copyright © 2000 Koninklijke Philips Electronics N.V 00005 * 00006 * This file is part of a DTVKit Software Component 00007 * You are permitted to copy, modify or distribute this file subject to the terms 00008 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00009 * 00010 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00011 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00012 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00013 * 00014 * If you or your organisation is not a member of DTVKit then you have access 00015 * to this source code outside of the terms of the licence agreement 00016 * and you are expected to delete this and any associated files immediately. 00017 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00018 *******************************************************************************/ 00026 #ifndef _MH5INGREDIENT_H 00027 #define _MH5INGREDIENT_H 00028 00029 /*---includes for this file--------------------------------------------------*/ 00030 00031 #include "mh5root.h" 00032 00033 /*---Constant and macro definitions for public use---------------------------*/ 00034 00035 #define MHEG5CHOOK_UNDEFINED 0xFFFF 00036 00037 /* Content preparation states assigned to 'cpState' */ 00038 #define CP_STATE_INITIAL 0 00039 #define CP_STATE_PRELOAD 1 00040 #define CP_STATE_CHANGED 2 00041 00042 00043 /*---Enumerations for public use---------------------------------------------*/ 00044 00045 /*---Global type defs for public use-----------------------------------------*/ 00046 00047 typedef struct sMHEG5ContentBody 00048 { 00049 MHEG5Bool referenced; 00050 union 00051 { 00052 MHEG5String included; 00053 struct 00054 { 00055 MHEG5String reference; 00056 MHEG5Int size; 00057 MHEG5Int priority; 00058 } referenced; 00059 } ref; 00060 } MHEG5ContentBody; 00061 00062 00063 typedef struct sMHEG5Ingredient 00064 { 00065 /* Base class */ 00066 MHEG5Root root; 00067 00068 /* Exchanged attributes */ 00069 MHEG5Int contentHook; 00070 MHEG5ContentBody originalContent; 00071 MHEG5Bool initiallyStopped; 00072 MHEG5Bool shared; 00073 00074 /* Internal attributes */ 00075 MHEG5ContentBody content; 00076 MHEG5Short cpState; 00077 00078 /* Engine data */ 00079 MHEG5Bool cloned; 00080 MHEG5Byte *data; 00081 MHEG5Int dataLen; 00082 void *ormHandle; 00083 struct sMHEG5Ingredient *next; 00084 struct sMHEG5Ingredient *prev; 00085 struct sMHEG5Ingredient *hnxt; 00086 } MHEG5Ingredient; 00087 00088 00089 /*---Global variable declarations for public use-----------------------------*/ 00090 00091 /*---Global Function prototypes for public use-------------------------------*/ 00092 00093 00094 /* 00095 Constructor 00096 */ 00102 void MHEG5ingredientInit(MHEG5Ingredient *ingredient); 00103 00104 00112 void MHEG5ingredientFree(MHEG5Ingredient *ingredient); 00113 00114 00115 /* 00116 Clone 00117 */ 00124 void MHEG5ingredientClone(MHEG5Ingredient *destination, MHEG5Ingredient *source); 00125 00126 /* 00127 Internal behaviours 00128 */ 00135 void MHEG5ingredientPrepare(MHEG5Ingredient *ingredient); 00136 00137 00153 void MHEG5ingredientContentPrepare(MHEG5Ingredient *ingredient); 00154 00155 00170 void MHEG5ingredientDestruct(MHEG5Ingredient *ingredient); 00171 00172 00179 void MHEG5ingredientActivate(MHEG5Ingredient *ingredient); 00180 00181 00188 void MHEG5ingredientDeactivate(MHEG5Ingredient *ingredient); 00189 00190 /* 00191 Actions 00192 */ 00225 MHEG5ErrorCode MHEG5setData(MHEG5Root *target, MHEG5GList *params); 00226 00227 00262 MHEG5ErrorCode MHEG5clone(MHEG5Root *target, MHEG5GList *params); 00263 00264 00281 MHEG5ErrorCode MHEG5preload(MHEG5Root *target, MHEG5GList *params); 00282 00283 00298 MHEG5ErrorCode MHEG5unload(MHEG5Root *target, MHEG5GList *params); 00299 00300 00301 #ifdef MH5PRINTOUT 00302 00308 void MHEG5ingredientPrint(MHEG5Ingredient *ingredient, char *out); 00309 00310 00311 #endif /* MH5PRINTOUT */ 00312 00313 00314 #endif /*_MH5INGREDIENT_H*/