* Imageinfo/Streaminfo: Use CComponentsPIP for PIP

This commit is contained in:
micha-bbg
2012-08-11 17:59:54 +02:00
committed by Thilo Graf
parent 413e224128
commit d5a00cb260
4 changed files with 21 additions and 33 deletions

View File

@@ -42,7 +42,6 @@
#include "git_version.h" #include "git_version.h"
#define GIT_DESC "GIT Desc.:" #define GIT_DESC "GIT Desc.:"
#define GIT_REV "GIT Build:" #define GIT_REV "GIT Build:"
extern cVideo * videoDecoder;
extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
@@ -66,7 +65,7 @@ static const neutrino_locale_t info_items[8] =
void CImageInfo::Init(void) void CImageInfo::Init(void)
{ {
frameBuffer = CFrameBuffer::getInstance(); frameBuffer = CFrameBuffer::getInstance();
pip = NULL;
font_head = SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME;; font_head = SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME;;
font_small = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL; font_small = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL;
font_info = SNeutrinoSettings::FONT_TYPE_MENU; font_info = SNeutrinoSettings::FONT_TYPE_MENU;
@@ -105,7 +104,7 @@ void CImageInfo::Init(void)
CImageInfo::~CImageInfo() CImageInfo::~CImageInfo()
{ {
videoDecoder->Pig(-1, -1, -1, -1); delete pip;
} }
int CImageInfo::exec(CMenuTarget* parent, const std::string &) int CImageInfo::exec(CMenuTarget* parent, const std::string &)
@@ -121,11 +120,7 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
paint(); paint();
//paint_pig( width-170, y, 215, 170);
paint_pig (width - width/3 - 10, y + 10, width/3, height/3);
neutrino_msg_t msg; neutrino_msg_t msg;
while (1) while (1)
{ {
neutrino_msg_data_t data; neutrino_msg_data_t data;
@@ -159,16 +154,8 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
void CImageInfo::hide() void CImageInfo::hide()
{ {
//frameBuffer->paintBackgroundBoxRel(0,0, max_width,max_height); pip->hide(true);
frameBuffer->paintBackground(); frameBuffer->paintBackground();
videoDecoder->Pig(-1, -1, -1, -1);
}
void CImageInfo::paint_pig(int px, int py, int w, int h)
{
//frameBuffer->paintBoxRel(px,py,w,h, COL_BACKGROUND);
frameBuffer->paintBackgroundBoxRel(px,py,w,h);
videoDecoder->Pig(px, py, w, h, frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
} }
void CImageInfo::paintLine(int xpos, int font, const char* text) void CImageInfo::paintLine(int xpos, int font, const char* text)
@@ -189,9 +176,7 @@ void CImageInfo::paint()
head_string = g_Locale->getText(LOCALE_IMAGEINFO_HEAD); head_string = g_Locale->getText(LOCALE_IMAGEINFO_HEAD);
CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, head_string); CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, head_string);
frameBuffer->paintBoxRel(0, 0, max_width, max_height, COL_INFOBAR_PLUS_0);
//frameBuffer->paintBoxRel(0, 0, max_width, max_height, COL_MENUHEAD_PLUS_0);
frameBuffer->paintBoxRel(0, 0, max_width, max_height, COL_INFOBAR_PLUS_0);
g_Font[font_head]->RenderString(xpos, ypos+ hheight+1, width, head_string, COL_MENUHEAD, 0, true); g_Font[font_head]->RenderString(xpos, ypos+ hheight+1, width, head_string, COL_MENUHEAD, 0, true);
ypos += hheight; ypos += hheight;
@@ -300,4 +285,8 @@ void CImageInfo::paint()
ypos+= sheight; ypos+= sheight;
paintLine(xpos+offset, font_small, "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."); paintLine(xpos+offset, font_small, "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.");
if (pip == NULL)
pip = new CComponentsPIP(width-width/3-10, y+10, 30);
pip->paint();
} }

View File

@@ -28,6 +28,8 @@
#include <gui/widget/menue.h> #include <gui/widget/menue.h>
#include <system/localize.h> #include <system/localize.h>
#include <driver/framebuffer.h> #include <driver/framebuffer.h>
#include <gui/widget/components.h>
class CImageInfo : public CMenuTarget class CImageInfo : public CMenuTarget
{ {
@@ -35,6 +37,7 @@ class CImageInfo : public CMenuTarget
void Init(void); void Init(void);
CConfigFile * configfile; CConfigFile * configfile;
CFrameBuffer *frameBuffer; CFrameBuffer *frameBuffer;
CComponentsPIP * pip;
int x; int x;
int y; int y;
int ypos; int ypos;
@@ -53,7 +56,6 @@ class CImageInfo : public CMenuTarget
int font_small; int font_small;
void paint(); void paint();
void paint_pig(int x, int y, int w, int h);
void paintLine(int xpos, int font, const char* text); void paintLine(int xpos, int font, const char* text);
public: public:

View File

@@ -56,7 +56,7 @@ extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
CStreamInfo2::CStreamInfo2 () CStreamInfo2::CStreamInfo2 ()
{ {
frameBuffer = CFrameBuffer::getInstance (); frameBuffer = CFrameBuffer::getInstance ();
pip = NULL;
font_head = SNeutrinoSettings::FONT_TYPE_MENU_TITLE; font_head = SNeutrinoSettings::FONT_TYPE_MENU_TITLE;
font_info = SNeutrinoSettings::FONT_TYPE_MENU; font_info = SNeutrinoSettings::FONT_TYPE_MENU;
font_small = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL; font_small = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL;
@@ -98,7 +98,7 @@ CStreamInfo2::CStreamInfo2 ()
CStreamInfo2::~CStreamInfo2 () CStreamInfo2::~CStreamInfo2 ()
{ {
videoDecoder->Pig(-1, -1, -1, -1); delete pip;
ts_close(); ts_close();
} }
@@ -252,17 +252,10 @@ int CStreamInfo2::doSignalStrengthLoop ()
void CStreamInfo2::hide () void CStreamInfo2::hide ()
{ {
videoDecoder->Pig(-1, -1, -1, -1); pip->hide(true);
frameBuffer->paintBackgroundBoxRel (0, 0, max_width, max_height); frameBuffer->paintBackgroundBoxRel (0, 0, max_width, max_height);
} }
void CStreamInfo2::paint_pig (int px, int py, int w, int h)
{
frameBuffer->paintBackgroundBoxRel (px,py, w, h);
printf("CStreamInfo2::paint_pig x %d y %d w %d h %d\n", px, py, w, h);
videoDecoder->Pig(px, py, w, h, frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
}
void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h) void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h)
{ {
int y1; int y1;
@@ -425,7 +418,10 @@ void CStreamInfo2::paint (int /*mode*/)
g_Font[font_head]->RenderString (xpos, ypos + hheight + 1, width, head_string, COL_MENUHEAD, 0, true); // UTF-8 g_Font[font_head]->RenderString (xpos, ypos + hheight + 1, width, head_string, COL_MENUHEAD, 0, true); // UTF-8
ypos += hheight; ypos += hheight;
paint_pig (width - width/3 - 10, y + 10, width/3, height/3); if (pip == NULL)
pip = new CComponentsPIP(width-width/3-10, y+10, 30);
pip->paint();
paint_techinfo (xpos, ypos); paint_techinfo (xpos, ypos);
paint_signal_fe_box (width - width/3 - 10, (y + 10 + height/3 + hheight), width/3, height/3 + hheight); paint_signal_fe_box (width - width/3 - 10, (y + 10 + height/3 + hheight), width/3, height/3 + hheight);
} else { } else {

View File

@@ -26,6 +26,7 @@
#include <gui/widget/menue.h> #include <gui/widget/menue.h>
#include <driver/framebuffer.h> #include <driver/framebuffer.h>
#include <gui/widget/components.h>
#include <gui/widget/progressbar.h> #include <gui/widget/progressbar.h>
#include <zapit/femanager.h> #include <zapit/femanager.h>
@@ -36,6 +37,7 @@ class CStreamInfo2 : public CMenuTarget
CFrameBuffer *frameBuffer; CFrameBuffer *frameBuffer;
CFrontend *frontend; CFrontend *frontend;
CComponentsPIP * pip;
int x; int x;
int y; int y;
int width; int width;
@@ -90,7 +92,6 @@ class CStreamInfo2 : public CMenuTarget
int ts_close(); int ts_close();
void paint(int mode); void paint(int mode);
void paint_pig(int x, int y, int w, int h);
void paint_techinfo(int x, int y); void paint_techinfo(int x, int y);
void paintCASystem(int xpos, int ypos); void paintCASystem(int xpos, int ypos);
void paint_signal_fe_box(int x, int y, int w, int h); void paint_signal_fe_box(int x, int y, int w, int h);