]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Patches for media player
authorChris Tallon <chris@vomp.tv>
Sun, 18 Nov 2007 17:53:34 +0000 (17:53 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 18 Nov 2007 17:53:34 +0000 (17:53 +0000)
vpicture.cc
wjpeg.cc
wjpeg.h

index c46aa62be5d8542cdbc56cb15c9ccac224631cdf..0071a323727ab98ab9538f476ae673cb8de2989e 100644 (file)
@@ -74,7 +74,7 @@ VPicture::VPicture(VMediaList *p)
   Video* video = Video::getInstance();
   setSize(video->getScreenWidth(), video->getScreenHeight());
   createBuffer();
-  jpeg.setSurface(surface);
+//  jpeg.setSurface(surface);
   jpeg.setDimensions(area.w,area.h);
   banner=NULL;
   fullname=NULL;
@@ -106,17 +106,13 @@ VPicture::~VPicture()
 
 void VPicture::draw()
 {
-  Log::getInstance()->log("VPicture::draw", Log::DEBUG, "needDraw=%d,p=%p",
-       needDraw,this);
-//  View::draw();
+  Log::getInstance()->log("VPicture::draw", Log::DEBUG, "needDraw=%d,p=%p", needDraw,this);
+  Boxx::draw();
   
   if (mediaError) {
     drawText(mediaError,20,area.h-10,Colour::LIGHTTEXT);
     return;
     }
-  if (needDraw) {
-    jpeg.draw();
-  }
 }
 
 
@@ -305,7 +301,6 @@ int VPicture::load(Media *md) {
 }
 
 void VPicture::showBanner(bool loading,int shortDisplay) {
-  //if the loading flag is set,
        //we are in the main thread - so we can (and must) safely hard destroy/create the banner
   Timers::getInstance()->cancelTimer(this,2);
   if (! filename || ! currentMedia) {
@@ -337,18 +332,15 @@ void VPicture::showBanner(bool loading,int shortDisplay) {
   if (! slideshow && shortDisplay == 0) shortDisplay=8;
   //OK we start timer if we don't load and either shortDisplay or no slideshow
   if (! loading && shortDisplay != 0)   Timers::getInstance()->setTimerD(this,2,shortDisplay);
-  if (! loading) ;  /*sendViewMsg(banner,false); upgrade to boxx */
-       else {
-               BoxStack::getInstance()->add(banner);
-               BoxStack::getInstance()->update(banner);
-       }
+       BoxStack::getInstance()->add(banner);
+       BoxStack::getInstance()->update(banner);
 
   }
 
 void VPicture::destroyBanner(bool fromTimer) {
   shortBanner=false;
   if (banner) {
-    if (fromTimer) ;/* sendViewMsg(banner,true); upgrade to boxx*/
+    if (fromTimer) sendViewMsg(banner,true); 
                else BoxStack::getInstance()->remove(banner);
     banner=NULL;
     if (! fromTimer) Timers::getInstance()->cancelTimer(this,2);
index 6deb08d8518579fb5aa9bc15d9d152a50abcebbe..2b0bda9d12ab82efbe645ee9b8932b7754e23f8d 100644 (file)
--- a/wjpeg.cc
+++ b/wjpeg.cc
@@ -334,13 +334,9 @@ int WJpeg::drawJpeg() {
   int h=cinfo.output_height;
   logger->log("BJpeg", Log::DEBUG, "JPEG startup done pw=%i ph=%i, xo=%i,yo=%i, iw=%i, ih=%i", picturew, pictureh,xpos,ypos,w,h);
 
-  // Init the surface
 
-// Temp disabled for boxx. what does this do anyway .. - cjt
-/*
   if (useImageDimensions) setDimensions(picturew, pictureh);
   fillColour(backgroundColour);
-*/
 
 
   //line len in bytes (3 bytes per Pixel) - for buffer (can be bigger then surface)
diff --git a/wjpeg.h b/wjpeg.h
index a4539d0077d8d2c353f8b19bf9ccc2da3b554aee..0f2b079e3abaf926ef79cb11cbaca10a63c5edc6 100644 (file)
--- a/wjpeg.h
+++ b/wjpeg.h
@@ -78,9 +78,7 @@ class WJpeg : public Boxx
   public:
   
     // temp for boxx
-    void setSurface(Surface* tsurface) {};
     void setDimensions(int width, int height) {area.w=width;area.h=height;};
-    void setBackgroundColour(Colour& colour) {};
   
   
     WJpeg();