Fixed the channel switch bug (reported by Stefan Lucke).

Nid/Tid/Rid are now included in translations.
Added video format and aspect ratio symbols into status window.
This commit is contained in:
Rolf Ahrenberg 2004-06-06 04:20:00 +03:00
parent 74ed4d8490
commit 848a2ba78d
14 changed files with 342 additions and 61 deletions

10
HISTORY
View File

@ -50,6 +50,10 @@ VDR Plugin 'femon' Revision History
- Backported "stream information" feature (from version 0.1.1).
2004-06-06: Version 0.0.5
- Backported changes and fixes from version 0.1.2.
-------------------------
2004-05-18: Version 0.1.0
@ -63,3 +67,9 @@ VDR Plugin 'femon' Revision History
.-> basic -> transponder -> stream -.
`-----------------------------------´
- Added missing german translations (Thanks to Peter Marquardt).
2004-06-06: Version 0.1.2
- Fixed the channel switch bug (reported by Stefan Lucke).
- Nid/Tid/Rid are now included in translations.
- Added video format and aspect ratio symbols into status window.

13
README
View File

@ -12,7 +12,7 @@ Requirements:
Ph.D. in Astro Physics and preferably a six-pack waiting in a fridge.
Never trust a Klingon. "Qu'vaD lI' De'vam". Beam me up, Scotty!
You're number six! I'm number two.
You're number six! I'm number two. YARRR!
Description:
@ -22,11 +22,11 @@ channels and the plugin should be monitoring always the right frontend. The
transponder and stream information are also available in advanced display modes.
User can switch between different display modes by pressing 'OK' key.
The plugin is based on a neat console frontend status monitor application called
'femon' by Johannes Stezenbach <js@convergence.de> (see DVB-apps/szap/femon.c
for further information). The other parts of plugin code are borrowed from the
excellent 'OSD Picture-In-Picture' plugin by Sascha Volkenandt and Andreas Regel.
The bitrate calculation algorithm originates from the 'dvbstream' application by
The plugin is based on a neat console frontend status monitor application
called 'femon' by Johannes Stezenbach (see DVB-apps/szap/femon.c for further
information). The other parts of plugin code are borrowed from the excellent
'OSD Picture-In-Picture' plugin by Sascha Volkenandt and Andreas Regel. The
bitrate calculation algorithm originates from the 'dvbstream' application by
Dave Chapman and the stream information routines from the 'libdvb' library by
Metzler Brothers.
@ -39,4 +39,3 @@ Shortcomings / Todo list / Important Notes:
ttxtsubs, but closing and reopening the femon plugin might help temporarily as
well. Btw., this same thing happens with OSDTeletext plugin too :)
- Disable the stream analyze to speed up heavy zapping sessions.
- If you're using VDR version 1.3.6 or older, you'll have to stick with femon-0.0.4!

View File

@ -11,7 +11,7 @@
#include <vdr/plugin.h>
static const char *VERSION = "0.1.1";
static const char *VERSION = "0.1.2";
static const char *DESCRIPTION = "DVB Signal Information Monitor (OSD)";
static const char *MAINMENUENTRY = "Signal Information";

View File

@ -492,7 +492,7 @@ const tI18nPhrase Phrases[] = {
"Auto", // Português
"Auto", // Français
"Auto", // Norsk
"Auto", // suomi
"auto", // suomi
"Auto", // Polski
"Auto", // Español
"Auto", // ÅëëçíéêÜ (Greek)
@ -511,7 +511,7 @@ const tI18nPhrase Phrases[] = {
"None", // Português
"None", // Français
"None", // Norsk
"None", // suomi
"ei", // suomi
"None", // Polski
"None", // Español
"None", // ÅëëçíéêÜ (Greek)
@ -530,7 +530,7 @@ const tI18nPhrase Phrases[] = {
"Off", // Português
"Off", // Français
"Off", // Norsk
"Off", // suomi
"poissa", // suomi
"Off", // Polski
"Off", // Español
"Off", // ÅëëçíéêÜ (Greek)
@ -549,7 +549,7 @@ const tI18nPhrase Phrases[] = {
"On", // Português
"On", // Français
"On", // Norsk
"On", // suomi
"päällä", // suomi
"On", // Polski
"On", // Español
"On", // ÅëëçíéêÜ (Greek)
@ -728,7 +728,7 @@ const tI18nPhrase Phrases[] = {
"Hz", // Romaneste
"Hz", // Magyar
"Hz", // Català
"Hz", // ÀãááÚØÙ (Russian)
"³æ", // ÀãááÚØÙ (Russian)
"Hz", // Hrvatski (Croatian)
},
{ "Aspect Ratio", // English
@ -937,7 +937,7 @@ const tI18nPhrase Phrases[] = {
"kHz", // Romaneste
"kHz", // Magyar
"kHz", // Català
"kHz", // ÀãááÚØÙ (Russian)
"Ú³æ", // ÀãááÚØÙ (Russian)
"kHz", // Hrvatski (Croatian)
},
{ "MPEG Layer", // English
@ -959,5 +959,62 @@ const tI18nPhrase Phrases[] = {
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski (Croatian)
},
{ "Nid", // English
"Nid", // Deutsch
"Nid", // Slovenski
"Nid", // Italiano
"Nid", // Nederlands
"Nid", // Português
"Nid", // Français
"Nid", // Norsk
"Verkko ID", // suomi
"Nid", // Polski
"Nid", // Español
"Nid", // ÅëëçíéêÜ (Greek)
"Nid", // Svenska
"Nid", // Romaneste
"Nid", // Magyar
"Nid", // Català
"Nid", // ÀãááÚØÙ (Russian)
"Nid", // Hrvatski (Croatian)
},
{ "Tid", // English
"Tid", // Deutsch
"Tid", // Slovenski
"Tid", // Italiano
"Tid", // Nederlands
"Tid", // Português
"Tid", // Français
"Tid", // Norsk
"Lähete ID", // suomi
"Tid", // Polski
"Tid", // Español
"Tid", // ÅëëçíéêÜ (Greek)
"Tid", // Svenska
"Tid", // Romaneste
"Tid", // Magyar
"Tid", // Català
"Tid", // ÀãááÚØÙ (Russian)
"Tid", // Hrvatski (Croatian)
},
{ "Rid", // English
"Rid", // Deutsch
"Rid", // Slovenski
"Rid", // Italiano
"Rid", // Nederlands
"Rid", // Português
"Rid", // Français
"Rid", // Norsk
"Radio ID", // suomi
"Rid", // Polski
"Rid", // Español
"Rid", // ÅëëçíéêÜ (Greek)
"Rid", // Svenska
"Rid", // Romaneste
"Rid", // Magyar
"Rid", // Català
"Rid", // ÀãááÚØÙ (Russian)
"Rid", // Hrvatski (Croatian)
},
{ NULL }
};

View File

@ -12,6 +12,13 @@
#include "femonreceiver.h"
#include "femonosd.h"
#include "symbols/ar11.xpm"
#include "symbols/ar169.xpm"
#include "symbols/ar2211.xpm"
#include "symbols/ar43.xpm"
#include "symbols/ntsc.xpm"
#include "symbols/pal.xpm"
#define FRONTEND_DEVICE "/dev/dvb/adapter%d/frontend%d"
#define CHANNELINPUT_TIMEOUT 1000
@ -28,9 +35,17 @@
#define OSDSTATUSWIN_X(col) ((col == 7) ? 475 : (col == 6) ? 410 : (col == 5) ? 275 : (col == 4) ? 220 : (col == 3) ? 125 : (col==2) ? 70 : 15)
#define OSDSTATUSWIN_XC(col,txt) (((col - 1) * SCREENWIDTH / 6) + ((SCREENWIDTH / 6 - m_Font->Width(txt)) / 2))
#define BARWIDTH(x) (OSDWIDTH * x / 100)
#define SPACING 5
#define clrBackground clrGray50 // this should be tied somehow into current theme
cBitmap cFemonOsd::bmAspectRatio_1_1(ar11_xpm);
cBitmap cFemonOsd::bmAspectRatio_16_9(ar169_xpm);
cBitmap cFemonOsd::bmAspectRatio_2_21_1(ar2211_xpm);
cBitmap cFemonOsd::bmAspectRatio_4_3(ar43_xpm);
cBitmap cFemonOsd::bmPAL(pal_xpm);
cBitmap cFemonOsd::bmNTSC(ntsc_xpm);
cFemonOsd::cFemonOsd(void)
:cOsdObject(true), cThread("femon osd")
{
@ -72,6 +87,8 @@ void cFemonOsd::DrawStatusWindow(void)
int snr = m_SNR / 655;
int signal = m_Signal / 655;
int offset = 0;
int x = OSDWIDTH - SPACING;
int y = 0;
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (m_Osd) {
@ -79,6 +96,46 @@ void cFemonOsd::DrawStatusWindow(void)
snprintf(buf, sizeof(buf), "%d%s %s", m_Number ? m_Number : channel->Number(), m_Number ? "-" : "", channel->Name());
m_Osd->DrawRectangle(0, OSDSTATUSWIN_Y(offset), OSDWIDTH, OSDSTATUSWIN_Y(offset+m_Font->Height()-1), clrWhite);
m_Osd->DrawText(OSDSTATUSWIN_X(1), OSDSTATUSWIN_Y(offset), buf, clrBlack, clrWhite, m_Font);
if (m_Receiver) {
int value = m_Receiver->VideoFormat();
if (value == VF_PAL) {
x -= bmPAL.Width() + SPACING;
y = (m_Font->Height() - bmPAL.Height()) / 2;
if (y < 0) y = 0;
m_Osd->DrawBitmap(x, OSDSTATUSWIN_Y(offset+y), bmPAL, clrBlack, clrWhite);
}
else if (value == VF_NTSC) {
x -= bmNTSC.Width() + SPACING;
y = (m_Font->Height() - bmNTSC.Height()) / 2;
if (y < 0) y = 0;
m_Osd->DrawBitmap(x, OSDSTATUSWIN_Y(offset+y), bmNTSC, clrBlack, clrWhite);
}
value = m_Receiver->VideoAspectRatio();
if (value == AR_1_1) {
x -= bmAspectRatio_1_1.Width() + SPACING;
y = (m_Font->Height() - bmAspectRatio_1_1.Height()) / 2;
if (y < 0) y = 0;
m_Osd->DrawBitmap(x, OSDSTATUSWIN_Y(offset+y), bmAspectRatio_1_1, clrBlack, clrWhite);
}
else if (value == AR_4_3) {
x -= bmAspectRatio_4_3.Width() + SPACING;
y = (m_Font->Height() - bmAspectRatio_4_3.Height()) / 2;
if (y < 0) y = 0;
m_Osd->DrawBitmap(x, OSDSTATUSWIN_Y(offset+y), bmAspectRatio_4_3, clrBlack, clrWhite);
}
else if (value == AR_16_9) {
x -= bmAspectRatio_16_9.Width() + SPACING;
y = (m_Font->Height() - bmAspectRatio_16_9.Height()) / 2;
if (y < 0) y = 0;
m_Osd->DrawBitmap(x, OSDSTATUSWIN_Y(offset+y), bmAspectRatio_16_9, clrBlack, clrWhite);
}
else if (value == AR_2_21_1) {
x -= bmAspectRatio_2_21_1.Width() + SPACING;
y = (m_Font->Height() - bmAspectRatio_2_21_1.Height()) / 2;
if (y < 0) y = 0;
m_Osd->DrawBitmap(x, OSDSTATUSWIN_Y(offset+y), bmAspectRatio_2_21_1, clrBlack, clrWhite);
}
}
offset += m_Font->Height();
if (signal > 0) {
signal = BARWIDTH(signal);
@ -184,14 +241,14 @@ void cFemonOsd::DrawInfoWindow(void)
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Sid"), clrWhite, clrBackground, m_Font);
snprintf(buf, sizeof(buf), "%d", channel->Sid());
m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), "Nid", clrWhite, clrBackground, m_Font);
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), tr("Nid"), clrWhite, clrBackground, m_Font);
snprintf(buf, sizeof(buf), "%d", channel->Nid());
m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
offset += m_Font->Height();
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), "Tid" /*tr("Tid")*/, clrWhite, clrBackground, m_Font);
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Tid"), clrWhite, clrBackground, m_Font);
snprintf(buf, sizeof(buf), "%d", channel->Tid());
m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), "Rid" /*tr("Rid")*/, clrWhite, clrBackground, m_Font);
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), tr("Rid"), clrWhite, clrBackground, m_Font);
snprintf(buf, sizeof(buf), "%d", channel->Rid());
m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
offset += m_Font->Height();
@ -386,14 +443,14 @@ void cFemonOsd::DrawInfoWindow(void)
offset += m_Font->Height();
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Aspect Ratio"), clrWhite, clrBackground, m_Font);
if (m_Receiver) {
value = m_Receiver->VideoAspectRatio();
if (value == 100) snprintf(buf, sizeof(buf), "1:1");
else if (value == 133) snprintf(buf, sizeof(buf), "4:3");
else if (value == 177) snprintf(buf, sizeof(buf), "16:9");
else if (value == 233) snprintf(buf, sizeof(buf), "2.21:1");
else snprintf(buf, sizeof(buf), "%s", tr("reserved"));
value = m_Receiver->VideoAspectRatio();
if (value == AR_1_1) snprintf(buf, sizeof(buf), "1:1");
else if (value == AR_4_3) snprintf(buf, sizeof(buf), "4:3");
else if (value == AR_16_9) snprintf(buf, sizeof(buf), "16:9");
else if (value == AR_2_21_1) snprintf(buf, sizeof(buf), "2.21:1");
else snprintf(buf, sizeof(buf), "%s", tr("reserved"));
}
else snprintf(buf, sizeof(buf), "---");
else snprintf(buf, sizeof(buf), "---");
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
offset += m_Font->Height();
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Frame Rate"), clrWhite, clrBackground, m_Font);
@ -403,12 +460,12 @@ void cFemonOsd::DrawInfoWindow(void)
offset += m_Font->Height();
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Video Format"), clrWhite, clrBackground, m_Font);
if (m_Receiver) {
value = m_Receiver->VideoFormat();
if (value == 1) snprintf(buf, sizeof(buf), "%s", tr("PAL"));
else if (value == 2) snprintf(buf, sizeof(buf), "%s", tr("NTSC"));
else snprintf(buf, sizeof(buf), "%s", tr("unknown"));
value = m_Receiver->VideoFormat();
if (value == VF_PAL) snprintf(buf, sizeof(buf), "%s", tr("PAL"));
else if (value == VF_NTSC) snprintf(buf, sizeof(buf), "%s", tr("NTSC"));
else snprintf(buf, sizeof(buf), "%s", tr("unknown"));
}
else snprintf(buf, sizeof(buf), "---");
else snprintf(buf, sizeof(buf), "---");
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
offset += m_Font->Height();
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Resolution"), clrWhite, clrBackground, m_Font);
@ -421,13 +478,13 @@ void cFemonOsd::DrawInfoWindow(void)
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
offset += m_Font->Height();
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Bitrate"), clrWhite, clrBackground, m_Font);
dvalue = m_Receiver->AudioStreamBitrate();
if (m_Receiver) {
if (dvalue == -1.0) snprintf(buf, sizeof(buf), "%s (%.0f %s)", tr("reserved"), m_Receiver->AudioBitrate(), tr("kbit/s"));
else if (dvalue == -2.0) snprintf(buf, sizeof(buf), "%s (%.0f %s)", tr("free"), m_Receiver->AudioBitrate(), tr("kbit/s"));
else snprintf(buf, sizeof(buf), "%.0f %s (%.0f %s)", dvalue, tr("kbit/s"), m_Receiver->AudioBitrate(), tr("kbit/s"));
}
else snprintf(buf, sizeof(buf), "---");
dvalue = m_Receiver->AudioStreamBitrate();
if (dvalue == (double)FR_RESERVED) snprintf(buf, sizeof(buf), "%s (%.0f %s)", tr("reserved"), m_Receiver->AudioBitrate(), tr("kbit/s"));
else if (dvalue == (double)FR_FREE) snprintf(buf, sizeof(buf), "%s (%.0f %s)", tr("free"), m_Receiver->AudioBitrate(), tr("kbit/s"));
else snprintf(buf, sizeof(buf), "%.0f %s (%.0f %s)", dvalue, tr("kbit/s"), m_Receiver->AudioBitrate(), tr("kbit/s"));
}
else snprintf(buf, sizeof(buf), "---");
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
offset += m_Font->Height();
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("MPEG Layer"), clrWhite, clrBackground, m_Font);
@ -437,11 +494,11 @@ void cFemonOsd::DrawInfoWindow(void)
offset += m_Font->Height();
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Sampling Frequency"), clrWhite, clrBackground, m_Font);
if (m_Receiver) {
value = m_Receiver->AudioSamplingFreq();
if (value == -1) snprintf(buf, sizeof(buf), "%s", tr("reserved"));
else snprintf(buf, sizeof(buf), "%.1f %s", (value / 1000.0), tr("kHz"));
value = m_Receiver->AudioSamplingFreq();
if (value == FR_RESERVED) snprintf(buf, sizeof(buf), "%s", tr("reserved"));
else snprintf(buf, sizeof(buf), "%.1f %s", (value / 1000.0), tr("kHz"));
}
else snprintf(buf, sizeof(buf), "---");
else snprintf(buf, sizeof(buf), "---");
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
}
else /* modeBasic */ {
@ -486,8 +543,8 @@ void cFemonOsd::Show(void)
}
if (ioctl(m_Frontend, FE_GET_INFO, &m_FrontendInfo) < 0) {
isyslog("cFemonOsd::Show() cannot read frontend info.");
m_Frontend = -1;
close(m_Frontend);
m_Frontend = -1;
return;
}
m_Osd = cOsdProvider::NewOsd(((Setup.OSDWidth - OSDWIDTH) / 2) + Setup.OSDLeft, ((Setup.OSDHeight - OSDHEIGHT) / 2) + Setup.OSDTop);
@ -519,6 +576,8 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber)
{
//printf("cFemonOsd::ChannelSwitch()\n");
char *dev = NULL;
if (!device->IsPrimaryDevice() || !channelNumber || cDevice::PrimaryDevice()->CurrentChannel() != channelNumber)
return;
close(m_Frontend);
asprintf(&dev, FRONTEND_DEVICE, cDevice::ActualDevice()->CardIndex(), 0);
m_Frontend = open(dev, O_RDONLY | O_NONBLOCK);
@ -530,8 +589,8 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber)
}
if (ioctl(m_Frontend, FE_GET_INFO, &m_FrontendInfo) < 0) {
isyslog("cFemonOsd::ChannelSwitch() cannot read frontend info.");
m_Frontend = -1;
close(m_Frontend);
m_Frontend = -1;
return;
}
if (m_Receiver)

View File

@ -35,6 +35,7 @@ private:
int m_DisplayMode;
const cFont *m_Font;
cMutex* m_Mutex;
static cBitmap bmPAL, bmNTSC, bmAspectRatio_1_1, bmAspectRatio_16_9, bmAspectRatio_2_21_1, bmAspectRatio_4_3;
void DrawStatusWindow(void);
void DrawInfoWindow(void);

View File

@ -26,8 +26,8 @@ cFemonReceiver::cFemonReceiver(int Ca, int Vpid, int Apid)
m_VideoPacketCount = 0;
m_VideoHorizontalSize = 0;
m_VideoVerticalSize = 0;
m_VideoAspectRatio = 0;
m_VideoFormat = 0;
m_VideoAspectRatio = AR_RESERVED;
m_VideoFormat = VF_UNKNOWN;
m_VideoFrameRate = 0.0;
m_VideoStreamBitrate = 0.0;
m_VideoBitrate = 0.0;
@ -73,19 +73,19 @@ void cFemonReceiver::GetVideoInfo(uint8_t *mbuf, int count)
int sw = (int)((headr[3] & 0xF0) >> 4);
switch( sw ){
case 1:
m_VideoAspectRatio = 100;
m_VideoAspectRatio = AR_1_1;
break;
case 2:
m_VideoAspectRatio = 133;
m_VideoAspectRatio = AR_4_3;
break;
case 3:
m_VideoAspectRatio = 177;
m_VideoAspectRatio = AR_16_9;
break;
case 4:
m_VideoAspectRatio = 221;
m_VideoAspectRatio = AR_2_21_1;
break;
case 5 ... 15:
m_VideoAspectRatio = 0;
m_VideoAspectRatio = AR_RESERVED;
break;
default:
return;
@ -94,31 +94,31 @@ void cFemonReceiver::GetVideoInfo(uint8_t *mbuf, int count)
switch ( sw ) {
case 1:
m_VideoFrameRate = 24000/1001.0;
m_VideoFormat = 0;
m_VideoFormat = VF_UNKNOWN;
break;
case 2:
m_VideoFrameRate = 24.0;
m_VideoFormat = 0;
m_VideoFormat = VF_UNKNOWN;
break;
case 3:
m_VideoFrameRate = 25.0;
m_VideoFormat = 1;
m_VideoFormat = VF_PAL;
break;
case 4:
m_VideoFrameRate = 30000/1001.0;
m_VideoFormat = 2;
m_VideoFormat = VF_NTSC;
break;
case 5:
m_VideoFrameRate = 30.0;
m_VideoFormat = 2;
m_VideoFormat = VF_NTSC;
break;
case 6:
m_VideoFrameRate = 50.0;
m_VideoFormat = 1;
m_VideoFormat = VF_PAL;
break;
case 7:
m_VideoFrameRate = 60.0;
m_VideoFormat = 2;
m_VideoFormat = VF_NTSC;
break;
}
m_VideoStreamBitrate = 400 * (((headr[4] << 10) & 0x0003FC00UL) | ((headr[5] << 2) & 0x000003FCUL) | (((headr[6] & 0xC0) >> 6) & 0x00000003UL)) / 1000000.0;
@ -154,14 +154,14 @@ void cFemonReceiver::GetAudioInfo(uint8_t *mbuf, int count)
m_AudioMPEGLayer = 4 - ((headr[1] & 0x06) >> 1);
tmp = bitrates[(3 - ((headr[1] & 0x06) >> 1))][(headr[2] >> 4)] * 1000;
if (tmp == 0)
m_AudioStreamBitrate = -2.0; // free
m_AudioStreamBitrate = (double)FR_FREE;
else if (tmp == 0xf)
m_AudioStreamBitrate = -1.0; // reserved
m_AudioStreamBitrate = (double)FR_RESERVED;
else
m_AudioStreamBitrate = tmp / 1000.0;
tmp = samplerates[((headr[2] & 0x0c) >> 2)] * 100;
if (tmp == 3)
m_AudioSamplingFreq = -1; // reserved
m_AudioSamplingFreq = FR_RESERVED;
else
m_AudioSamplingFreq = tmp;
}

View File

@ -12,6 +12,23 @@
#include <vdr/thread.h>
#include <vdr/receiver.h>
enum eVideoFormat {
VF_UNKNOWN = 0,
VF_PAL = 1,
VF_NTSC = 2,
};
enum eAspectRatio {
AR_RESERVED = 0,
AR_1_1 = 100,
AR_4_3 = 133,
AR_16_9 = 177,
AR_2_21_1 = 233,
};
#define FR_RESERVED -1
#define FR_FREE -2
class cFemonReceiver : public cReceiver, public cThread {
private:
bool m_Active;
@ -44,13 +61,13 @@ public:
int VideoHorizontalSize(void) { return m_VideoHorizontalSize; }; // pixels
int VideoVerticalSize(void) { return m_VideoVerticalSize; }; // pixels
int VideoAspectRatio(void) { return m_VideoAspectRatio; }; // 4:3 == 133, ...
int VideoFormat(void) { return m_VideoFormat; }; // 0 == unknown, 1 == PAL, 2 == NTSC
int VideoAspectRatio(void) { return m_VideoAspectRatio; }; // eAspectRatio
int VideoFormat(void) { return m_VideoFormat; }; // eVideoFormat
double VideoFrameRate(void) { return m_VideoFrameRate; }; // Hz
double VideoStreamBitrate(void) { return m_VideoStreamBitrate; }; // Mbit/s
double VideoBitrate(void) { return m_VideoBitrate; }; // Mbit/s
int AudioMPEGLayer(void) { return m_AudioMPEGLayer; }; // number
int AudioMPEGLayer(void) { return m_AudioMPEGLayer; }; // layer number
int AudioSamplingFreq(void) { return m_AudioSamplingFreq; }; // Hz
double AudioStreamBitrate(void) { return m_AudioStreamBitrate; }; // kbit/s
double AudioBitrate(void) { return m_AudioBitrate; }; // kbit/s

23
symbols/ar11.xpm Normal file
View File

@ -0,0 +1,23 @@
/* XPM */
static char * ar11_xpm[] = {
"21 18 2 1",
". c #FFFFFF",
"+ c #000000",
".....................",
".....................",
"....++...........++..",
"...+++..........+++..",
"..++++....++...++++..",
"..++++...++++..++++..",
"....++...++++....++..",
"....++....++.....++..",
"....++...........++..",
"....++...........++..",
"....++....++.....++..",
"....++...++++....++..",
"....++...++++....++..",
"....++....++.....++..",
"....++...........++..",
"....++...........++..",
".....................",
"....................."};

23
symbols/ar169.xpm Normal file
View File

@ -0,0 +1,23 @@
/* XPM */
static char * ar169_xpm[] = {
"36 18 2 1",
". c #FFFFFF",
"+ c #000000",
"....................................",
"....................................",
"....++....+++++............+++++....",
"...+++...+++++++..........+++++++...",
"..++++..+++...+++...++...+++...+++..",
"..++++..++.....++..++++..++.....++..",
"....++..++.........++++..++.....++..",
"....++..++..........++...+++...+++..",
"....++..++.++++...........++++++++..",
"....++..++++++++...........+++++++..",
"....++..+++...+++...++..........++..",
"....++..++.....++..++++.........++..",
"....++..++.....++..++++..++.....++..",
"....++..+++...+++...++...+++...+++..",
"....++...+++++++..........+++++++...",
"....++....+++++............+++++....",
"....................................",
"...................................."};

23
symbols/ar2211.xpm Normal file
View File

@ -0,0 +1,23 @@
/* XPM */
static char * ar2211_xpm[] = {
"43 18 2 1",
". c #FFFFFF",
"+ c #000000",
"...........................................",
"...........................................",
"....++++........++++......++...........++..",
"...++++++......++++++....+++..........+++..",
"..+++..+++....+++..+++..++++....++...++++..",
"..++....++....++....++..++++...++++..++++..",
"..++....++....++....++....++...++++....++..",
".......+++.........+++....++....++.....++..",
"......+++.........+++.....++...........++..",
".....+++.........+++......++...........++..",
"....+++.........+++.......++....++.....++..",
"...+++.........+++........++...++++....++..",
"..+++.........+++.........++...++++....++..",
"..++....++.++.++....++....++....++.....++..",
"..++++++++.++.++++++++....++...........++..",
"..++++++++.++.++++++++....++...........++..",
"...........................................",
"..........................................."};

23
symbols/ar43.xpm Normal file
View File

@ -0,0 +1,23 @@
/* XPM */
static char * ar43_xpm[] = {
"32 18 2 1",
". c #FFFFFF",
"+ c #000000",
"................................",
"................................",
"....++..++............++++++....",
"....++..++...........++++++++...",
"...+++..++.....++...+++....+++..",
"...++...++....++++..++......++..",
"...++...++....++++..++......++..",
"..+++...++.....++..........+++..",
"..++....++..............+++++...",
"..++....++..............+++++...",
"..++++++++++...++..........+++..",
"..++++++++++..++++..++......++..",
"........++....++++..++......++..",
"........++.....++...+++....+++..",
"........++...........++++++++...",
"........++............++++++....",
"................................",
"................................"};

23
symbols/ntsc.xpm Normal file
View File

@ -0,0 +1,23 @@
/* XPM */
static char * ntsc_xpm[] = {
"38 18 2 1",
". c #FFFFFF",
"+ c #000000",
"......................................",
"......................................",
"..++....++.++++++++..+++++....+++++...",
"..++....++.++++++++.+++++++..+++++++..",
"..+++...++....++....++...++..++...++..",
"..+++...++....++....++...++..++...++..",
"..++++..++....++....++.......++.......",
"..++++..++....++....++++.....++.......",
"..++.++.++....++.....+++++...++.......",
"..++.++.++....++.......++++..++.......",
"..++..++++....++.........++..++.......",
"..++..++++....++....++...++..++...++..",
"..++...+++....++....++...++..++...++..",
"..++...+++....++....++...++..++...++..",
"..++....++....++....+++++++..+++++++..",
"..++....++....++.....+++++....+++++...",
"......................................",
"......................................"};

23
symbols/pal.xpm Normal file
View File

@ -0,0 +1,23 @@
/* XPM */
static char * pal_xpm[] = {
"30 18 2 1",
". c #FFFFFF",
"+ c #000000",
"..............................",
"..............................",
"..+++++++....+++++...++.......",
"..+++..+++..+++++++..++.......",
"..++....++..++...++..++.......",
"..++....++.+++...+++.++.......",
"..++....++.++.....++.++.......",
"..++....++.++.....++.++.......",
"..++....++.++.....++.++.......",
"..+++..+++.+++++++++.++.......",
"..+++++++..+++++++++.++.......",
"..++.......++.....++.++.......",
"..++.......++.....++.++.......",
"..++.......++.....++.++.......",
"..++.......++.....++.+++++++..",
"..++.......++.....++.+++++++..",
"..............................",
".............................."};