From baf148570fafbff33749a36c147444e7141f4143 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 18 Nov 2007 17:53:34 +0000 Subject: [PATCH] Patches for media player --- vpicture.cc | 20 ++++++-------------- wjpeg.cc | 4 ---- wjpeg.h | 2 -- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/vpicture.cc b/vpicture.cc index c46aa62..0071a32 100644 --- a/vpicture.cc +++ b/vpicture.cc @@ -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); diff --git a/wjpeg.cc b/wjpeg.cc index 6deb08d..2b0bda9 100644 --- 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 a4539d0..0f2b079 100644 --- 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(); -- 2.39.2