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 *******************************************************************************/ 00032 #ifndef _MH5STREAM_H_ 00033 #define _MH5STREAM_H_ 00034 00035 #include "mh5presentable.h" 00036 #include "mh5visible.h" 00037 #include "dvblocator.h" 00038 #include "fs_types.h" 00039 00040 /* Video, Audio, anything else? */ 00041 #define MAX_MLTPLX 8 00042 00043 typedef enum 00044 { 00045 SS_STOPPED, 00046 SS_STOPPING, 00047 SS_STARTING, 00048 SS_PLAYING, 00049 SS_PLAYING_CLIP, 00050 SS_NEW_REF, 00051 SS_FROZEN 00052 } E_StreamState; 00053 00054 typedef struct scounterTrigger 00055 { 00056 MHEG5Int id; 00057 MHEG5Int pos; 00058 struct scounterTrigger *next; 00059 } MHEG5CounterTrigger; 00060 00061 00062 typedef struct 00063 { 00064 /* Base class */ 00065 MHEG5Ingredient ingredient; 00066 00067 /* Exchanged attributes */ 00068 MHEG5Ingredient *multiplex[MAX_MLTPLX]; 00069 MHEG5Bool storageMemory; 00070 MHEG5Bool reloading; 00071 MHEG5Int looping; 00072 00073 /* Internal attributes */ 00074 MHEG5Int speed[2]; 00075 MHEG5Int counterPosition; 00076 MHEG5Int counterEndPosition; 00077 MHEG5CounterTrigger *counterTriggers; 00078 MHEG5Int counterMaxPosition; 00079 00080 /* Engine data */ 00081 E_StreamState streamState; 00082 S_DVB_LOCATOR dvbLocator; 00083 F_DESTROY dsmClearFunc; 00084 FS_HANDLE dsmRef; 00085 } MHEG5Stream; 00086 00092 void MHEG5streamInit(MHEG5Stream *stream); 00093 00094 00102 void MHEG5streamFree(MHEG5Stream *stream); 00103 00104 /* 00105 Internal behaviours 00106 */ 00107 void MHEG5streamPrepare(MHEG5Stream *stream); 00108 void MHEG5streamActivate(MHEG5Stream *stream); 00109 void MHEG5streamDeactivate(MHEG5Stream *stream); 00110 void MHEG5streamDestruct(MHEG5Stream *stream); 00111 00112 /* 00113 Actions 00114 */ 00115 MHEG5ErrorCode MHEG5setCounterTrigger(MHEG5Root *target, MHEG5GList *params); 00116 MHEG5ErrorCode MHEG5setSpeed(MHEG5Root *target, MHEG5GList *params); 00117 MHEG5ErrorCode MHEG5setCounterPosition(MHEG5Root *target, MHEG5GList *params); 00118 MHEG5ErrorCode MHEG5setCounterEndPosition(MHEG5Root *target, MHEG5GList *params); 00119 MHEG5ErrorCode MHEG5getCounterPosition(MHEG5Root *target, MHEG5GList *params); 00120 MHEG5ErrorCode MHEG5getCounterMaxPosition(MHEG5Root *target, MHEG5GList *params); 00121 00122 00131 void MHEG5streamContentAdapt( MHEG5Stream *stream, S_CONTENT *content ); 00132 00133 00142 MHEG5Bool MHEG5streamGetCurrentService(S_DVB_LOCATOR *multiplexRef); 00143 00144 00151 void MHEG5streamFindCurrentService(void); 00152 00153 00160 void MHEG5streamSetCurrentService(MHEG5Ingredient *item, 00161 S_DvbComponent *service); 00162 00163 00168 void MHEG5streamClearCurrentService(void); 00169 00170 00177 MHEG5Int MHEG5streamGetComponentTag(MHEG5Ingredient *item); 00178 00179 00180 /* 00181 Debug 00182 */ 00183 #ifdef MH5PRINTOUT 00184 void MHEG5streamPrint(MHEG5Stream *stream, char *out); 00185 #endif 00186 00187 #endif /*_MH5STREAM_H*/