mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
* Imageinfo/Streaminfo: Use CComponentsPIP for PIP
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
#include "git_version.h"
|
||||
#define GIT_DESC "GIT Desc.:"
|
||||
#define GIT_REV "GIT Build:"
|
||||
extern cVideo * videoDecoder;
|
||||
|
||||
extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
|
||||
|
||||
@@ -66,7 +65,7 @@ static const neutrino_locale_t info_items[8] =
|
||||
void CImageInfo::Init(void)
|
||||
{
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
|
||||
pip = NULL;
|
||||
font_head = SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME;;
|
||||
font_small = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL;
|
||||
font_info = SNeutrinoSettings::FONT_TYPE_MENU;
|
||||
@@ -105,7 +104,7 @@ void CImageInfo::Init(void)
|
||||
|
||||
CImageInfo::~CImageInfo()
|
||||
{
|
||||
videoDecoder->Pig(-1, -1, -1, -1);
|
||||
delete pip;
|
||||
}
|
||||
|
||||
int CImageInfo::exec(CMenuTarget* parent, const std::string &)
|
||||
@@ -121,11 +120,7 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
|
||||
|
||||
paint();
|
||||
|
||||
//paint_pig( width-170, y, 215, 170);
|
||||
paint_pig (width - width/3 - 10, y + 10, width/3, height/3);
|
||||
|
||||
neutrino_msg_t msg;
|
||||
|
||||
while (1)
|
||||
{
|
||||
neutrino_msg_data_t data;
|
||||
@@ -159,16 +154,8 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
|
||||
|
||||
void CImageInfo::hide()
|
||||
{
|
||||
//frameBuffer->paintBackgroundBoxRel(0,0, max_width,max_height);
|
||||
pip->hide(true);
|
||||
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)
|
||||
@@ -189,8 +176,6 @@ void CImageInfo::paint()
|
||||
|
||||
head_string = g_Locale->getText(LOCALE_IMAGEINFO_HEAD);
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, head_string);
|
||||
|
||||
//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);
|
||||
|
||||
@@ -300,4 +285,8 @@ void CImageInfo::paint()
|
||||
|
||||
ypos+= sheight;
|
||||
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();
|
||||
}
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#include <gui/widget/menue.h>
|
||||
#include <system/localize.h>
|
||||
#include <driver/framebuffer.h>
|
||||
#include <gui/widget/components.h>
|
||||
|
||||
|
||||
class CImageInfo : public CMenuTarget
|
||||
{
|
||||
@@ -35,6 +37,7 @@ class CImageInfo : public CMenuTarget
|
||||
void Init(void);
|
||||
CConfigFile * configfile;
|
||||
CFrameBuffer *frameBuffer;
|
||||
CComponentsPIP * pip;
|
||||
int x;
|
||||
int y;
|
||||
int ypos;
|
||||
@@ -53,7 +56,6 @@ class CImageInfo : public CMenuTarget
|
||||
int font_small;
|
||||
|
||||
void paint();
|
||||
void paint_pig(int x, int y, int w, int h);
|
||||
void paintLine(int xpos, int font, const char* text);
|
||||
|
||||
public:
|
||||
|
@@ -56,7 +56,7 @@ extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
||||
CStreamInfo2::CStreamInfo2 ()
|
||||
{
|
||||
frameBuffer = CFrameBuffer::getInstance ();
|
||||
|
||||
pip = NULL;
|
||||
font_head = SNeutrinoSettings::FONT_TYPE_MENU_TITLE;
|
||||
font_info = SNeutrinoSettings::FONT_TYPE_MENU;
|
||||
font_small = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL;
|
||||
@@ -98,7 +98,7 @@ CStreamInfo2::CStreamInfo2 ()
|
||||
|
||||
CStreamInfo2::~CStreamInfo2 ()
|
||||
{
|
||||
videoDecoder->Pig(-1, -1, -1, -1);
|
||||
delete pip;
|
||||
ts_close();
|
||||
}
|
||||
|
||||
@@ -252,17 +252,10 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
||||
|
||||
void CStreamInfo2::hide ()
|
||||
{
|
||||
videoDecoder->Pig(-1, -1, -1, -1);
|
||||
pip->hide(true);
|
||||
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)
|
||||
{
|
||||
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
|
||||
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_signal_fe_box (width - width/3 - 10, (y + 10 + height/3 + hheight), width/3, height/3 + hheight);
|
||||
} else {
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include <gui/widget/menue.h>
|
||||
|
||||
#include <driver/framebuffer.h>
|
||||
#include <gui/widget/components.h>
|
||||
#include <gui/widget/progressbar.h>
|
||||
#include <zapit/femanager.h>
|
||||
|
||||
@@ -36,6 +37,7 @@ class CStreamInfo2 : public CMenuTarget
|
||||
|
||||
CFrameBuffer *frameBuffer;
|
||||
CFrontend *frontend;
|
||||
CComponentsPIP * pip;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
@@ -90,7 +92,6 @@ class CStreamInfo2 : public CMenuTarget
|
||||
int ts_close();
|
||||
|
||||
void paint(int mode);
|
||||
void paint_pig(int x, int y, int w, int h);
|
||||
void paint_techinfo(int x, int y);
|
||||
void paintCASystem(int xpos, int ypos);
|
||||
void paint_signal_fe_box(int x, int y, int w, int h);
|
||||
|
Reference in New Issue
Block a user