44 #define MAX_STREAMS 16 66 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
67 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
69 static U32BIT gUniqueIds = 0;
79 static void FreeFromEventList(
EventInfo *eventInfo)
83 pp_EventInfo = &event_info_list;
84 while (*pp_EventInfo != NULL)
86 if (*pp_EventInfo == eventInfo)
88 TRACE(TSTRM, (
" FREE evtInfo=0x%x evHl=%p", eventInfo, eventInfo->
eventHandle))
93 *pp_EventInfo = eventInfo->
next;
97 pp_EventInfo = &((*pp_EventInfo)->next);
112 eventInfo = event_info_list;
113 while (eventInfo != NULL)
117 TRACE(TSTRM|TEVNTS, (
"link_id=%d name=%s",
130 eventInfo = eventInfo->
next;
141 static void MHEG5streamEventNotifyCallback(
void *
info,
U8BIT *eventName,
145 TRACE(TSTRM | TEVNTS, (
"name=%s data=(%.*s) id=%u", eventName, (
int)data_len, data_ptr, (
unsigned int)
info))
165 eventInfo = event_info_list;
166 while (eventInfo != NULL)
168 if (eventInfo->
link == link)
172 eventInfo = eventInfo->
next;
174 if (eventInfo != NULL)
180 MHEG5streamEventNotifyCallback,
187 TRACE(TERROR, (
"evtInfo=0x%x reloading", eventInfo))
188 FreeFromEventList(eventInfo);
197 TRACE(TERROR, (
"unable to allocate memory"));
208 MHEG5streamEventNotifyCallback,
213 eventInfo->
next = event_info_list;
214 event_info_list = eventInfo;
218 TRACE(TERROR, (
"evtInfo=0x%x", eventInfo))
245 StreamEventSubscribe( link, stream );
264 eventInfo = event_info_list;
265 while (eventInfo != NULL)
267 if (eventInfo->
stream == stream)
270 TRACE(TSTRM, (
" FREE evtInfo=0x%x evHl=%p", eventInfo, eventInfo->
eventHandle))
271 FreeFromEventList(eventInfo);
276 eventInfo = eventInfo->
next;
293 if (stream_array[ndx] != NULL)
295 pStream = stream_array[ndx];
343 if (stream_array[ndx] == NULL)
345 stream_array[ndx] =
stream;
366 UnsubscribeActive(stream);
370 if (stream_array[ndx] == stream)
372 stream_array[ndx] = NULL;
378 MHEG5streamClear( stream );
393 if (stream_array[ndx] != NULL)
395 TRACE(TSTRM, (
"name=%s", stream_array[ndx]->ingredient.content.ref.referenced.reference.data))
398 memset(&(stream_array[ndx]->dvbLocator), 0,
sizeof(
S_DVB_LOCATOR));
400 if (stream_array[ndx]->dsmRef)
404 MHEG5streamClear( stream_array[ndx] );
420 if (stream_array[ndx] != NULL)
422 TRACE(TSTRM, (
"name=%s", stream_array[ndx]->ingredient.content.ref.referenced.reference.data))
423 assert( stream_array[ndx]->dsmRef == NULL );
448 SubscribeActive(stream);
466 SubscribeActive(stream);
483 UnsubscribeActive(stream);
498 stream = FindEventSource(link);
508 StreamEventSubscribe( link, stream );
524 eventInfo = event_info_list;
525 while (eventInfo != NULL)
527 if (eventInfo->
link == link)
529 TRACE(TSTRM, (
" FREE evtInfo=0x%x evHl=%p", eventInfo, eventInfo->
eventHandle))
530 FreeFromEventList(eventInfo);
533 eventInfo = eventInfo->
next;
E_MhegErr VQ_PutMsg(S_MhegMessage *pMsg, E_PRIORITY priority)
Post event or section message on queue. Copies data into queue.
F_MSG_PROCESS proc_msg_func
MHEG5Bool MHEG5sameGroup(MH5GroupPtr gptr, MH5GroupRef gref)
Compares group ptr with group ref to see whether they both reference the same group. The first is pointer to group, the second can be a relative group name and will be converted to absolute prior to the comparison, so two different references that resolve to reference the same group name produces a True return value.
Interface functions to DSM-CC instance for MHEG5.
MHEG5Ingredient ingredient
MHEG5Ingredient ingredient
#define CHOOK_STREAM_NORMAL
void MHEG5AppendActionList(MHEG5ActionList actions)
The supplied list of actions should execute after any already on queue.
void MHEG5notifyLinkInactive(MHEG5Link *link)
Notify that a link has become inactive.
Stream event subscription management.
union sMH5GroupRef::@5 ptr
void * MHEG5_DsmccInstance(void)
Get the DSMCC instance handle.
MHEG5ActionList linkEffect
void MHEG5ingredientContentPrepare(MHEG5Ingredient *ingredient)
Implementation of the ContentPrepare behaviour COR.1 6.6: ContentPreparation Apply the following sequ...
void MHEG5streamReloadAll(void)
Load and Subscribe all stream events.
void(* F_MSG_PROCESS)(void *data)
Function to Process voyager message.
void MHEG5notifyLinkActive(MHEG5Link *link)
Notify that a link is active.
This file provides the control interface for MHEG5 engine. The use of this component MUST comply with...
This file defines the profile for the MHEG engine.
S_StreamEvent streamEvent
Implement Functions to support Service Gateways. Functions for standarizing several GroupIDs like +DS...
void MHEG5notifyStreamStopped(MHEG5Stream *stream)
Notify that a stream has stopped.
Event handling. Implementation of a combined queue for events and actions. This is the eventsystem wh...
Implement functions to retrieve MHEG5objects by GroupID and ID.
void MHEG5refreshStreamObject(MHEG5Stream *stream)
Refresh the DSM-CC Stream Object for a given MHEG-5 Stream Object.
MHEG5Link * activeLinksHead[MHEG5LASTEVENT+1]
void MHEG5streamUnloadAll(void)
Unsubscribe and unload all stream events.
struct sSeEventInfo * next
U8BIT * MHEG5linkEventName(MHEG5Link *link)
struct sSeEventInfo EventInfo
void MHEG5streamRemove(MHEG5Stream *stream)
Remove an MHEG-5 Stream Object from repository.
void MHEG5notifyStreamRunning(MHEG5Stream *stream)
Notify that a stream is running.
union s_mhg_message::@13 data
Functions relating to Hybrid file system.
struct sMHEG5Link * nextActiveLink
void MHEG5streamAdd(MHEG5Stream *stream)
Add an MHEG-5 Stream Object to repository.