mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
Revert "- tuxtxt: align to mp"
This reverts commit47b10fba4c
. Origin commit data ------------------ Branch: ni/coolstream Commit:16fa8e6b8f
Author: vanhofen <vanhofen@gmx.de> Date: 2018-01-25 (Thu, 25 Jan 2018) ------------------ This commit was generated by Migit
This commit is contained in:
@@ -44,9 +44,6 @@ static int ttx_req_pause;
|
||||
static int sub_pid, sub_page;
|
||||
static bool use_gui;
|
||||
static int cfg_national_subset;
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
bool isTtxEplayer = false;
|
||||
#endif
|
||||
|
||||
static int screen_x, screen_y, screen_w, screen_h;
|
||||
|
||||
@@ -1553,11 +1550,7 @@ void tuxtx_pause_subtitle(bool pause)
|
||||
//printf("TuxTxt subtitle unpause, running %d pid %d page %d\n", reader_running, sub_pid, sub_page);
|
||||
ttx_paused = 0;
|
||||
if(!reader_running && sub_pid && sub_page)
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
tuxtx_main(sub_pid, sub_page, 0, isTtxEplayer);
|
||||
#else
|
||||
tuxtx_main(sub_pid, sub_page);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
if(!reader_running)
|
||||
@@ -1615,21 +1608,10 @@ int tuxtx_subtitle_running(int *pid, int *page, int *running)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
int tuxtx_main(int pid, int page, int source, bool isEplayer)
|
||||
#else
|
||||
int tuxtx_main(int pid, int page, int source)
|
||||
#endif
|
||||
{
|
||||
char cvs_revision[] = "$Revision: 1.95 $";
|
||||
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
if (isTtxEplayer != isEplayer) {
|
||||
tuxtxt_stop();
|
||||
tuxtxt_clear_cache();
|
||||
isTtxEplayer = isEplayer;
|
||||
}
|
||||
#endif
|
||||
use_gui = 1;
|
||||
boxed = 0;
|
||||
//printf("to init tuxtxt\n");fflush(stdout);
|
||||
@@ -1653,9 +1635,6 @@ int tuxtx_main(int pid, int page, int source)
|
||||
CFrameBuffer *fbp = CFrameBuffer::getInstance();
|
||||
lfb = fbp->getFrameBufferPointer();
|
||||
lbb = fbp->getBackBufferPointer();
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
fb_pixel_t old_border_color = fbp->getBorderColor();
|
||||
#endif
|
||||
|
||||
tuxtxt_cache.vtxtpid = pid;
|
||||
|
||||
@@ -1848,9 +1827,6 @@ int tuxtx_main(int pid, int page, int source)
|
||||
|
||||
/* update page or timestring and lcd */
|
||||
RenderPage();
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
fbp->blit();
|
||||
#endif
|
||||
} while ((RCCode != RC_HOME) && (RCCode != RC_STANDBY));
|
||||
/* if transparent mode was selected, remember the original mode */
|
||||
screenmode = prevscreenmode;
|
||||
@@ -1862,9 +1838,6 @@ int tuxtx_main(int pid, int page, int source)
|
||||
if ( initialized )
|
||||
tuxtxt_close();
|
||||
#endif
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
fbp->setBorderColor(old_border_color);
|
||||
#endif
|
||||
|
||||
printf("Tuxtxt: plugin ended\n");
|
||||
return 1;
|
||||
@@ -2319,10 +2292,6 @@ void CleanUp()
|
||||
******************************************************************************/
|
||||
int GetTeletextPIDs()
|
||||
{
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
if (isTtxEplayer)
|
||||
return 0;
|
||||
#endif
|
||||
int pat_scan, pmt_scan, sdt_scan, desc_scan, pid_test, byte, diff, first_sdt_sec;
|
||||
|
||||
unsigned char bufPAT[1024];
|
||||
@@ -2332,21 +2301,22 @@ int GetTeletextPIDs()
|
||||
/* show infobar */
|
||||
RenderMessage(ShowInfoBar);
|
||||
|
||||
unsigned char filter[DMX_FILTER_SIZE] = { 0 };
|
||||
unsigned char mask[DMX_FILTER_SIZE] = { 0 };
|
||||
unsigned char filter[DMX_FILTER_SIZE];
|
||||
unsigned char mask[DMX_FILTER_SIZE];
|
||||
int res;
|
||||
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
cDemux * dmx = new cDemux(0); // live demux
|
||||
#else
|
||||
cDemux * dmx = new cDemux(1);
|
||||
#endif
|
||||
cDemux * dmx = new cDemux(1);
|
||||
dmx->Open(DMX_PSI_CHANNEL);
|
||||
|
||||
mask[0] = 0xFF;
|
||||
mask[4] = 0xFF;
|
||||
memset(filter, 0x00, DMX_FILTER_SIZE);
|
||||
memset(mask, 0x00, DMX_FILTER_SIZE);
|
||||
|
||||
dmx->sectionFilter(0, filter, mask, 1);
|
||||
//filter[0] = 0x00;
|
||||
//mask[0] = 0xFF;
|
||||
mask[0] = 0xFF;
|
||||
mask[4] = 0xFF;
|
||||
|
||||
dmx->sectionFilter(0, filter, mask, 1);
|
||||
res = dmx->Read(bufPAT, sizeof(bufPAT));
|
||||
dmx->Stop();
|
||||
if(res <= 0) {
|
||||
@@ -2815,7 +2785,6 @@ void Menu_Init(char *menu, int current_pid, int menuitem, int hotindex)
|
||||
national_subset = national_subset_bak;
|
||||
Menu_HighlightLine(menu, MenuLine[menuitem], 1);
|
||||
Menu_UpdateHotlist(menu, hotindex, menuitem);
|
||||
CFrameBuffer::getInstance()->blit();
|
||||
}
|
||||
|
||||
void ConfigMenu(int Init)
|
||||
@@ -3401,9 +3370,6 @@ void ConfigMenu(int Init)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
CopyBB2FB();
|
||||
#endif
|
||||
UpdateLCD(); /* update number of cached pages */
|
||||
} while ((RCCode != RC_HOME) && (RCCode != RC_DBOX) && (RCCode != RC_MUTE));
|
||||
|
||||
@@ -3696,9 +3662,6 @@ void PageCatching()
|
||||
RCCode = -1;
|
||||
return;
|
||||
}
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
CopyBB2FB();
|
||||
#endif
|
||||
UpdateLCD();
|
||||
} while (RCCode != RC_OK);
|
||||
|
||||
@@ -3853,16 +3816,12 @@ void RenderCatchedPage()
|
||||
if (zoommode == 1 && catch_row > 11)
|
||||
{
|
||||
zoommode = 2;
|
||||
#if !HAVE_SPARK_HARDWARE
|
||||
CopyBB2FB();
|
||||
#endif
|
||||
}
|
||||
else if (zoommode == 2 && catch_row < 12)
|
||||
{
|
||||
zoommode = 1;
|
||||
#if !HAVE_SPARK_HARDWARE
|
||||
CopyBB2FB();
|
||||
#endif
|
||||
}
|
||||
SetPosX(catch_col);
|
||||
|
||||
@@ -3885,9 +3844,6 @@ void RenderCatchedPage()
|
||||
RenderCharFB(page_char[catch_row*40 + catch_col ], &a0);
|
||||
RenderCharFB(page_char[catch_row*40 + catch_col + 1], &a1);
|
||||
RenderCharFB(page_char[catch_row*40 + catch_col + 2], &a2);
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
CopyBB2FB();
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -3996,17 +3952,8 @@ void SwitchScreenMode(int newscreenmode)
|
||||
setfontwidth(fw);
|
||||
|
||||
CFrameBuffer *f = CFrameBuffer::getInstance();
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
if (!boxed && (f->get3DMode() == CFrameBuffer::Mode3D_off))
|
||||
videoDecoder->Pig(tx, ty, tw, th,
|
||||
f->getScreenWidth(true), f->getScreenHeight(true),
|
||||
g_settings.screen_StartX_int,
|
||||
g_settings.screen_StartY_int,
|
||||
g_settings.screen_EndX_int,
|
||||
g_settings.screen_EndY_int);
|
||||
#else
|
||||
videoDecoder->Pig(tx, ty, tw, th, f->getScreenWidth(true), f->getScreenHeight(true));
|
||||
#endif
|
||||
videoDecoder->Pig(tx, ty, tw, th,
|
||||
f->getScreenWidth(true), f->getScreenHeight(true));
|
||||
}
|
||||
else /* not split */
|
||||
{
|
||||
@@ -4893,12 +4840,7 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset)
|
||||
|
||||
void RenderCharFB(int Char, tstPageAttr *Attribute)
|
||||
{
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
if (zoommode != 2)
|
||||
RenderCharBB(Char, Attribute);
|
||||
#else
|
||||
RenderChar(Char, Attribute, zoommode, var_screeninfo.yoffset);
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -5051,9 +4993,6 @@ void RenderMessage(int Message)
|
||||
for (byte = 0; byte < 38; byte++)
|
||||
RenderCharFB(message_6[byte], &atrtable[imenuatr + 2]);
|
||||
national_subset = national_subset_back;
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
CFrameBuffer::getInstance()->blit();
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -5163,9 +5102,6 @@ void DoFlashing(int startrow)
|
||||
}
|
||||
PosY += fontheight*factor;
|
||||
}
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
CopyBB2FB();
|
||||
#endif
|
||||
}
|
||||
|
||||
void RenderPage()
|
||||
@@ -5375,9 +5311,6 @@ void RenderPage()
|
||||
RenderCharFB(ns[0],&atrtable[ATR_WB]);
|
||||
RenderCharFB(ns[1],&atrtable[ATR_WB]);
|
||||
RenderCharFB(ns[2],&atrtable[ATR_WB]);
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
CopyBB2FB();
|
||||
#endif
|
||||
|
||||
tuxtxt_cache.pageupdate=0;
|
||||
}
|
||||
@@ -5629,9 +5562,6 @@ void CopyBB2FB()
|
||||
FillBorder(*lbb, true);
|
||||
// ClearBB(*(lfb + var_screeninfo.xres * var_screeninfo.yoffset));
|
||||
}
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
f->blit();
|
||||
#endif
|
||||
|
||||
if (clearbbcolor >= 0)
|
||||
{
|
||||
@@ -5707,7 +5637,6 @@ void CopyBB2FB()
|
||||
}
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
f->mark(0, 0, var_screeninfo.xres, var_screeninfo.yres);
|
||||
f->blit();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -6340,6 +6269,8 @@ void DecodePage()
|
||||
int o = 0;
|
||||
char bitmask ;
|
||||
|
||||
|
||||
|
||||
for (r = 0; r < 25; r++)
|
||||
{
|
||||
for (c = 0; c < 40; c++)
|
||||
@@ -6409,3 +6340,11 @@ int GetRCCode()
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Local Variables: */
|
||||
/* indent-tabs-mode:t */
|
||||
/* tab-width:3 */
|
||||
/* c-basic-offset:3 */
|
||||
/* comment-column:0 */
|
||||
/* fill-column:120 */
|
||||
/* End: */
|
||||
|
Reference in New Issue
Block a user