mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
Fix picture view move; Enable hw blit for picture/logo; Move channel logo display after all channellist shown
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@273 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -1516,7 +1516,8 @@ void * CFrameBuffer::convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsi
|
||||
unsigned int *fbbuff;
|
||||
unsigned long count = x*y;
|
||||
|
||||
fbbuff = (unsigned int *) malloc(count * sizeof(unsigned int));
|
||||
//fbbuff = (unsigned int *) malloc(count * sizeof(unsigned int));
|
||||
fbbuff = (unsigned int *) cs_malloc_uncached(count * sizeof(unsigned int));
|
||||
if(fbbuff == NULL)
|
||||
{
|
||||
printf("convertRGB2FB: Error: malloc\n");
|
||||
@@ -1608,6 +1609,5 @@ void CFrameBuffer::displayRGB(unsigned char *rgbbuff, int x_size, int y_size, in
|
||||
CFrameBuffer::getInstance()->Clear();
|
||||
|
||||
blit2FB(fbbuff, x_size, y_size, x_offs, y_offs, x_pan, y_pan);
|
||||
free(fbbuff);
|
||||
cs_free_uncached(fbbuff);
|
||||
}
|
||||
|
||||
|
@@ -387,7 +387,7 @@ void CPictureViewer::showBusy (int sx, int sy, int width, char r, char g, char b
|
||||
m_busy_y = sy;
|
||||
m_busy_width = width;
|
||||
m_busy_cpp = cpp;
|
||||
free (fb_buffer);
|
||||
cs_free_uncached (fb_buffer);
|
||||
// dbout("Show Busy}\n");
|
||||
}
|
||||
|
||||
@@ -546,12 +546,10 @@ printf("getImage: resize %s to %d x %d \n", name.c_str (), width, height);
|
||||
y = height;
|
||||
}
|
||||
ret = (fb_pixel_t *) CFrameBuffer::getInstance()->convertRGB2FB(buffer, x, y, convertSetupAlpha2Alpha(g_settings.infobar_alpha));
|
||||
free(buffer);
|
||||
} else {
|
||||
printf ("Error decoding file %s\n", name.c_str ());
|
||||
free (buffer);
|
||||
buffer = NULL;
|
||||
}
|
||||
free(buffer);
|
||||
} else
|
||||
printf("Error open file %s\n", name.c_str ());
|
||||
|
||||
|
@@ -552,8 +552,10 @@ int CChannelList::show()
|
||||
liststart = (selected/listmaxshow)*listmaxshow;
|
||||
if(oldliststart!=liststart)
|
||||
paint();
|
||||
else
|
||||
else {
|
||||
paintItem(selected - liststart);
|
||||
showChannelLogo();
|
||||
}
|
||||
|
||||
if(new_mode_active && SameTP()) { actzap = true; zapTo(selected); }
|
||||
//paintHead();
|
||||
@@ -578,8 +580,10 @@ int CChannelList::show()
|
||||
liststart = (selected/listmaxshow)*listmaxshow;
|
||||
if(oldliststart!=liststart)
|
||||
paint();
|
||||
else
|
||||
else {
|
||||
paintItem(selected - liststart);
|
||||
showChannelLogo();
|
||||
}
|
||||
|
||||
if(new_mode_active && SameTP()) { actzap = true; zapTo(selected); }
|
||||
//paintHead();
|
||||
@@ -671,7 +675,7 @@ int CChannelList::show()
|
||||
for(i = selected+1; i < chanlist.size(); i++) {
|
||||
char firstCharOfTitle = chanlist[i]->name.c_str()[0];
|
||||
if(tolower(firstCharOfTitle) == smsKey) {
|
||||
//printf("SMS chan found was= %d selected= %d i= %d %s\n", was_sms, selected, i, chanlist[i]->channel->name.c_str());
|
||||
//printf("SMS chan found was= %d selected= %d i= %d %s\n", was_sms, selected, i, chanlist[i]->channel->name.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -679,7 +683,7 @@ int CChannelList::show()
|
||||
for(i = 0; i < chanlist.size(); i++) {
|
||||
char firstCharOfTitle = chanlist[i]->name.c_str()[0];
|
||||
if(tolower(firstCharOfTitle) == smsKey) {
|
||||
//printf("SMS chan found was= %d selected= %d i= %d %s\n", was_sms, selected, i, chanlist[i]->channel->name.c_str());
|
||||
//printf("SMS chan found was= %d selected= %d i= %d %s\n", was_sms, selected, i, chanlist[i]->channel->name.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -695,6 +699,7 @@ int CChannelList::show()
|
||||
paint();
|
||||
} else {
|
||||
paintItem(selected - liststart);
|
||||
showChannelLogo();
|
||||
}
|
||||
}
|
||||
c_SMSKeyInput->resetOldKey();
|
||||
@@ -729,7 +734,7 @@ int CChannelList::show()
|
||||
hide();
|
||||
if (bShowBouquetList) {
|
||||
res = bouquetList->exec(true);
|
||||
printf("CChannelList:: bouquetList->exec res %d\n", res);
|
||||
printf("CChannelList:: bouquetList->exec res %d\n", res);
|
||||
}
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||
new_mode_active = 0;
|
||||
@@ -740,7 +745,7 @@ printf("CChannelList:: bouquetList->exec res %d\n", res);
|
||||
if(zapOnExit)
|
||||
res = selected;
|
||||
|
||||
printf("CChannelList::show *********** res %d\n", res);
|
||||
printf("CChannelList::show *********** res %d\n", res);
|
||||
return(res);
|
||||
}
|
||||
|
||||
@@ -1432,6 +1437,15 @@ void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/)
|
||||
}
|
||||
}
|
||||
|
||||
void CChannelList::showChannelLogo()
|
||||
{
|
||||
frameBuffer->paintBoxRel(x + width - 100 - PIC_W, y+(theight-PIC_H)/2, PIC_W, PIC_H, COL_MENUHEAD_PLUS_0);
|
||||
|
||||
std::string lname;
|
||||
if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->name, lname))
|
||||
g_PicViewer->DisplayImage(lname, x + width - 100 - PIC_W, y+(theight-PIC_H)/2, PIC_W, PIC_H);
|
||||
}
|
||||
|
||||
void CChannelList::paintItem(int pos)
|
||||
{
|
||||
int ypos = y+ theight+0 + pos*fheight;
|
||||
@@ -1449,13 +1463,14 @@ void CChannelList::paintItem(int pos)
|
||||
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
|
||||
paintItem2DetailsLine (pos, curr);
|
||||
paintDetails(curr);
|
||||
|
||||
#if 0
|
||||
frameBuffer->paintBoxRel(x + width - 100 - PIC_W, y+(theight-PIC_H)/2, PIC_W, PIC_H, COL_MENUHEAD_PLUS_0);
|
||||
//g_PicViewer->DisplayLogo(chanlist[selected]->channel_id, x + width - 100 - PIC_W, y+(theight-PIC_H)/2, PIC_W, PIC_H);
|
||||
|
||||
std::string lname;
|
||||
if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->name, lname))
|
||||
g_PicViewer->DisplayImage(lname, x + width - 100 - PIC_W, y+(theight-PIC_H)/2, PIC_W, PIC_H);
|
||||
|
||||
#endif
|
||||
frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, ROUND_RADIUS);
|
||||
} else {
|
||||
color = iscurrent ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE;
|
||||
@@ -1676,7 +1691,7 @@ void CChannelList::paint()
|
||||
int sbs= (selected/listmaxshow);
|
||||
|
||||
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3);
|
||||
|
||||
showChannelLogo();
|
||||
}
|
||||
|
||||
int CChannelList::getSize() const
|
||||
|
@@ -84,6 +84,7 @@ class CChannelList
|
||||
void paint();
|
||||
void paintHead();
|
||||
void hide();
|
||||
void showChannelLogo();
|
||||
|
||||
public:
|
||||
CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false );
|
||||
|
@@ -397,7 +397,7 @@ int CPictureViewerGui::show()
|
||||
}
|
||||
else if ( msg == CRCInput::RC_1 )
|
||||
{
|
||||
if (m_state != MENU)
|
||||
if (m_state != MENU && !playlist.empty())
|
||||
{
|
||||
m_viewer->Zoom(2.0/3);
|
||||
}
|
||||
@@ -405,14 +405,14 @@ int CPictureViewerGui::show()
|
||||
}
|
||||
else if ( msg == CRCInput::RC_2 )
|
||||
{
|
||||
if (m_state != MENU)
|
||||
if (m_state != MENU && !playlist.empty())
|
||||
{
|
||||
m_viewer->Move(0,-50);
|
||||
}
|
||||
}
|
||||
else if ( msg == CRCInput::RC_3 )
|
||||
{
|
||||
if (m_state != MENU)
|
||||
if (m_state != MENU && !playlist.empty())
|
||||
{
|
||||
m_viewer->Zoom(1.5);
|
||||
}
|
||||
@@ -420,7 +420,7 @@ int CPictureViewerGui::show()
|
||||
}
|
||||
else if ( msg == CRCInput::RC_4 )
|
||||
{
|
||||
if (m_state != MENU)
|
||||
if (m_state != MENU && !playlist.empty())
|
||||
{
|
||||
m_viewer->Move(-50,0);
|
||||
}
|
||||
@@ -447,14 +447,14 @@ int CPictureViewerGui::show()
|
||||
}
|
||||
else if ( msg == CRCInput::RC_6 )
|
||||
{
|
||||
if (m_state != MENU && playlist.empty())
|
||||
if (m_state != MENU && !playlist.empty())
|
||||
{
|
||||
m_viewer->Move(50,0);
|
||||
}
|
||||
}
|
||||
else if ( msg == CRCInput::RC_8 )
|
||||
{
|
||||
if (m_state != MENU && playlist.empty())
|
||||
if (m_state != MENU && !playlist.empty())
|
||||
{
|
||||
m_viewer->Move(0,50);
|
||||
}
|
||||
|
Reference in New Issue
Block a user