[Redbutton-devel] SF.net SVN: redbutton: [196] redbutton-browser/trunk/VideoClass.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-01-24 20:16:28
|
Revision: 196
http://svn.sourceforge.net/redbutton/?rev=196&view=rev
Author: skilvington
Date: 2007-01-24 12:16:21 -0800 (Wed, 24 Jan 2007)
Log Message:
-----------
if video is disabled, draw a black rectangle where it should be
Modified Paths:
--------------
redbutton-browser/trunk/VideoClass.c
Modified: redbutton-browser/trunk/VideoClass.c
===================================================================
--- redbutton-browser/trunk/VideoClass.c 2007-01-24 17:28:12 UTC (rev 195)
+++ redbutton-browser/trunk/VideoClass.c 2007-01-24 20:16:21 UTC (rev 196)
@@ -375,18 +375,26 @@
{
XYPosition ins_pos;
OriginalBoxSize ins_box;
+ MHEGColour black;
verbose("VideoClass: %s; render", ExternalReference_name(&t->rootClass.inst.ref));
- /* if the MHEGStreamPlayer failed to open the video stream, don't display anything */
- if(t->inst.no_video)
- return;
-
if(!intersects(pos, box, &t->inst.Position, &t->inst.BoxSize, &ins_pos, &ins_box))
return;
- /* make a transparent hole in the MHEG overlay so we can see the video below it */
- MHEGDisplay_fillTransparentRectangle(d, &ins_pos, &ins_box);
+ /*
+ * if we have no video stream, just draw a black rectangle
+ * if we do have a video stream, make a transparent hole in the MHEG overlay so we can see the video below it
+ */
+ if(t->inst.no_video)
+ {
+ MHEGColour_black(&black);
+ MHEGDisplay_fillRectangle(d, &ins_pos, &ins_box, &black);
+ }
+ else
+ {
+ MHEGDisplay_fillTransparentRectangle(d, &ins_pos, &ins_box);
+ }
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|