[Redbutton-devel] SF.net SVN: redbutton: [217] redbutton-browser/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-02-15 09:32:03
|
Revision: 217
http://svn.sourceforge.net/redbutton/?rev=217&view=rev
Author: skilvington
Date: 2007-02-15 01:31:49 -0800 (Thu, 15 Feb 2007)
Log Message:
-----------
make sure StreamComponents don't forget who their StreamClass is, if they are activated after the StreamClass is activated
Modified Paths:
--------------
redbutton-browser/trunk/AudioClass.c
redbutton-browser/trunk/VideoClass.c
Modified: redbutton-browser/trunk/AudioClass.c
===================================================================
--- redbutton-browser/trunk/AudioClass.c 2007-02-14 17:17:51 UTC (rev 216)
+++ redbutton-browser/trunk/AudioClass.c 2007-02-15 09:31:49 UTC (rev 217)
@@ -11,12 +11,18 @@
void
default_AudioClassInstanceVars(AudioClass *t, AudioClassInstanceVars *v)
{
- bzero(v, sizeof(AudioClassInstanceVars));
+ /*
+ * don't do:
+ * bzero(v, sizeof(AudioClassInstanceVars));
+ * or:
+ * v->owner = NULL;
+ * the whole AudioClass including these instance vars is zero'd when it is DER decoded
+ * we need to make sure v->owner is not set to NULL here
+ * in case our StreamClass is already active and has set our owner
+ */
v->Volume = t->original_volume;
- v->owner = NULL;
-
return;
}
@@ -68,7 +74,6 @@
*/
if(t->inst.owner != NULL)
StreamClass_activateAudioComponent(t->inst.owner, t);
-else printf("TODO: AudioClass_Activation: un-owned (tag=%d)\n", t->component_tag);
return;
}
@@ -89,7 +94,6 @@
*/
if(t->inst.owner != NULL)
StreamClass_deactivateAudioComponent(t->inst.owner, t);
-else printf("TODO: AudioClass_Deactivation: un-owned (tag=%d)\n", t->component_tag);
return;
}
Modified: redbutton-browser/trunk/VideoClass.c
===================================================================
--- redbutton-browser/trunk/VideoClass.c 2007-02-14 17:17:51 UTC (rev 216)
+++ redbutton-browser/trunk/VideoClass.c 2007-02-15 09:31:49 UTC (rev 217)
@@ -18,7 +18,15 @@
void
default_VideoClassInstanceVars(VideoClass *t, VideoClassInstanceVars *v)
{
- bzero(v, sizeof(VideoClassInstanceVars));
+ /*
+ * don't do:
+ * bzero(v, sizeof(VideoClassInstanceVars));
+ * or:
+ * v->owner = NULL;
+ * the whole VideoClass including these instance vars is zero'd when it is DER decoded
+ * we need to make sure v->owner is not set to NULL here
+ * in case our StreamClass is already active and has set our owner
+ */
/* VisibleClass */
memcpy(&v->BoxSize, &t->original_box_size, sizeof(OriginalBoxSize));
@@ -31,8 +39,6 @@
v->VideoDecodeOffset.x_position = 0;
v->VideoDecodeOffset.y_position = 0;
- v->owner = NULL;
-
pthread_mutex_init(&v->bbox_lock, NULL);
pthread_mutex_init(&v->scaled_lock, NULL);
v->scaled = false;
@@ -95,7 +101,6 @@
*/
if(t->inst.owner != NULL)
StreamClass_activateVideoComponent(t->inst.owner, t);
-else printf("TODO: VideoClass_Activation: un-owned (tag=%d)\n", t->component_tag);
/* now its RunningStatus is true, get it drawn at its position in the application's DisplayStack */
MHEGEngine_redrawArea(&t->inst.Position, &t->inst.BoxSize);
@@ -119,7 +124,6 @@
*/
if(t->inst.owner != NULL)
StreamClass_deactivateVideoComponent(t->inst.owner, t);
-else printf("TODO: VideoClass_Deactivation: un-owned (tag=%d)\n", t->component_tag);
/* now its RunningStatus is false, redraw the area it covered */
MHEGEngine_redrawArea(&t->inst.Position, &t->inst.BoxSize);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|