57 #include "asn1_testHarness.h" 74 extern int mheg_trace_source;
81 void MHEG5scenePrint(
MHEG5Scene *scene,
char *out)
84 int save_indent = MHEG5setIndent(0);
87 STB_DebugLogOpen( path.
data );
91 MHEG5groupPrint(&scene->
group, out);
95 MHEG_PRINT(out,
":InputEventReg ");
100 MHEG_PRINT(out,
":SceneCS ");
102 MHEG_PRINT(out,
" ");
109 MHEG_PRINT(out,
":AspectRatio ");
117 MHEG_PRINT(out,
":MovingCursor :GBoolean true");
123 MHEG_PRINT(out,
":NextScenes ");
130 MHEG_PRINT(out,
"}");
134 MHEG5setIndent(save_indent);
146 static void MHEG5sceneParseNextScenes(
MHEG5GList *nextScenes)
150 nextScene = nextScenes;
158 ERROR_PRINT((
"ERROR: NextScene parsing expected a (\n"));
161 nextScene = nextScene->
next;
166 if ((nextScene == 0) ||
169 ERROR_PRINT((
"ERROR: NextScene parsing expected an OctetString\n"));
173 nextScene = nextScene->
next;
178 if ((nextScene == 0) ||
181 ERROR_PRINT((
"ERROR: NextScene parsing expected an integer\n"));
184 nextScene = nextScene->
next;
187 if ((nextScene == 0) ||
190 ERROR_PRINT((
"ERROR: NextScene parsing expected an OctetString\n"));
193 nextScene = nextScene->
next;
219 static void MHEG5sceneRetrieved(
void *userData,
S_CONTENT *content )
230 assert( content->
data );
232 TRACE(TFILE | TEVNTS, (
"Got Scene (datalen=%ld)", content->
size))
241 if (*(content->
data) == 0xA1)
246 if (mheg_trace_source)
247 MHEG5scenePrint(newScene, 0);
252 TRACE(TERROR, (
"This scene is Text, and not ASN1 encoded!"))
256 if (newScene != NULL)
279 scene = currentScene;
322 currentScene = newScene;
338 TRACE((TFILE | TPERFORM), (
"Running Scene"))
340 TRACE((TFILE | TPERFORM), (
"Started Scene"))
347 TRACE(TERROR, (
"Bad Scene data"))
349 MHEG5LogPrintf(MHEG5WARNING,
"Couldn't parse scene\n");
358 static void MHEG5sceneRetrieveFail(
void *userData )
362 TRACE(TERROR, (
" Failed to get scene file"))
419 MHEG5LogPrintf(MHEG5CALLS,
"Scene Prepare ");
420 MHEG5LogPrintObjectPtr(MHEG5CALLS, (
MHEG5Root *) scene);
421 MHEG5LogPrintf(MHEG5CALLS,
"\n");
454 MHEG5LogPrintf(MHEG5CALLS,
"Scene Destruct ");
455 MHEG5LogPrintObjectPtr(MHEG5CALLS, (
MHEG5Root *) scene);
456 MHEG5LogPrintf(MHEG5CALLS,
"\n");
461 if (scene == currentScene)
479 MHEG5LogPrintf(MHEG5CALLS,
"Scene Activate ");
480 MHEG5LogPrintObjectPtr(MHEG5CALLS, (
MHEG5Root *)scene);
481 MHEG5LogPrintf(MHEG5CALLS,
"\n");
493 if (scene == currentScene)
579 ERROR_PRINT((
"ERROR: TransitionTo targeted to object with ID of %ld\n",
id));
589 WARNING_PRINT((
"MHEG5transitionTo - aborting TransitionTo, scene already active \n"));
605 TRACE(TFILE | TEVNTS, (
"(%.*s)", (
int)gname.
len, gname.
data));
610 MHEG5sceneRetrieved, MHEG5sceneRetrieveFail );
648 if (target != (
MHEG5Root *) currentScene)
663 fourthParam = thirdParam->
next;
731 if (target != (
MHEG5Root *) currentScene)
798 if (target != (
MHEG5Root *) currentScene)
854 if (target != (
MHEG5Root *) currentScene)
908 if (target != (
MHEG5Root *) currentScene)
920 ((
MHEG5Scene *)target)->inputEventRegister = inputRegister;
950 if (target != (
MHEG5Root *) currentScene)
963 if ((invalidString) || (inputMask.
len == 0))
void MHEG5groupDestruct(MHEG5Group *group)
Implementation of the Destruction behaviour Destruction.
Distributor for Prepare, Destruct, Activate, Deactivate and Clone calls. Distribute the +Prepare +Des...
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.
MHEG5ErrorCode MHEG5sendEventAction(MHEG5Root *target, MHEG5GList *params)
The actions inserts an event defined by the given parameters into the systems event queue...
void MHEG5sceneActivate(MHEG5Scene *scene)
Apply the activation behaviour of the scene class. As this class has no own activation behaviour this...
void MHEG5setInputEventRegister(MHEG5Int inputEventRegister)
Change the input event register. This indicates which keypresses the MHEG-5 engine requires to be pas...
int LNK_GetStringIndex(MHEG5String s)
void MHEG5finalDeactivate(MHEG5Root *item)
void MHEG5sceneFree(MHEG5Scene *scene)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
void MHEG5groupInit(MHEG5Group *group)
Initialise an Group object with default Values.
Implement the MHEG5 Cursorshape Class Defines encapsulation for the data structures used to represent...
MHEG5GList * MHEG5resolveGenericInteger(MHEG5GList *params, MHEG5Int *value)
void MHEG5groupDeactivate(MHEG5Group *group)
Implementation of the Deactivation behaviour Deactivation If group is not active, ignore behaviour...
void MHEG5groupFree(MHEG5Group *group)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
union sMH5GroupRef::@5 ptr
MHEG5Scene * asn1_parseScene(unsigned char *asnData, unsigned long dataLength)
Top level ASN.1 parser interface function. Creates and fills a MHEG5Scene object from a char array co...
void * MHEG5FileOrmGet(MHEG5String name, U16BIT priority, void *userData, F_CB_Good cbGood, F_CB_Fail cbFail)
Get a file. The file will be loaded and one of the callback functions called when request is resolved...
void MHEG5groupPrepare(MHEG5Group *group)
Implementation of the Preparation behaviour Preparation.
MHEG5Int MHEG5strToInt(MHEG5String string)
Convert a MHEG5String to a MHEG5Integer.
Interface functions for invoking the ASN.1 parser.
union MHEG5Generic::@6 value
void MHEG5sceneInit(MHEG5Scene *scene)
Initialise a scene object with default values.
void MHEG5FileOrmReset(MHEG5FileOrmResetMode resetMode)
Reset the ORM module. This function supports two modes:
MHEG5String MHEG5stringCopy(MHEG5String source)
<Function description>="">
#define FRP_CACHE_DEFAULT
void MHEG5applicationClearGroupTargets(MHEG5Application *application, MHEG5Group *group)
Clear targets of actions if they are ingredients of the given group.
Implement the MHEG5 Variable Class 21 Variable Class Defines a variable within the context of a Group...
MHEG5ErrorCode MHEG5getCursorPosition(MHEG5Root *target, MHEG5GList *params)
The effect of this action is that the current cursor position is retrieved and stored in the given va...
void MHEG5stringDestruct(MHEG5String *item)
Destruct a MHEG5String.
DVB Video functions are required by MHEG5 engine. All required functions should be non-blocking...
void MHEG5gListDestruct(MHEG5GList *item)
Destruct a list of MHEG5Generic objects.
This file defines the profile for the MHEG engine.
MHEG5GList * MHEG5resolveGenericOctetString(MHEG5GList *params, MHEG5String *value, MHEG5Bool *invalidString)
Resolve a parameter reference to a generic octet string. The reference can be either direct or indire...
void MHEG5FileOrmPreloadHint(MHEG5String name)
Provide a preload hint to DSM-CC that the specified file may be required in the future. DSM-CC could (but is not required to) acquire the file into cache.
E_ASPECT_RATIO aspectRatio
Implement Functions to support Service Gateways. Functions for standarizing several GroupIDs like +DS...
MHEG5Int inputEventRegister
MHEG5ErrorCode MHEG5setInputMask(MHEG5Root *target, MHEG5GList *params)
Change the InputMask attribute of the target Scene object. Changing the registermask will affect how ...
void MHEG5queueResetScene(MHEG5Root *grp)
Reset both event queues and the action queue, discarding any pending events and actions for this scen...
void OSDshowCursor(int cursorShape)
struct sMHEG5Ingredient * prev
Event handling. Implementation of a combined queue for events and actions. This is the eventsystem wh...
void MG_OSDMhegInit(U16BIT inWidth, U16BIT inHeight, E_ASPECT_RATIO sar)
Initialise the on screen display Initialise the font and fill in font info.
void DVB_MhegSetAspectRatio(E_ASPECT_RATIO aspect)
Set display aspect ratio.
MHEG5GList * MHEG5resolveGenericORef(MHEG5GList *params, MHEG5Root **object)
void MHEG5sceneDestruct(MHEG5Scene *scene)
Destruct a scene object.
MHEG5ErrorCode MHEG5transitionTo(MHEG5Root *target, MHEG5GList *params)
This function performs the TransitionTo action which leads to a new scene. Implementation of the Tran...
Implement functions to retrieve MHEG5objects by GroupID and ID.
MHEG5Int sceneCoordinateSystem[2]
Implementation of the MHEG5 Application Class Defines a set of Ingredient objects, which are shared within an application scope. Base class: Group Subclasses: None Status: Concrete class.
Implementation of the MHEG5 Scene Class Scene Class Defines a set of Ingredient objects to be activat...
Mheg5 logging and debug printing.
File interface functions to DSMCC component.
MHEG5ErrorCode MHEG5setCursorShape(MHEG5Root *target, MHEG5GList *params)
This action sets a new cursor shape. Implementation of the SetCursorShape (NewCursorShape) action of ...
void MHEG5applicationResolveTargets(MHEG5Application *application)
Resolve unresolved targets of actions in the application.
void MHEG5sendEvent(MHEG5Root *source, MHEG5EventType event, MHEG5Int data)
Store an event in the asynchronous event queue.
void MHEG5scenePrepare(MHEG5Scene *scene)
Apply the preparation behaviour of the scene class. As this class has no own preparation behaviour th...
void MHEG5setInputEventMask(MHEG5String *inputEventMask)
Change the input mask. This indicates which keypresses the MHEG-5 engine requires to be passed...
MHEG5Root * currentInteractible
void OSDgetCursorPosition(MHEG5Int *x, MHEG5Int *y)
MHEG5ErrorCode MHEG5setInputRegister(MHEG5Root *target, MHEG5GList *params)
Change the InputEventRegister attribute of the target Scene object. Changing the register will affect...
MHEG5Scene * MHEG5getCurrentScene(void)
This function returns the current scene.
MHEG5ErrorCode MHEG5setCursorPosition(MHEG5Root *target, MHEG5GList *params)
This action sets the cursor position to the values given as parameters. Implementation of the SetCurs...
#define USE_UNWANTED_PARAM(param)
void MHEG5displayShowAll(void)
Redisplay all active visible objects. AKD: Optimised 12/5/99.
MHEG5String MHEG5convertGID(MHEG5String *inRef)
Convert a group ID from a relative reference to an absolute reference. See UK1.05 section 8...
void MHEG5displayStreamUpdate(MHEG5Application *application)
MHEG5GList * MHEG5resolveORef(MHEG5GList *params, MHEG5Root **object)
MHEG5GList * MHEG5resolveGenericGeneric(MHEG5GList *params, MHEG5Generic *value)
References: [1] UK1 Profile - Digital Terrestrial Television - Requirements for interoperability (The...
Implement generic MHEG5-display functions - independent from the OSD These are generic functions used...
void MHEG5sceneDeactivate(MHEG5Scene *scene)
Apply the deactivation behaviour of the scene class. As this class has no own deactivation behaviour ...
void MHEG5enableEventProcessing(MHEG5Bool enable)
Enable or disable engine event processing. This function is used to implement the Call action for res...
struct sMHEG5GList * next
void OSDsetCursorPosition(MHEG5Int x, MHEG5Int y)
void MHEG5sendSync(MHEG5Root *source, MHEG5EventType event, MHEG5Int data)
Store an event in the synchronous event queue.
Key Press related functionality.
MHEG5GList * MHEG5resolveGenericORefProper(MHEG5GList *params, MH5GroupRef *pgroupRef, MHEG5Int *id)
Resolve a generic object reference, returning the object reference. The reference can be direct or in...
MHEG5Ingredient * itemTail
void MHEG5groupActivate(MHEG5Group *group)
Implementation of the Activation behaviour Activation.
MHEG5Application * MHEG5getCurrentApplication(void)
<Function description>="">