radiotext: cleanup from tons of unused code; rass is dead

Origin commit data
------------------
Branch: ni/coolstream
Commit: e8bb447fcf
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-27 (Mon, 27 Nov 2017)

Origin message was:
------------------
- radiotext: cleanup from tons of unused code; rass is dead

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-11-27 16:47:50 +01:00
parent 7a0dc09bef
commit 6dcd5baf4c
4 changed files with 0 additions and 1853 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -46,21 +46,10 @@
#ifndef __RADIO_AUDIO_H
#define __RADIO_AUDIO_H
#if 0
#include <vdr/player.h>
#include <vdr/device.h>
#include <vdr/audio.h>
#include <vdr/osd.h>
#include <vdr/menu.h>
#include <vdr/receiver.h>
#endif
#include <dmx.h>
#include <OpenThreads/Thread>
#include <OpenThreads/Condition>
//#define ENABLE_RASS
typedef unsigned char uchar;
typedef unsigned int uint;
@@ -68,22 +57,6 @@ extern const char *ConfigDir;
extern const char *DataDir;
extern char *ReplayFile;
#if 0
// RDS-Receiver for seperate Data-Pids
class cRDSReceiver : public cReceiver {
private:
int pid;
bool rt_start;
bool rt_bstuff;
protected:
virtual void Receive(uchar *Data, int Length);
public:
cRDSReceiver(int Pid);
virtual ~cRDSReceiver(void);
};
#endif
#define RT_MEL 65
#define tr(a) a
@@ -101,18 +74,10 @@ private:
int first_packets;
//Radiotext
#if 0
// cDevice *rdsdevice;
void RadiotextCheckPES(const uchar *Data, int Length);
void AudioRecorderService(void);
#endif
void RadioStatusMsg(void);
void RassDecode(uchar *Data, int Length);
bool DividePes(unsigned char *data, int length, int *substart, int *subend);
uint pid;
//pthread_t threadRT;
//int dmxfd;
OpenThreads::Mutex mutex;
OpenThreads::Mutex pidmutex;
@@ -125,7 +90,6 @@ public:
CRadioText(void);
~CRadioText(void);
int PES_Receive(unsigned char *data, int len);
int RassImage(int QArchiv, int QKey, bool DirUp);
void EnableRadioTextProcessing(const char *Titel, bool replay = false);
void DisableRadioTextProcessing();
void RadiotextDecode(uchar *Data, int Length);
@@ -156,9 +120,7 @@ public:
int S_RtBgTra;
int S_RtFgCol;
int S_RtDispl;
int S_RassText;
int S_RtMsgItems;
// uint32_t rt_color[9];
int S_Verbose;
// Radiotext
@@ -173,80 +135,8 @@ public:
int RT_OsdTOTemp;
char RDS_PTYN[9];
char *RT_Titel, *RTp_Titel;
#if ENABLE_RASS
// Rass ...
int Rass_Show; // -1=No, 0=Yes, 1=display
int Rass_Archiv; // -1=Off, 0=Index, 1000-9990=Slidenr.
bool Rass_Flags[11][4]; // Slides+Gallery existent
#endif
};
#if 0
class cRadioTextOsd : public cOsdObject {
private:
cOsd *osd;
cOsd *qosd;
cOsd *qiosd;
const cFont *ftitel;
const cFont *ftext;
int fheight;
int bheight;
eKeys LastKey;
cTimeMs osdtimer;
void rtp_print(void);
bool rtclosed;
bool rassclosed;
static cBitmap rds, arec, rass;
static cBitmap index, marker, page1, pages2, pages3, pages4, pageE;
static cBitmap no0, no1, no2, no3, no4, no5, no6, no7, no8, no9, bok;
public:
cRadioTextOsd();
~cRadioTextOsd();
virtual void Hide(void);
virtual void Show(void);
virtual void ShowText(void);
virtual void RTOsdClose(void);
int RassImage(int QArchiv, int QKey, bool DirUp);
virtual void RassOsd(void);
virtual void RassOsdTip(void);
virtual void RassOsdClose(void);
virtual void RassImgSave(char *size, int pos);
virtual eOSState ProcessKey(eKeys Key);
virtual bool IsInteractive(void) { return false; }
};
class cRTplusOsd : public cOsdMenu {
private:
int bcount;
int helpmode;
const char *listtyp[7];
char *btext[7];
int rtptyp(char *btext);
void rtp_fileprint(void);
public:
cRTplusOsd(void);
virtual ~cRTplusOsd();
virtual void Load(void);
virtual void Update(void);
virtual eOSState ProcessKey(eKeys Key);
};
class cRTplusList : public cOsdMenu {
private:
int typ;
bool refresh;
public:
cRTplusList(int Typ = 0);
~cRTplusList();
virtual void Load(void);
virtual void Update(void);
virtual eOSState ProcessKey(eKeys Key);
};
#endif
// Radiotext-Memory
#define MAX_RTPC 50
struct rtp_classes {

View File

@@ -26,19 +26,8 @@
#include <stdio.h>
#include <sys/time.h>
/* for timetest */
//#include <time.h>
//#include <sys/time.h>
unsigned short crc16_ccitt(unsigned char *daten, int len, bool skipfirst)
{
/* timetest */
//struct timeval t;
//unsigned long long tstart = 0;
//if (gettimeofday(&t, NULL) == 0)
// tstart = t.tv_sec*1000000 + t.tv_usec;
// CRC16-CCITT: x^16 + x^12 + x^5 + 1
// with start 0xffff and result invers
register unsigned short crc = 0xffff;
if (skipfirst) daten++;
@@ -50,10 +39,6 @@ unsigned short crc16_ccitt(unsigned char *daten, int len, bool skipfirst)
crc ^= ((crc & 0xff) << 4) << 1;
}
/* timetest */
//if (tstart > 0 && gettimeofday(&t, NULL) == 0)
// printf("vdr-radio: crc-calctime = %d usec\n", (int)((t.tv_sec*1000000 + t.tv_usec) - tstart));
return ~(crc);
}
@@ -72,30 +57,3 @@ cTimeMs::cTimeMs(void)
{
Set();
}
#if 0
uint64_t cTimeMs::Now(void)
{
struct timeval t;
if (gettimeofday(&t, NULL) == 0)
return (uint64_t(t.tv_sec)) * 1000 + t.tv_usec / 1000;
return 0;
}
void cTimeMs::Set(int Ms)
{
begin = Now() + Ms;
}
bool cTimeMs::TimedOut(void)
{
return Now() >= begin;
}
uint64_t cTimeMs::Elapsed(void)
{
return Now() - begin;
}
#endif
//--------------- End -----------------------------------------------------------------

View File

@@ -1479,26 +1479,6 @@ void CInfoViewer::showRadiotext()
}
// yoff = 17;
ii = 1;
#if 0
// RDS- or Rass-Symbol, ARec-Symbol or Bitrate
int inloff = (ftitel->Height() + 9 - 20) / 2;
if (Rass_Flags[0][0]) {
osd->DrawBitmap(Setup.OSDWidth-51, inloff, rass, bcolor, fcolor);
if (ARec_Record)
osd->DrawBitmap(Setup.OSDWidth-107, inloff, arec, bcolor, 0xFFFC1414); // FG=Red
else
inloff = (ftitel->Height() + 9 - ftext->Height()) / 2;
osd->DrawText(4, inloff, RadioAudio->bitrate, fcolor, clrTransparent, ftext, Setup.OSDWidth-59, ftext->Height(), taRight);
}
else {
osd->DrawBitmap(Setup.OSDWidth-84, inloff, rds, bcolor, fcolor);
if (ARec_Record)
osd->DrawBitmap(Setup.OSDWidth-140, inloff, arec, bcolor, 0xFFFC1414); // FG=Red
else
inloff = (ftitel->Height() + 9 - ftext->Height()) / 2;
osd->DrawText(4, inloff, RadioAudio->bitrate, fcolor, clrTransparent, ftext, Setup.OSDWidth-92, ftext->Height(), taRight);
}
#endif
}
// Body
if (lines) {
@@ -1523,48 +1503,7 @@ void CInfoViewer::showRadiotext()
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF);
}
}
#if 0
// + RT-Plus or PS-Text = 2 rows
if ((S_RtOsdTags == 1 && RT_PlusShow) || S_RtOsdTags >= 2) {
if (!RDS_PSShow || !strstr(RTP_Title, "---") || !strstr(RTP_Artist, "---")) {
sprintf(stext[1], "> %s %s", tr("Title :"), RTP_Title);
sprintf(stext[2], "> %s %s", tr("Artist :"), RTP_Artist);
osd->DrawText(4, 6+yoff+fheight*(ii++), stext[1], fcolor, clrTransparent, ftext, Setup.OSDWidth-4, ftext->Height());
osd->DrawText(4, 3+yoff+fheight*(ii++), stext[2], fcolor, clrTransparent, ftext, Setup.OSDWidth-4, ftext->Height());
}
else {
char *temp = "";
int ind = (RDS_PSIndex == 0) ? 11 : RDS_PSIndex - 1;
for (int i = ind+1; i < 12; i++)
asprintf(&temp, "%s%s ", temp, RDS_PSText[i]);
for (int i = 0; i <= ind; i++)
asprintf(&temp, "%s%s ", temp, RDS_PSText[i]);
snprintf(stext[1], 6*9, "%s", temp);
snprintf(stext[2], 6*9, "%s", temp+(6*9));
free(temp);
osd->DrawText(6, 6+yoff+fheight*ii, "[", fcolor, clrTransparent, ftext, 12, ftext->Height());
osd->DrawText(Setup.OSDWidth-12, 6+yoff+fheight*ii, "]", fcolor, clrTransparent, ftext, Setup.OSDWidth-6, ftext->Height());
osd->DrawText(16, 6+yoff+fheight*(ii++), stext[1], fcolor, clrTransparent, ftext, Setup.OSDWidth-16, ftext->Height(), taCenter);
osd->DrawText(6, 3+yoff+fheight*ii, "[", fcolor, clrTransparent, ftext, 12, ftext->Height());
osd->DrawText(Setup.OSDWidth-12, 3+yoff+fheight*ii, "]", fcolor, clrTransparent, ftext, Setup.OSDWidth-6, ftext->Height());
osd->DrawText(16, 3+yoff+fheight*(ii++), stext[2], fcolor, clrTransparent, ftext, Setup.OSDWidth-16, ftext->Height(), taCenter);
}
}
#endif
}
#if 0
// framebuffer can only display raw images
// show mpeg-still
char *image;
if (g_Radiotext->Rass_Archiv >= 0)
asprintf(&image, "%s/Rass_%d.mpg", DataDir, g_Radiotext->Rass_Archiv);
else
asprintf(&image, "%s/Rass_show.mpg", DataDir);
frameBuffer->useBackground(frameBuffer->loadBackground(image));// set useBackground true or false
frameBuffer->paintBackground();
// RadioAudio->SetBackgroundImage(image);
free(image);
#endif
}
g_Radiotext->RT_MsgShow = false;