mirror of
				https://github.com/rofafor/vdr-plugin-femon.git
				synced 2023-10-10 11:36:53 +00:00 
			
		
		
		
	Compare commits
	
		
			14 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 315a3365ba | ||
|  | 8e1e025b0f | ||
|  | 543accdd06 | ||
|  | 66eca7f8b5 | ||
|  | 905b7c0870 | ||
|  | 597425a271 | ||
|  | 86210928b8 | ||
|  | c98fe8ca87 | ||
|  | 5598f7cc43 | ||
|  | 62f1f5f776 | ||
|  | 8ba74bf5c4 | ||
|  | 38fbb2d47d | ||
|  | 09cf40f215 | ||
|  | d809e98052 | 
							
								
								
									
										19
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -427,3 +427,22 @@ VDR Plugin 'femon' Revision History | |||||||
| - Updated for vdr-1.7.23. | - Updated for vdr-1.7.23. | ||||||
| - Updated SVDRP interface. | - Updated SVDRP interface. | ||||||
| - Added Hungarian translation (Thanks to Fuley Istvan). | - Added Hungarian translation (Thanks to Fuley Istvan). | ||||||
|  |  | ||||||
|  | 2012-02-05: Version 1.7.13 | ||||||
|  |  | ||||||
|  | - Added initial support for PVRINPUT devices (Thanks to Winfried Köhler). | ||||||
|  | - Added initial support for IPTV devices. | ||||||
|  |  | ||||||
|  | 2012-03-10: Version 1.7.14 | ||||||
|  |  | ||||||
|  | - Updated for vdr-1.7.26. | ||||||
|  |  | ||||||
|  | 2012-03-12: Version 1.7.15 | ||||||
|  |  | ||||||
|  | - Cleaned up compilation warnings. | ||||||
|  | - Fixed channel switching. | ||||||
|  |  | ||||||
|  | 2012-03-25: Version 1.7.16 | ||||||
|  |  | ||||||
|  | - Updated for vdr-1.7.27. | ||||||
|  | - Cleaned up compilation warnings again. | ||||||
|   | |||||||
							
								
								
									
										13
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								Makefile
									
									
									
									
									
								
							| @@ -19,18 +19,19 @@ PLUGIN = femon | |||||||
| ### The version number of this plugin (taken from the main source file): | ### The version number of this plugin (taken from the main source file): | ||||||
|  |  | ||||||
| VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') | VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') | ||||||
|  | GITTAG  = $(shell git describe --always 2>/dev/null) | ||||||
|  |  | ||||||
| ### The C++ compiler and options: | ### The C++ compiler and options: | ||||||
|  |  | ||||||
| CXX      ?= g++ | CXX      ?= g++ | ||||||
| CXXFLAGS ?= -fPIC -g -O3 -Wall -Wextra -Wswitch-default -Wfloat-equal -Wundef -Wpointer-arith -Wconversion -Wcast-align -Wredundant-decls -Wno-unused-parameter -Woverloaded-virtual -Wno-parentheses | CXXFLAGS ?= -fPIC -g -O3 -Wall -Wextra -Wswitch-default -Wfloat-equal -Wundef -Wpointer-arith -Wconversion -Wcast-align -Wredundant-decls -Wno-unused-parameter -Werror=overloaded-virtual -Wno-parentheses | ||||||
| LDFLAGS  ?= -Wl,--as-needed | LDFLAGS  ?= -Wl,--as-needed | ||||||
|  |  | ||||||
| ### The directory environment: | ### The directory environment: | ||||||
|  |  | ||||||
| VDRDIR = ../../.. | VDRDIR ?= ../../.. | ||||||
| LIBDIR = ../../lib | LIBDIR ?= ../../lib | ||||||
| TMPDIR = /tmp | TMPDIR ?= /tmp | ||||||
|  |  | ||||||
| ### Make sure that necessary options are included: | ### Make sure that necessary options are included: | ||||||
|  |  | ||||||
| @@ -59,6 +60,10 @@ ifdef FEMON_DEBUG | |||||||
| DEFINES += -DDEBUG | DEFINES += -DDEBUG | ||||||
| endif | endif | ||||||
|  |  | ||||||
|  | ifneq ($(strip $(GITTAG)),) | ||||||
|  | DEFINES += -DGITVERSION='"-GIT-$(GITTAG)"' | ||||||
|  | endif | ||||||
|  |  | ||||||
| .PHONY: all all-redirect | .PHONY: all all-redirect | ||||||
| all-redirect: all | all-redirect: all | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								femon.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								femon.c
									
									
									
									
									
								
							| @@ -14,11 +14,15 @@ | |||||||
| #include "femonservice.h" | #include "femonservice.h" | ||||||
| #include "femontools.h" | #include "femontools.h" | ||||||
|  |  | ||||||
| #if defined(APIVERSNUM) && APIVERSNUM < 10723 | #if defined(APIVERSNUM) && APIVERSNUM < 10727 | ||||||
| #error "VDR-1.7.23 API version or greater is required!" | #error "VDR-1.7.27 API version or greater is required!" | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| static const char VERSION[]       = "1.7.12"; | #ifndef GITVERSION | ||||||
|  | #define GITVERSION "" | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | static const char VERSION[]       = "1.7.16" GITVERSION; | ||||||
| static const char DESCRIPTION[]   = trNOOP("DVB Signal Information Monitor (OSD)"); | static const char DESCRIPTION[]   = trNOOP("DVB Signal Information Monitor (OSD)"); | ||||||
| static const char MAINMENUENTRY[] = trNOOP("Signal Information"); | static const char MAINMENUENTRY[] = trNOOP("Signal Information"); | ||||||
|  |  | ||||||
| @@ -196,7 +200,7 @@ cString cPluginFemon::SVDRPCommand(const char *Command, const char *Option, int | |||||||
| { | { | ||||||
|   cDvbDevice *dev = dynamic_cast<cDvbDevice*>(cDevice::ActualDevice()); |   cDvbDevice *dev = dynamic_cast<cDvbDevice*>(cDevice::ActualDevice()); | ||||||
|   if (*Option && isnumber(Option)) { |   if (*Option && isnumber(Option)) { | ||||||
|      cDvbDevice *dev2 = dynamic_cast<cDvbDevice*>(cDevice::GetDevice(strtol(Option, NULL, 10))); |      cDvbDevice *dev2 = dynamic_cast<cDvbDevice*>(cDevice::GetDevice(int(strtol(Option, NULL, 10)))); | ||||||
|      if (dev2) |      if (dev2) | ||||||
|         dev = dev2; |         dev = dev2; | ||||||
|      } |      } | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ | |||||||
|  |  | ||||||
| #define IS_HEAAC_AUDIO(buf) (((buf)[0] == 0xFF) && (((buf)[1] & 0xF6) == 0xF0)) | #define IS_HEAAC_AUDIO(buf) (((buf)[0] == 0xFF) && (((buf)[1] & 0xF6) == 0xF0)) | ||||||
|  |  | ||||||
| unsigned int cFemonAAC::s_Samplerates[16] = | int cFemonAAC::s_Samplerates[16] = | ||||||
| { | { | ||||||
|   96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, -1, -1, -1, -1 |   96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, -1, -1, -1, -1 | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ class cFemonAAC { | |||||||
| private: | private: | ||||||
|   cFemonAudioIf *m_AudioHandler; |   cFemonAudioIf *m_AudioHandler; | ||||||
|  |  | ||||||
|   static unsigned int s_Samplerates[16]; |   static int s_Samplerates[16]; | ||||||
|  |  | ||||||
| public: | public: | ||||||
|   cFemonAAC(cFemonAudioIf *audiohandler); |   cFemonAAC(cFemonAudioIf *audiohandler); | ||||||
|   | |||||||
| @@ -9,17 +9,17 @@ | |||||||
| #include "femontools.h" | #include "femontools.h" | ||||||
| #include "femonac3.h" | #include "femonac3.h" | ||||||
|  |  | ||||||
| unsigned int cFemonAC3::s_Bitrates[32] = | int cFemonAC3::s_Bitrates[32] = | ||||||
| { | { | ||||||
|   32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |   32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| unsigned int cFemonAC3::s_Frequencies[4] = | int cFemonAC3::s_Frequencies[4] = | ||||||
| { | { | ||||||
|   480, 441, 320, 0 |   480, 441, 320, 0 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| unsigned int cFemonAC3::s_Frames[3][32] = | int cFemonAC3::s_Frames[3][32] = | ||||||
| { | { | ||||||
|   {64, 80,  96,  112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 640, 768,  896,  1024, 1152, 1280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |   {64, 80,  96,  112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 640, 768,  896,  1024, 1152, 1280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | ||||||
|   {69, 87,  104, 121, 139, 174, 208, 243, 278, 348, 417, 487, 557, 696, 835,  975,  1114, 1253, 1393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |   {69, 87,  104, 121, 139, 174, 208, 243, 278, 348, 417, 487, 557, 696, 835,  975,  1114, 1253, 1393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | ||||||
|   | |||||||
| @@ -14,9 +14,9 @@ class cFemonAC3 { | |||||||
| private: | private: | ||||||
|   cFemonAC3If *m_AudioHandler; |   cFemonAC3If *m_AudioHandler; | ||||||
|  |  | ||||||
|   static unsigned int s_Bitrates[32]; |   static int s_Bitrates[32]; | ||||||
|   static unsigned int s_Frequencies[4]; |   static int s_Frequencies[4]; | ||||||
|   static unsigned int s_Frames[3][32]; |   static int s_Frames[3][32]; | ||||||
|  |  | ||||||
| public: | public: | ||||||
|   cFemonAC3(cFemonAC3If *audiohandler); |   cFemonAC3(cFemonAC3If *audiohandler); | ||||||
|   | |||||||
							
								
								
									
										16
									
								
								femoncfg.h
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								femoncfg.h
									
									
									
									
									
								
							| @@ -65,14 +65,14 @@ enum eFemonThemes | |||||||
| struct cFemonTheme | struct cFemonTheme | ||||||
| { | { | ||||||
|   int bpp; |   int bpp; | ||||||
|   int clrBackground; |   unsigned int clrBackground; | ||||||
|   int clrTitleBackground; |   unsigned int clrTitleBackground; | ||||||
|   int clrTitleText; |   unsigned int clrTitleText; | ||||||
|   int clrActiveText; |   unsigned int clrActiveText; | ||||||
|   int clrInactiveText; |   unsigned int clrInactiveText; | ||||||
|   int clrRed; |   unsigned int clrRed; | ||||||
|   int clrYellow; |   unsigned int clrYellow; | ||||||
|   int clrGreen; |   unsigned int clrGreen; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| extern const cFemonTheme femonTheme[eFemonThemeMaxNumber]; | extern const cFemonTheme femonTheme[eFemonThemeMaxNumber]; | ||||||
|   | |||||||
| @@ -8,14 +8,14 @@ | |||||||
| #include "femontools.h" | #include "femontools.h" | ||||||
| #include "femonlatm.h" | #include "femonlatm.h" | ||||||
|  |  | ||||||
| unsigned int cFemonLATM::s_Bitrates[3][16] = | int cFemonLATM::s_Bitrates[3][16] = | ||||||
| { | { | ||||||
|   {0,  32,  48,  56,  64,  80,  96, 112, 128, 144, 160, 176, 192, 224, 256, -1}, // MPEG-2 Layer I |   {0,  32,  48,  56,  64,  80,  96, 112, 128, 144, 160, 176, 192, 224, 256, -1}, // MPEG-2 Layer I | ||||||
|   {0,   8,  16,  24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, -1}, // MPEG-2 Layer II/III |   {0,   8,  16,  24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, -1}, // MPEG-2 Layer II/III | ||||||
|   {0,   8,  16,  24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, -1}  // MPEG-2 Layer II/III |   {0,   8,  16,  24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, -1}  // MPEG-2 Layer II/III | ||||||
| }; | }; | ||||||
|  |  | ||||||
| unsigned int cFemonLATM::s_Samplerates[4] = | int cFemonLATM::s_Samplerates[4] = | ||||||
| { | { | ||||||
|   22050, 24000, 16000, -1 |   22050, 24000, 16000, -1 | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -14,8 +14,8 @@ class cFemonLATM { | |||||||
| private: | private: | ||||||
|   cFemonAudioIf *m_AudioHandler; |   cFemonAudioIf *m_AudioHandler; | ||||||
|  |  | ||||||
|   static unsigned int s_Bitrates[3][16]; |   static int s_Bitrates[3][16]; | ||||||
|   static unsigned int s_Samplerates[4]; |   static int s_Samplerates[4]; | ||||||
|  |  | ||||||
| public: | public: | ||||||
|   cFemonLATM(cFemonAudioIf *audiohandler); |   cFemonLATM(cFemonAudioIf *audiohandler); | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ | |||||||
|  |  | ||||||
| #define IS_EXTENSION_START(buf) (((buf)[0] == 0x00) && ((buf)[1] == 0x00) && ((buf)[2] == 0x01) && ((buf)[3] == 0xB5)) | #define IS_EXTENSION_START(buf) (((buf)[0] == 0x00) && ((buf)[1] == 0x00) && ((buf)[2] == 0x01) && ((buf)[3] == 0xB5)) | ||||||
|  |  | ||||||
| unsigned int cFemonMPEG::s_Bitrates[2][3][16] = | int cFemonMPEG::s_Bitrates[2][3][16] = | ||||||
| { | { | ||||||
|   { |   { | ||||||
|     {0,  32,  48,  56,  64,  80,  96, 112, 128, 144, 160, 176, 192, 224, 256, -1}, // MPEG-2 Layer I |     {0,  32,  48,  56,  64,  80,  96, 112, 128, 144, 160, 176, 192, 224, 256, -1}, // MPEG-2 Layer I | ||||||
| @@ -24,7 +24,7 @@ unsigned int cFemonMPEG::s_Bitrates[2][3][16] = | |||||||
|   } |   } | ||||||
| }; | }; | ||||||
|  |  | ||||||
| unsigned int cFemonMPEG::s_Samplerates[2][4] = | int cFemonMPEG::s_Samplerates[2][4] = | ||||||
| { | { | ||||||
|   {22050, 24000, 16000, -1}, // MPEG-2 |   {22050, 24000, 16000, -1}, // MPEG-2 | ||||||
|   {44100, 48000, 32000, -1}  // MPEG-1 |   {44100, 48000, 32000, -1}  // MPEG-1 | ||||||
|   | |||||||
| @@ -16,8 +16,8 @@ private: | |||||||
|   cFemonVideoIf *m_VideoHandler; |   cFemonVideoIf *m_VideoHandler; | ||||||
|   cFemonAudioIf *m_AudioHandler; |   cFemonAudioIf *m_AudioHandler; | ||||||
|  |  | ||||||
|   static unsigned int s_Bitrates[2][3][16]; |   static int s_Bitrates[2][3][16]; | ||||||
|   static unsigned int s_Samplerates[2][4]; |   static int s_Samplerates[2][4]; | ||||||
|   static eAudioCodec s_Formats[2][4]; |   static eAudioCodec s_Formats[2][4]; | ||||||
|  |  | ||||||
| public: | public: | ||||||
|   | |||||||
							
								
								
									
										105
									
								
								femonosd.c
									
									
									
									
									
								
							
							
						
						
									
										105
									
								
								femonosd.c
									
									
									
									
									
								
							| @@ -183,7 +183,9 @@ cFemonOsd::cFemonOsd() | |||||||
|   m_BERValid(false), |   m_BERValid(false), | ||||||
|   m_UNC(0), |   m_UNC(0), | ||||||
|   m_UNCValid(false), |   m_UNCValid(false), | ||||||
|  |   m_FrontendName(""), | ||||||
|   m_FrontendStatusValid(false), |   m_FrontendStatusValid(false), | ||||||
|  |   m_DeviceSource(DEVICESOURCE_DVBAPI), | ||||||
|   m_DisplayMode(femonConfig.displaymode), |   m_DisplayMode(femonConfig.displaymode), | ||||||
|   m_OsdWidth(cOsd::OsdWidth() * (100 - femonConfig.downscale) / 100), |   m_OsdWidth(cOsd::OsdWidth() * (100 - femonConfig.downscale) / 100), | ||||||
|   m_OsdHeight(cOsd::OsdHeight() * (100 - femonConfig.downscale) / 100), |   m_OsdHeight(cOsd::OsdHeight() * (100 - femonConfig.downscale) / 100), | ||||||
| @@ -199,7 +201,7 @@ cFemonOsd::cFemonOsd() | |||||||
|   memset(&m_FrontendInfo, 0, sizeof(m_FrontendInfo)); |   memset(&m_FrontendInfo, 0, sizeof(m_FrontendInfo)); | ||||||
|   m_SvdrpConnection.handle = -1; |   m_SvdrpConnection.handle = -1; | ||||||
|   femonSymbols.Refresh(); |   femonSymbols.Refresh(); | ||||||
|   m_Font = cFont::CreateFont(Setup.FontSml, min(max(Setup.FontSmlSize, MINFONTSIZE), MAXFONTSIZE)); |   m_Font = cFont::CreateFont(Setup.FontSml, constrain(Setup.FontSmlSize, MINFONTSIZE, MAXFONTSIZE)); | ||||||
|   if (!m_Font || !m_Font->Height()) { |   if (!m_Font || !m_Font->Height()) { | ||||||
|      m_Font = new cFemonDummyFont; |      m_Font = new cFemonDummyFont; | ||||||
|      error("cFemonOsd::cFemonOsd() cannot create required font."); |      error("cFemonOsd::cFemonOsd() cannot create required font."); | ||||||
| @@ -419,7 +421,7 @@ void cFemonOsd::DrawInfoWindow(void) | |||||||
|             offset += OSDROWHEIGHT; |             offset += OSDROWHEIGHT; | ||||||
|             switch (channel->Source() & cSource::st_Mask) { |             switch (channel->Source() & cSource::st_Mask) { | ||||||
|               case cSource::stSat: |               case cSource::stSat: | ||||||
|                    OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getSatelliteSystem(dtp.System()), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name)); |                    OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getSatelliteSystem(dtp.System()), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), *m_FrontendName)); | ||||||
|                    offset += OSDROWHEIGHT; |                    offset += OSDROWHEIGHT; | ||||||
|                    OSDDRAWINFOLEFT( trVDR("Frequency"),    *getFrequencyMHz(channel->Frequency())); |                    OSDDRAWINFOLEFT( trVDR("Frequency"),    *getFrequencyMHz(channel->Frequency())); | ||||||
|                    OSDDRAWINFORIGHT(trVDR("Source"),       *cSource::ToString(channel->Source())); |                    OSDDRAWINFORIGHT(trVDR("Source"),       *cSource::ToString(channel->Source())); | ||||||
| @@ -436,7 +438,7 @@ void cFemonOsd::DrawInfoWindow(void) | |||||||
|                    break; |                    break; | ||||||
|  |  | ||||||
|               case cSource::stCable: |               case cSource::stCable: | ||||||
|                    OSDDRAWINFOLINE(*cString::sprintf("DVB-C #%d - %s", (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name)); |                    OSDDRAWINFOLINE(*cString::sprintf("DVB-C #%d - %s", (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), *m_FrontendName)); | ||||||
|                    offset += OSDROWHEIGHT; |                    offset += OSDROWHEIGHT; | ||||||
|                    OSDDRAWINFOLEFT( trVDR("Frequency"),    *getFrequencyMHz(channel->Frequency())); |                    OSDDRAWINFOLEFT( trVDR("Frequency"),    *getFrequencyMHz(channel->Frequency())); | ||||||
|                    OSDDRAWINFORIGHT(trVDR("Source"),       *cSource::ToString(channel->Source())); |                    OSDDRAWINFORIGHT(trVDR("Source"),       *cSource::ToString(channel->Source())); | ||||||
| @@ -449,7 +451,7 @@ void cFemonOsd::DrawInfoWindow(void) | |||||||
|                    break; |                    break; | ||||||
|  |  | ||||||
|               case cSource::stTerr: |               case cSource::stTerr: | ||||||
|                    OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getTerrestrialSystem(dtp.System()), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name)); |                    OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getTerrestrialSystem(dtp.System()), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), *m_FrontendName)); | ||||||
|                    offset += OSDROWHEIGHT; |                    offset += OSDROWHEIGHT; | ||||||
|                    OSDDRAWINFOLEFT( trVDR("Frequency"),    *getFrequencyMHz(channel->Frequency())); |                    OSDDRAWINFOLEFT( trVDR("Frequency"),    *getFrequencyMHz(channel->Frequency())); | ||||||
|                    OSDDRAWINFORIGHT(trVDR("Transmission"), *getTransmission(dtp.Transmission())); |                    OSDDRAWINFORIGHT(trVDR("Transmission"), *getTransmission(dtp.Transmission())); | ||||||
| @@ -549,18 +551,54 @@ void cFemonOsd::Action(void) | |||||||
|     m_SvdrpFrontend = -1; |     m_SvdrpFrontend = -1; | ||||||
|     m_SvdrpVideoBitrate = -1.0; |     m_SvdrpVideoBitrate = -1.0; | ||||||
|     m_SvdrpAudioBitrate = -1.0; |     m_SvdrpAudioBitrate = -1.0; | ||||||
|  |     switch (m_DeviceSource) { | ||||||
|  |       case DEVICESOURCE_PVRINPUT: | ||||||
|  |            m_Quality = cDevice::ActualDevice()->SignalStrength(); | ||||||
|  |            m_QualityValid = (m_Quality >= 0); | ||||||
|  |            m_Strength = cDevice::ActualDevice()->SignalStrength(); | ||||||
|  |            m_StrengthValid = (m_Strength >= 0); | ||||||
|  |            m_FrontendName = cDevice::ActualDevice()->DeviceName(); | ||||||
|  |            m_FrontendStatus = (fe_status_t)(m_StrengthValid ? (FE_HAS_LOCK | FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC) : 0); | ||||||
|  |            m_FrontendStatusValid = m_StrengthValid; | ||||||
|  |            m_Signal = uint16_t(m_Strength * 0xFFFF / 100); | ||||||
|  |            m_SignalValid = m_StrengthValid; | ||||||
|  |            m_SNR = 0; | ||||||
|  |            m_SNRValid = false; | ||||||
|  |            m_BER = 0; | ||||||
|  |            m_BERValid = false; | ||||||
|  |            m_UNC = 0; | ||||||
|  |            m_UNCValid = false; | ||||||
|  |            break; | ||||||
|  |       case DEVICESOURCE_IPTV: | ||||||
|  |            m_Quality = cDevice::ActualDevice()->SignalQuality(); | ||||||
|  |            m_QualityValid = (m_Quality >= 0); | ||||||
|  |            m_Strength = cDevice::ActualDevice()->SignalStrength(); | ||||||
|  |            m_StrengthValid = (m_Strength >= 0); | ||||||
|  |            m_FrontendName = cDevice::ActualDevice()->DeviceName(); | ||||||
|  |            m_FrontendStatus = (fe_status_t)(m_StrengthValid ? (FE_HAS_LOCK | FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC) : 0); | ||||||
|  |            m_FrontendStatusValid = m_StrengthValid; | ||||||
|  |            m_Signal = uint16_t(m_Strength * 0xFFFF / 100); | ||||||
|  |            m_SignalValid = m_StrengthValid; | ||||||
|  |            m_SNR = uint16_t(m_Quality * 0xFFFF / 100); | ||||||
|  |            m_SNRValid = m_QualityValid; | ||||||
|  |            m_BER = 0; | ||||||
|  |            m_BERValid = false; | ||||||
|  |            m_UNC = 0; | ||||||
|  |            m_UNCValid = false; | ||||||
|  |            break; | ||||||
|  |       default: | ||||||
|  |       case DEVICESOURCE_DVBAPI: | ||||||
|            if (m_Frontend != -1) { |            if (m_Frontend != -1) { | ||||||
|               m_Quality = cDevice::ActualDevice()->SignalQuality(); |               m_Quality = cDevice::ActualDevice()->SignalQuality(); | ||||||
|               m_QualityValid = (m_Quality >= 0); |               m_QualityValid = (m_Quality >= 0); | ||||||
|               m_Strength = cDevice::ActualDevice()->SignalStrength(); |               m_Strength = cDevice::ActualDevice()->SignalStrength(); | ||||||
|               m_StrengthValid = (m_Strength >= 0); |               m_StrengthValid = (m_Strength >= 0); | ||||||
|  |               m_FrontendName = cDevice::ActualDevice()->DeviceName(); | ||||||
|               m_FrontendStatusValid = (ioctl(m_Frontend, FE_READ_STATUS, &m_FrontendStatus) >= 0); |               m_FrontendStatusValid = (ioctl(m_Frontend, FE_READ_STATUS, &m_FrontendStatus) >= 0); | ||||||
|               m_SignalValid = (ioctl(m_Frontend, FE_READ_SIGNAL_STRENGTH, &m_Signal) >= 0); |               m_SignalValid = (ioctl(m_Frontend, FE_READ_SIGNAL_STRENGTH, &m_Signal) >= 0); | ||||||
|               m_SNRValid = (ioctl(m_Frontend, FE_READ_SNR, &m_SNR) >= 0); |               m_SNRValid = (ioctl(m_Frontend, FE_READ_SNR, &m_SNR) >= 0); | ||||||
|               m_BERValid = (ioctl(m_Frontend, FE_READ_BER, &m_BER) >= 0); |               m_BERValid = (ioctl(m_Frontend, FE_READ_BER, &m_BER) >= 0); | ||||||
|               m_UNCValid = (ioctl(m_Frontend, FE_READ_UNCORRECTED_BLOCKS, &m_UNC) >= 0); |               m_UNCValid = (ioctl(m_Frontend, FE_READ_UNCORRECTED_BLOCKS, &m_UNC) >= 0); | ||||||
|        DrawInfoWindow(); |  | ||||||
|        DrawStatusWindow(); |  | ||||||
|               } |               } | ||||||
|            else if (m_SvdrpConnection.handle >= 0) { |            else if (m_SvdrpConnection.handle >= 0) { | ||||||
|               cmd.handle = m_SvdrpConnection.handle; |               cmd.handle = m_SvdrpConnection.handle; | ||||||
| @@ -588,7 +626,7 @@ void cFemonOsd::Action(void) | |||||||
|                      else if (!strncasecmp(s, "TYPE:", 5)) |                      else if (!strncasecmp(s, "TYPE:", 5)) | ||||||
|                         m_FrontendInfo.type = (fe_type_t)strtol(s + 5, NULL, 10); |                         m_FrontendInfo.type = (fe_type_t)strtol(s + 5, NULL, 10); | ||||||
|                      else if (!strncasecmp(s, "NAME:", 5)) { |                      else if (!strncasecmp(s, "NAME:", 5)) { | ||||||
|                  strn0cpy(m_FrontendInfo.name, s + 5, sizeof(m_FrontendInfo.name)); |                         m_FrontendName = s + 5; | ||||||
|                         } |                         } | ||||||
|                      else if (!strncasecmp(s, "STAT:", 5)) { |                      else if (!strncasecmp(s, "STAT:", 5)) { | ||||||
|                         m_FrontendStatus = (fe_status_t)strtol(s + 5, NULL, 16); |                         m_FrontendStatus = (fe_status_t)strtol(s + 5, NULL, 16); | ||||||
| @@ -616,9 +654,11 @@ void cFemonOsd::Action(void) | |||||||
|                         m_SvdrpAudioBitrate = (double)strtol(s + 5, NULL, 10); |                         m_SvdrpAudioBitrate = (double)strtol(s + 5, NULL, 10); | ||||||
|                      } |                      } | ||||||
|                  } |                  } | ||||||
|  |               } | ||||||
|  |            break; | ||||||
|  |       } | ||||||
|     DrawInfoWindow(); |     DrawInfoWindow(); | ||||||
|     DrawStatusWindow(); |     DrawStatusWindow(); | ||||||
|        } |  | ||||||
|     m_Sleep.Wait(max((int)(100 * femonConfig.updateinterval - t.Elapsed()), 3)); |     m_Sleep.Wait(max((int)(100 * femonConfig.updateinterval - t.Elapsed()), 3)); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -627,6 +667,17 @@ void cFemonOsd::Show(void) | |||||||
| { | { | ||||||
|   debug("%s()\n", __PRETTY_FUNCTION__); |   debug("%s()\n", __PRETTY_FUNCTION__); | ||||||
|   eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); |   eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); | ||||||
|  |   cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); | ||||||
|  |  | ||||||
|  |   m_DeviceSource = DEVICESOURCE_DVBAPI; | ||||||
|  |   if (channel) { | ||||||
|  |      if (channel->IsSourceType('I')) | ||||||
|  |         m_DeviceSource = DEVICESOURCE_IPTV; | ||||||
|  |      else if (channel->IsSourceType('V')) | ||||||
|  |         m_DeviceSource = DEVICESOURCE_PVRINPUT; | ||||||
|  |      } | ||||||
|  |  | ||||||
|  |   if (m_DeviceSource == DEVICESOURCE_DVBAPI) { | ||||||
|      cDvbDevice *dev = dynamic_cast<cDvbDevice*>(cDevice::ActualDevice()); |      cDvbDevice *dev = dynamic_cast<cDvbDevice*>(cDevice::ActualDevice()); | ||||||
|      m_Frontend = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1; |      m_Frontend = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1; | ||||||
|      if (m_Frontend >= 0) { |      if (m_Frontend >= 0) { | ||||||
| @@ -647,6 +698,9 @@ void cFemonOsd::Show(void) | |||||||
|         error("cFemonOsd::Show() cannot open frontend device."); |         error("cFemonOsd::Show() cannot open frontend device."); | ||||||
|         return; |         return; | ||||||
|         } |         } | ||||||
|  |      } | ||||||
|  |   else | ||||||
|  |      m_Frontend = -1; | ||||||
|  |  | ||||||
|   m_Osd = cOsdProvider::NewOsd(m_OsdLeft, m_OsdTop); |   m_Osd = cOsdProvider::NewOsd(m_OsdLeft, m_OsdTop); | ||||||
|   if (m_Osd) { |   if (m_Osd) { | ||||||
| @@ -667,24 +721,37 @@ void cFemonOsd::Show(void) | |||||||
|         m_Receiver->Deactivate(); |         m_Receiver->Deactivate(); | ||||||
|         DELETENULL(m_Receiver); |         DELETENULL(m_Receiver); | ||||||
|         } |         } | ||||||
|      if (femonConfig.analyzestream) { |      if (femonConfig.analyzestream && channel) { | ||||||
|         cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); |  | ||||||
|         if (channel) { |  | ||||||
|         m_Receiver = new cFemonReceiver(channel->Vtype(), channel->Vpid(), channel->Apid(IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0), channel->Dpid(IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0)); |         m_Receiver = new cFemonReceiver(channel->Vtype(), channel->Vpid(), channel->Apid(IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0), channel->Dpid(IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0)); | ||||||
|         cDevice::ActualDevice()->AttachReceiver(m_Receiver); |         cDevice::ActualDevice()->AttachReceiver(m_Receiver); | ||||||
|         } |         } | ||||||
|         } |  | ||||||
|      Start(); |      Start(); | ||||||
|      } |      } | ||||||
| } | } | ||||||
|  |  | ||||||
| void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber) | void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber, bool liveView) | ||||||
| { | { | ||||||
|   debug("%s(%d,%d)\n", __PRETTY_FUNCTION__, device->DeviceNumber(), channelNumber); |   debug("%s(%d,%d)\n", __PRETTY_FUNCTION__, device->DeviceNumber(), channelNumber); | ||||||
|   eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); |   eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); | ||||||
|   if (!device->IsPrimaryDevice() || !channelNumber || cDevice::PrimaryDevice()->CurrentChannel() != channelNumber) |   cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); | ||||||
|  |  | ||||||
|  |   if (!liveView || !channelNumber || !channel || channel->Number() != channelNumber) | ||||||
|      return; |      return; | ||||||
|  |  | ||||||
|  |   m_DeviceSource = DEVICESOURCE_DVBAPI; | ||||||
|  |   if (channel) { | ||||||
|  |      if (channel->IsSourceType('I')) | ||||||
|  |         m_DeviceSource = DEVICESOURCE_IPTV; | ||||||
|  |      else if (channel->IsSourceType('V')) | ||||||
|  |         m_DeviceSource = DEVICESOURCE_PVRINPUT; | ||||||
|  |      } | ||||||
|  |  | ||||||
|  |   if (m_Frontend >= 0) { | ||||||
|      close(m_Frontend); |      close(m_Frontend); | ||||||
|  |      m_Frontend = -1; | ||||||
|  |      } | ||||||
|  |  | ||||||
|  |   if (m_DeviceSource == DEVICESOURCE_DVBAPI) { | ||||||
|      cDvbDevice *dev = dynamic_cast<cDvbDevice*>(cDevice::ActualDevice()); |      cDvbDevice *dev = dynamic_cast<cDvbDevice*>(cDevice::ActualDevice()); | ||||||
|      m_Frontend = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1; |      m_Frontend = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1; | ||||||
|      if (m_Frontend >= 0) { |      if (m_Frontend >= 0) { | ||||||
| @@ -705,18 +772,16 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber) | |||||||
|         error("cFemonOsd::ChannelSwitch() cannot open frontend device."); |         error("cFemonOsd::ChannelSwitch() cannot open frontend device."); | ||||||
|         return; |         return; | ||||||
|         } |         } | ||||||
|  |      } | ||||||
|  |  | ||||||
|   if (m_Receiver) { |   if (m_Receiver) { | ||||||
|      m_Receiver->Deactivate(); |      m_Receiver->Deactivate(); | ||||||
|      DELETENULL(m_Receiver); |      DELETENULL(m_Receiver); | ||||||
|      } |      } | ||||||
|   if (femonConfig.analyzestream) { |   if (femonConfig.analyzestream && channel) { | ||||||
|      cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); |  | ||||||
|      if (channel) { |  | ||||||
|      m_Receiver = new cFemonReceiver(channel->Vtype(), channel->Vpid(), channel->Apid(IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0), channel->Dpid(IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0)); |      m_Receiver = new cFemonReceiver(channel->Vtype(), channel->Vpid(), channel->Apid(IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0), channel->Dpid(IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0)); | ||||||
|      cDevice::ActualDevice()->AttachReceiver(m_Receiver); |      cDevice::ActualDevice()->AttachReceiver(m_Receiver); | ||||||
|      } |      } | ||||||
|      } |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void cFemonOsd::SetAudioTrack(int Index, const char * const *Tracks) | void cFemonOsd::SetAudioTrack(int Index, const char * const *Tracks) | ||||||
| @@ -755,13 +820,13 @@ bool cFemonOsd::DeviceSwitch(int direction) | |||||||
|               } |               } | ||||||
|            if (cDevice::GetDevice(device)->ProvidesChannel(channel, 0)) { |            if (cDevice::GetDevice(device)->ProvidesChannel(channel, 0)) { | ||||||
|               debug("%s(%d) device(%d)\n", __PRETTY_FUNCTION__, direction, device); |               debug("%s(%d) device(%d)\n", __PRETTY_FUNCTION__, direction, device); | ||||||
|               cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), 0); |               cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), 0, true); | ||||||
|               cControl::Shutdown(); |               cControl::Shutdown(); | ||||||
|               cDevice::GetDevice(device)->SwitchChannel(channel, true); |               cDevice::GetDevice(device)->SwitchChannel(channel, true); | ||||||
|               if (cDevice::GetDevice(device) == cDevice::PrimaryDevice()) |               if (cDevice::GetDevice(device) == cDevice::PrimaryDevice()) | ||||||
|                  cDevice::GetDevice(device)->ForceTransferMode(); |                  cDevice::GetDevice(device)->ForceTransferMode(); | ||||||
|               cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel)); |               cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel)); | ||||||
|               cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number()); |               cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number(), true); | ||||||
|               return (true); |               return (true); | ||||||
|               } |               } | ||||||
|            } |            } | ||||||
|   | |||||||
							
								
								
									
										11
									
								
								femonosd.h
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								femonosd.h
									
									
									
									
									
								
							| @@ -24,6 +24,13 @@ | |||||||
|  |  | ||||||
| class cFemonOsd : public cOsdObject, public cThread, public cStatus { | class cFemonOsd : public cOsdObject, public cThread, public cStatus { | ||||||
| private: | private: | ||||||
|  |   enum eDeviceSourceType { | ||||||
|  |     DEVICESOURCE_DVBAPI = 0, | ||||||
|  |     DEVICESOURCE_IPTV, | ||||||
|  |     DEVICESOURCE_PVRINPUT, | ||||||
|  |     DEVICESOURCE_COUNT | ||||||
|  |     }; | ||||||
|  |  | ||||||
|   static cFemonOsd *pInstance; |   static cFemonOsd *pInstance; | ||||||
|  |  | ||||||
|   cOsd             *m_Osd; |   cOsd             *m_Osd; | ||||||
| @@ -48,9 +55,11 @@ private: | |||||||
|   bool              m_BERValid; |   bool              m_BERValid; | ||||||
|   uint32_t          m_UNC; |   uint32_t          m_UNC; | ||||||
|   bool              m_UNCValid; |   bool              m_UNCValid; | ||||||
|  |   cString           m_FrontendName; | ||||||
|   fe_status_t       m_FrontendStatus; |   fe_status_t       m_FrontendStatus; | ||||||
|   bool              m_FrontendStatusValid; |   bool              m_FrontendStatusValid; | ||||||
|   dvb_frontend_info m_FrontendInfo; |   dvb_frontend_info m_FrontendInfo; | ||||||
|  |   eDeviceSourceType m_DeviceSource; | ||||||
|   int               m_DisplayMode; |   int               m_DisplayMode; | ||||||
|   int               m_OsdWidth; |   int               m_OsdWidth; | ||||||
|   int               m_OsdHeight; |   int               m_OsdHeight; | ||||||
| @@ -71,7 +80,7 @@ protected: | |||||||
|   cFemonOsd(const cFemonOsd&); |   cFemonOsd(const cFemonOsd&); | ||||||
|   cFemonOsd& operator= (const cFemonOsd&); |   cFemonOsd& operator= (const cFemonOsd&); | ||||||
|   virtual void Action(void); |   virtual void Action(void); | ||||||
|   virtual void ChannelSwitch(const cDevice * device, int channelNumber); |   virtual void ChannelSwitch(const cDevice *device, int channelNumber, bool liveView); | ||||||
|   virtual void SetAudioTrack(int Index, const char * const *Tracks); |   virtual void SetAudioTrack(int Index, const char * const *Tracks); | ||||||
|  |  | ||||||
| public: | public: | ||||||
|   | |||||||
| @@ -142,7 +142,7 @@ void cFemonReceiver::Action(void) | |||||||
|     bool processed = false; |     bool processed = false; | ||||||
|  |  | ||||||
|     // process available video data |     // process available video data | ||||||
|     while (Data = m_VideoBuffer.Get(Length)) { |     while ((Data = m_VideoBuffer.Get(Length))) { | ||||||
|       if (!m_Active || (Length < TS_SIZE)) |       if (!m_Active || (Length < TS_SIZE)) | ||||||
|          break; |          break; | ||||||
|       Length = TS_SIZE; |       Length = TS_SIZE; | ||||||
| @@ -179,7 +179,7 @@ void cFemonReceiver::Action(void) | |||||||
|       } |       } | ||||||
|  |  | ||||||
|     // process available audio data |     // process available audio data | ||||||
|     while (Data = m_AudioBuffer.Get(Length)) { |     while ((Data = m_AudioBuffer.Get(Length))) { | ||||||
|       if (!m_Active || (Length < TS_SIZE)) |       if (!m_Active || (Length < TS_SIZE)) | ||||||
|          break; |          break; | ||||||
|       Length = TS_SIZE; |       Length = TS_SIZE; | ||||||
| @@ -204,7 +204,7 @@ void cFemonReceiver::Action(void) | |||||||
|       } |       } | ||||||
|  |  | ||||||
|     // process available dolby data |     // process available dolby data | ||||||
|     while (Data = m_AC3Buffer.Get(Length)) { |     while ((Data = m_AC3Buffer.Get(Length))) { | ||||||
|       if (!m_Active || (Length < TS_SIZE)) |       if (!m_Active || (Length < TS_SIZE)) | ||||||
|          break; |          break; | ||||||
|       Length = TS_SIZE; |       Length = TS_SIZE; | ||||||
|   | |||||||
| @@ -77,8 +77,8 @@ public: | |||||||
|   ~cFemonSymbolCache(); |   ~cFemonSymbolCache(); | ||||||
|   void Refresh(); |   void Refresh(); | ||||||
|   cBitmap& Get(eSymbols symbolP); |   cBitmap& Get(eSymbols symbolP); | ||||||
|   int GetSpacing()  { return yFactorM * DEFAULT_SPACING; } |   int GetSpacing()  { return int(yFactorM * DEFAULT_SPACING);  } | ||||||
|   int GetRounding() { return yFactorM * DEFAULT_ROUNDING; } |   int GetRounding() { return int(yFactorM * DEFAULT_ROUNDING); } | ||||||
| }; | }; | ||||||
|  |  | ||||||
| extern cFemonSymbolCache femonSymbols; | extern cFemonSymbolCache femonSymbols; | ||||||
|   | |||||||
							
								
								
									
										13
									
								
								femontools.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								femontools.c
									
									
									
									
									
								
							| @@ -97,7 +97,7 @@ cString getFrontendInfo(cDvbDevice *device) | |||||||
|   info = cString::sprintf("CARD:%d\nSTRG:%d\nQUAL:%d", device->CardIndex(), device->SignalStrength(), device->SignalQuality()); |   info = cString::sprintf("CARD:%d\nSTRG:%d\nQUAL:%d", device->CardIndex(), device->SignalStrength(), device->SignalQuality()); | ||||||
|  |  | ||||||
|   if (ioctl(fe, FE_GET_INFO, &value) >= 0) |   if (ioctl(fe, FE_GET_INFO, &value) >= 0) | ||||||
|      info = cString::sprintf("%s\nTYPE:%d\nNAME:%s", *info, value.type, value.name); |      info = cString::sprintf("%s\nTYPE:%d\nNAME:%s", *info, value.type, *device->DeviceName()); | ||||||
|   if (ioctl(fe, FE_READ_STATUS, &status) >= 0) |   if (ioctl(fe, FE_READ_STATUS, &status) >= 0) | ||||||
|      info = cString::sprintf("%s\nSTAT:%02X", *info, status); |      info = cString::sprintf("%s\nSTAT:%02X", *info, status); | ||||||
|   if (ioctl(fe, FE_READ_SIGNAL_STRENGTH, &signal) >= 0) |   if (ioctl(fe, FE_READ_SIGNAL_STRENGTH, &signal) >= 0) | ||||||
| @@ -121,19 +121,10 @@ cString getFrontendInfo(cDvbDevice *device) | |||||||
|  |  | ||||||
| cString getFrontendName(cDvbDevice *device) | cString getFrontendName(cDvbDevice *device) | ||||||
| { | { | ||||||
|   struct dvb_frontend_info value; |  | ||||||
|  |  | ||||||
|   if (!device) |   if (!device) | ||||||
|      return NULL; |      return NULL; | ||||||
|  |  | ||||||
|   int fe = open(*cString::sprintf(FRONTEND_DEVICE, device->Adapter(), device->Frontend()), O_RDONLY | O_NONBLOCK); |   return (cString::sprintf("%s on device #%d", *device->DeviceName(), device->CardIndex())); | ||||||
|   if (fe < 0) |  | ||||||
|      return NULL; |  | ||||||
|   memset(&value, 0, sizeof(value)); |  | ||||||
|   ioctl(fe, FE_GET_INFO, &value); |  | ||||||
|   close(fe); |  | ||||||
|  |  | ||||||
|   return (cString::sprintf("%s on device #%d", value.name, device->CardIndex())); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| cString getFrontendStatus(cDvbDevice *device) | cString getFrontendStatus(cDvbDevice *device) | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0300\n" | "POT-Creation-Date: 2010-10-10 10:10+0300\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0300\n" | "PO-Revision-Date: 2010-10-10 10:10+0300\n" | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0300\n" | "POT-Creation-Date: 2010-10-10 10:10+0300\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0300\n" | "PO-Revision-Date: 2010-10-10 10:10+0300\n" | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0300\n" | "POT-Creation-Date: 2010-10-10 10:10+0300\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0300\n" | "PO-Revision-Date: 2010-10-10 10:10+0300\n" | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0300\n" | "POT-Creation-Date: 2010-10-10 10:10+0300\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0300\n" | "PO-Revision-Date: 2010-10-10 10:10+0300\n" | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0300\n" | "POT-Creation-Date: 2010-10-10 10:10+0300\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0300\n" | "PO-Revision-Date: 2010-10-10 10:10+0300\n" | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0200\n" | "POT-Creation-Date: 2010-10-10 10:10+0200\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0200\n" | "PO-Revision-Date: 2010-10-10 10:10+0200\n" | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0300\n" | "POT-Creation-Date: 2010-10-10 10:10+0300\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0300\n" | "PO-Revision-Date: 2010-10-10 10:10+0300\n" | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0300\n" | "POT-Creation-Date: 2010-10-10 10:10+0300\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0300\n" | "PO-Revision-Date: 2010-10-10 10:10+0300\n" | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0300\n" | "POT-Creation-Date: 2010-10-10 10:10+0300\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0300\n" | "PO-Revision-Date: 2010-10-10 10:10+0300\n" | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0300\n" | "POT-Creation-Date: 2010-10-10 10:10+0300\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0300\n" | "PO-Revision-Date: 2010-10-10 10:10+0300\n" | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
| # | # | ||||||
| msgid "" | msgid "" | ||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: vdr-femon 1.7.12\n" | "Project-Id-Version: vdr-femon 1.7.15\n" | ||||||
| "Report-Msgid-Bugs-To: <see README>\n" | "Report-Msgid-Bugs-To: <see README>\n" | ||||||
| "POT-Creation-Date: 2010-10-10 10:10+0300\n" | "POT-Creation-Date: 2010-10-10 10:10+0300\n" | ||||||
| "PO-Revision-Date: 2010-10-10 10:10+0300\n" | "PO-Revision-Date: 2010-10-10 10:10+0300\n" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user