Thread: [Redbutton-devel] SF.net SVN: redbutton: [65] redbutton-browser/trunk/MHEGEngine.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2006-05-16 13:03:28
|
Revision: 65 Author: skilvington Date: 2006-05-16 06:02:55 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=65&view=rev Log Message: ----------- remove debug printf's Modified Paths: -------------- redbutton-browser/trunk/MHEGEngine.c Modified: redbutton-browser/trunk/MHEGEngine.c =================================================================== --- redbutton-browser/trunk/MHEGEngine.c 2006-05-16 13:01:32 UTC (rev 64) +++ redbutton-browser/trunk/MHEGEngine.c 2006-05-16 13:02:55 UTC (rev 65) @@ -645,14 +645,10 @@ app = MHEGEngine_getActiveApplication(); -printf("redrawArea: LockCount=%d\n", app->inst.LockCount); - /* only redraw if the display is not locked */ if(app->inst.LockCount > 0) return; -printf("redrawArea: %d: %d,%d %d,%d: start\n", time(NULL), pos->x_position, pos->y_position, box->x_length, box->y_length); - /**************************************************************************************/ /* could do: */ /* MHEGDisplay_setClipRectangle(pos, box); */ @@ -677,13 +673,9 @@ stack = stack->next; } -printf("redrawArea: refresh\n"); - /* refresh the screen */ MHEGDisplay_refresh(&engine.display, pos, box); -printf("redrawArea: end\n"); - return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ski...@us...> - 2006-09-20 09:00:28
|
Revision: 146
http://svn.sourceforge.net/redbutton/?rev=146&view=rev
Author: skilvington
Date: 2006-09-20 02:00:19 -0700 (Wed, 20 Sep 2006)
Log Message:
-----------
don't try to access memory after we've free'd it
Modified Paths:
--------------
redbutton-browser/trunk/MHEGEngine.c
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2006-09-11 10:07:05 UTC (rev 145)
+++ redbutton-browser/trunk/MHEGEngine.c 2006-09-20 09:00:19 UTC (rev 146)
@@ -329,6 +329,10 @@
|| OctetString_cmp(¤t_scene->rootClass.inst.ref.group_identifier, &scene_id) != 0)
{
verbose("TransitionTo: %s", ExternalReference_name(&ref->u.external_reference));
+ /* UK MHEG Profile says we don't need to support transition effects */
+ /* (remember that 'to' will get destroyed when we free the action queues, so use it now if you need it) */
+ if(to->have_transition_effect)
+ error("Transition effects not supported");
/* get the active app */
current_app = MHEGEngine_getActiveApplication();
/* check the new scene is available */
@@ -386,9 +390,6 @@
SceneClass_Preparation(current_scene);
SceneClass_Activation(current_scene);
}
- /* UK MHEG Profile says we don't need to support transition effects */
- if(to->have_transition_effect)
- error("Transition effects not supported");
}
/* clean up */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2006-12-22 15:08:42
|
Revision: 163
http://svn.sourceforge.net/redbutton/?rev=163&view=rev
Author: skilvington
Date: 2006-12-22 07:08:40 -0800 (Fri, 22 Dec 2006)
Log Message:
-----------
don't free app events and actions on TransitionTo
Modified Paths:
--------------
redbutton-browser/trunk/MHEGEngine.c
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2006-12-18 16:23:09 UTC (rev 162)
+++ redbutton-browser/trunk/MHEGEngine.c 2006-12-22 15:08:40 UTC (rev 163)
@@ -304,6 +304,9 @@
OctetString scene_id;
SceneClass *current_scene;
ApplicationClass *current_app;
+ OctetString *app_gid;
+ LIST_TYPE(MHEGAsyncEvent) *ev, *next_ev;
+ LIST_TYPE(MHEGAction) *act, *next_act;
LIST_TYPE(GroupItem) *gi;
LIST_TYPE(GroupItem) *gi_tail;
@@ -369,10 +372,48 @@
SceneClass_Deactivation(current_scene);
SceneClass_Destruction(current_scene);
}
- /* now the old scene is destroyed, empty the Async event queue and any pending actions */
- LIST_FREE(&engine.async_eventq, MHEGAsyncEvent, free_MHEGAsyncEventListItem);
- LIST_FREE(&engine.main_actionq, MHEGAction, free_MHEGActionListItem);
- LIST_FREE(&engine.temp_actionq, MHEGAction, free_MHEGActionListItem);
+ /*
+ * now the old scene is destroyed,
+ * remove its events from the Async event queue and its pending actions
+ * keep events and actions associated with the app
+ */
+ app_gid = ¤t_app->rootClass.inst.ref.group_identifier;
+ /* async event queue */
+ ev = engine.async_eventq;
+ while(ev)
+ {
+ next_ev = ev->next;
+ if(OctetString_cmp(&ev->item.src.group_identifier, app_gid) != 0)
+ {
+ LIST_REMOVE(&engine.async_eventq, ev);
+ free_MHEGAsyncEventListItem(ev);
+ }
+ ev = next_ev;
+ }
+ /* main action queue */
+ act = engine.main_actionq;
+ while(act)
+ {
+ next_act = act->next;
+ if(OctetString_cmp(act->item.group_id, app_gid) != 0)
+ {
+ LIST_REMOVE(&engine.main_actionq, act);
+ free_MHEGActionListItem(act);
+ }
+ act = next_act;
+ }
+ /* temp action queue */
+ act = engine.temp_actionq;
+ while(act)
+ {
+ next_act = act->next;
+ if(OctetString_cmp(act->item.group_id, app_gid) != 0)
+ {
+ LIST_REMOVE(&engine.temp_actionq, act);
+ free_MHEGActionListItem(act);
+ }
+ act = next_act;
+ }
/* load the new scene (also free's the old one if we have one) */
if((current_scene = MHEGApp_loadScene(&engine.active_app, &scene_id)) != NULL)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-22 16:47:28
|
Revision: 187
http://svn.sourceforge.net/redbutton/?rev=187&view=rev
Author: skilvington
Date: 2007-01-22 08:47:23 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
use timeout value when searching for initial boot object
Modified Paths:
--------------
redbutton-browser/trunk/MHEGEngine.c
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2007-01-22 15:23:21 UTC (rev 186)
+++ redbutton-browser/trunk/MHEGEngine.c 2007-01-22 16:47:23 UTC (rev 187)
@@ -192,19 +192,27 @@
bool block;
unsigned int i;
bool found;
+ struct timeval start;
+ struct timeval now;
/* search order for the app to boot in the Service Gateway dir */
char *boot_order[] = { "~//a", "~//startup", NULL };
do
{
- /* search for the boot object */
+ /* search for the boot object for timeout seconds */
found = false;
- for(i=0; !found && boot_order[i] != NULL; i++)
+ gettimeofday(&start, NULL);
+ do
{
- boot_obj.size = strlen(boot_order[i]);
- boot_obj.data = boot_order[i];
- found = MHEGEngine_checkContentRef(&boot_obj);
+ for(i=0; !found && boot_order[i] != NULL; i++)
+ {
+ boot_obj.size = strlen(boot_order[i]);
+ boot_obj.data = boot_order[i];
+ found = MHEGEngine_checkContentRef(&boot_obj);
+ }
+ gettimeofday(&now, NULL);
}
+ while(!found && now.tv_sec <= (start.tv_sec + engine.timeout));
if(!found)
{
error("Unable to find boot object in service gateway");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-23 16:11:12
|
Revision: 193
http://svn.sourceforge.net/redbutton/?rev=193&view=rev
Author: skilvington
Date: 2007-01-23 08:11:01 -0800 (Tue, 23 Jan 2007)
Log Message:
-----------
add missing newline
Modified Paths:
--------------
redbutton-browser/trunk/MHEGEngine.c
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2007-01-23 15:59:30 UTC (rev 192)
+++ redbutton-browser/trunk/MHEGEngine.c 2007-01-23 16:11:01 UTC (rev 193)
@@ -1456,7 +1456,7 @@
/* need to cope with CI: at the start */
if(name->size > 2 && strncmp(name->data, "CI:", 3) == 0)
{
-printf("TODO: absoluteFilename '%.*s'", name->size, name->data);
+printf("TODO: absoluteFilename '%.*s'\n", name->size, name->data);
}
/* DSM: at the start is equivalent to ~ */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|