mirror of
				https://github.com/rofafor/vdr-plugin-femon.git
				synced 2023-10-10 11:36:53 +00:00 
			
		
		
		
	Compare commits
	
		
			5 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 55b5e0c293 | ||
|  | cbc39db870 | ||
|  | ecb79fe6db | ||
|  | 4a5318371d | ||
|  | c69a018337 | 
							
								
								
									
										57
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										57
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -29,7 +29,8 @@ VDR Plugin 'femon' Revision History | ||||
|  | ||||
| - Redesigned the user interface. | ||||
| - Transponder information is now available in advanced display mode: | ||||
|   Press 'OK' key to switch between the simple and the advanced display mode. | ||||
|   Press 'OK' key to switch between the simple and the advanced display | ||||
|   mode. | ||||
| - Moved bitrate calculation to it's own thread for improved accurancy. | ||||
|  | ||||
| 2004-03-07: Version 0.0.3a | ||||
| @@ -41,7 +42,8 @@ VDR Plugin 'femon' Revision History | ||||
| 2004-03-16: Version 0.0.3b | ||||
|  | ||||
| - Fixed channel toggling with '0' key. | ||||
| - Bitrate calculation thread is now canceled immediately to speed up channel switching. | ||||
| - Bitrate calculation thread is now canceled immediately to speed up | ||||
|   channel switching. | ||||
|  | ||||
| 2004-04-04: Version 0.0.3c | ||||
|  | ||||
| @@ -88,7 +90,8 @@ VDR Plugin 'femon' Revision History | ||||
|  | ||||
| 2004-06-11: Version 0.1.3 | ||||
|  | ||||
| - Added "AC-3 Stream Information" display mode (Thanks to Lothar Englisch). | ||||
| - Added "AC-3 Stream Information" display mode (Thanks to Lothar | ||||
|   Englisch). | ||||
|  | ||||
| 2004-06-24: Version 0.1.4 | ||||
|  | ||||
| @@ -100,7 +103,8 @@ VDR Plugin 'femon' Revision History | ||||
|  | ||||
| - Fixed OSDSTATUSWIN_XC define. | ||||
| - Added preliminary NTSC support (make NTSC_SYSTEM=1 plugins). | ||||
| - Fixed "Setup/OSD/Use Small Fonts" bug (Thanks to Winni for reporting this one). | ||||
| - Fixed "Setup/OSD/Use Small Fonts" bug (Thanks to Winni for reporting | ||||
|   this one). | ||||
| - Added patches directory: CA system names by Lauri Tischler. | ||||
|  | ||||
| 2004-09-11: Version 0.1.6 | ||||
| @@ -146,7 +150,8 @@ VDR Plugin 'femon' Revision History | ||||
| 2005-04-01: Version 0.8.7 | ||||
|  | ||||
| - Default make target is now all. | ||||
| - Fixed the access rights of symbols subdirectory (Thanks to Harri Kukkonen). | ||||
| - Fixed the access rights of symbols subdirectory (Thanks to Harri | ||||
|   Kukkonen). | ||||
| - Added a new theme: Moronimo (Thanks to Morone). | ||||
|  | ||||
| 2005-04-02: Version 0.8.8 | ||||
| @@ -160,7 +165,8 @@ VDR Plugin 'femon' Revision History | ||||
|  | ||||
| 2005-05-20: Version 0.9.0 | ||||
|  | ||||
| - Renamed compiling switches ('DEBUG' to 'FEMON_DEBUG' and 'NTSC_SYSTEM' to 'FEMON_NTSC'). | ||||
| - Renamed compiling switches ('DEBUG' to 'FEMON_DEBUG' and 'NTSC_SYSTEM' | ||||
|   to 'FEMON_NTSC'). | ||||
| - Enabled preliminary support for the device switching. | ||||
|  | ||||
| 2005-07-23: Version 0.9.1 | ||||
| @@ -200,7 +206,8 @@ VDR Plugin 'femon' Revision History | ||||
|  | ||||
| - Updated for vdr-1.3.40. | ||||
| - Fixed a translation bug (Thanks to Antti Hartikainen). | ||||
| - Fixed AC3 header parsing bug (Thanks to Axel Katzur for reporting this one). | ||||
| - Fixed AC3 header parsing bug (Thanks to Axel Katzur for reporting this | ||||
|   one). | ||||
| - Fixed EgalsTry theme (Thanks to Uwe Hanke). | ||||
|  | ||||
| 2006-02-06: Version 0.9.7 | ||||
| @@ -248,7 +255,8 @@ VDR Plugin 'femon' Revision History | ||||
|  | ||||
| 2007-05-01: Version 1.1.2 | ||||
|  | ||||
| - Fixed opening while replaying (Thanks to Antti Seppälä for reporting this one). | ||||
| - Fixed opening while replaying (Thanks to Antti Seppälä for reporting | ||||
|   this one). | ||||
|  | ||||
| 2007-05-15: Version 1.1.3 | ||||
|  | ||||
| @@ -298,7 +306,7 @@ VDR Plugin 'femon' Revision History | ||||
| 2008-06-20: Version 1.6.1 | ||||
|  | ||||
| - Updated Italian translation (Thanks to Diego Pierotto). | ||||
| - Fixed a crash if no channel available (Thanks to Winfried Köhler) | ||||
| - Fixed a crash if no channel available (Thanks to Winfried Köhler). | ||||
|  | ||||
| 2008-10-12: Version 1.6.2 | ||||
|  | ||||
| @@ -317,17 +325,42 @@ VDR Plugin 'femon' Revision History | ||||
| - Updated Italian translation (Thanks to Diego Pierotto). | ||||
| - Fixed a memory leak. | ||||
| - Added a check for the minimum OSD height. | ||||
| - Replaced "Use single area (8bpp)" option with VDR's "Setup/OSD/Anti-alias". | ||||
| - Replaced "Use single area (8bpp)" option with VDR's | ||||
|   "Setup/OSD/Anti-alias". | ||||
| - Removed the FEMON_NTSC option. | ||||
| - Fixed a deadlock in cFemonReceiver (Thanks to Antti Seppälä for reporting this one). | ||||
| - Fixed a deadlock in cFemonReceiver (Thanks to Antti Seppälä for | ||||
|   reporting this one). | ||||
|  | ||||
| 2008-12-16: Version 1.6.5 | ||||
|  | ||||
| - Backported from 1.7.0. | ||||
|  | ||||
| 2009-01-06: Version 1.6.6 | ||||
|  | ||||
| - Backported from 1.7.1. | ||||
|  | ||||
| 2009-06-18: Version 1.6.7 | ||||
|  | ||||
| - Backported from 1.7.2. | ||||
|  | ||||
| =================================== | ||||
| VDR Plugin 'femon' Revision History | ||||
| =================================== | ||||
|  | ||||
| 2008-12-16: Version 1.7.0 | ||||
|  | ||||
| - Updated for vdr-1.7.2. | ||||
| - Added whitespace cleanups. | ||||
| - Changed info window to use the channel source instead of the frontend type. | ||||
| - Changed info window to use the channel source instead of the frontend | ||||
|   type. | ||||
| - Removed the "Show CA system" setup option. | ||||
|  | ||||
| 2009-01-06: Version 1.7.1 | ||||
|  | ||||
| - Fixed closing of frontend file handles (Thanks to Brendon Higgins for | ||||
|   reporting this one). | ||||
|  | ||||
| 2009-06-18: Version 1.7.2 | ||||
|  | ||||
| - Cleaned up compilation warnings. | ||||
| - Fixed font handling to be thread-safe. | ||||
|   | ||||
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @@ -23,7 +23,7 @@ VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).c | awk '{ p | ||||
| ### The C++ compiler and options: | ||||
|  | ||||
| CXX      ?= g++ | ||||
| CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses | ||||
| CXXFLAGS ?= -fPIC -g -O2 -Wall -Wextra -Wswitch-default -Wfloat-equal -Wundef -Wpointer-arith -Wconversion -Wcast-align -Wredundant-decls -Wno-unused-parameter -Woverloaded-virtual -Wno-parentheses | ||||
|  | ||||
| ### The directory environment: | ||||
|  | ||||
|   | ||||
							
								
								
									
										2
									
								
								femon.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								femon.c
									
									
									
									
									
								
							| @@ -18,7 +18,7 @@ | ||||
| #error "VDR-1.6.0 API version or greater is required!" | ||||
| #endif | ||||
|  | ||||
| static const char VERSION[]       = "1.6.5"; | ||||
| static const char VERSION[]       = "1.6.7"; | ||||
| static const char DESCRIPTION[]   = trNOOP("DVB Signal Information Monitor (OSD)"); | ||||
| static const char MAINMENUENTRY[] = trNOOP("Signal Information"); | ||||
|  | ||||
|   | ||||
| @@ -34,7 +34,7 @@ bool getAC3AudioInfo(uint8_t *buf, int len, ac3_info_t *info) | ||||
|      return false; | ||||
|  | ||||
|   uint8_t *data = buf + 2; | ||||
|   uint8_t frame = (data[2] & 0x3f); | ||||
|   uint8_t frame = (uint8_t)(data[2] & 0x3f); | ||||
|   info->bitrate = 1000 * ac3_bitrates[frame >> 1]; | ||||
|   uint8_t fr = (data[2] & 0xc0 ) >> 6; | ||||
|   //uint8_t sz = ac3_frames[fr][frame >> 1]; | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
| #define NAL_SEI     0x06 // Supplemental Enhancement Information | ||||
| #define NAL_SPS     0x07 // Sequence Parameter Set | ||||
| #define NAL_AUD     0x09 // Access Unit Delimiter | ||||
| #define NAL_END_SEQ 0x10 // End of Sequence | ||||
| #define NAL_END_SEQ 0x0A // End of Sequence | ||||
|  | ||||
| #define IS_NAL_SEI(buf)     (((buf)[0] == 0x00) && ((buf)[1] == 0x00) && ((buf)[2] == 0x01) && ((buf)[3] == NAL_SEI)) | ||||
| #define IS_NAL_SPS(buf)     (((buf)[0] == 0x00) && ((buf)[1] == 0x00) && ((buf)[2] == 0x01) && ((buf)[3] == NAL_SPS)) | ||||
| @@ -358,7 +358,7 @@ static int h264_get_picture_type(const uint8_t *buf, int len) | ||||
| { | ||||
|   for (int i = 0; i < (len - 5); ++i) { | ||||
|       if (buf[i] == 0 && buf[i + 1] == 0 && buf[i + 2] == 1 && buf[i + 3] == NAL_AUD) { | ||||
|          uint8_t type = (buf[i + 4] >> 5); | ||||
|          uint8_t type = (uint8_t)(buf[i + 4] >> 5); | ||||
|          switch (type) { | ||||
|            case 0: case 3: case 5: return I_FRAME; | ||||
|            case 1: case 4: case 6: return P_FRAME; | ||||
| @@ -392,7 +392,7 @@ bool getH264VideoInfo(uint8_t *buf, int len, video_info_t *info) | ||||
|          int nal_len; | ||||
|          //Dprintf("H.264: Found NAL SPS at offset %d/%d", i, len); | ||||
|          if (0 < (nal_len = h264_nal_unescape(nal_data, buf + i + 4, len - i - 4))) { | ||||
|             h264_sps_data_t sps = { 0 }; | ||||
|             h264_sps_data_t sps = { 0, 0, VIDEO_ASPECT_RATIO_INVALID, VIDEO_FORMAT_INVALID }; | ||||
|             if (h264_parse_sps(nal_data, nal_len, &sps)) { | ||||
|                info->format = sps.format; | ||||
|                info->width = sps.width; | ||||
| @@ -408,7 +408,7 @@ bool getH264VideoInfo(uint8_t *buf, int len, video_info_t *info) | ||||
|          int nal_len; | ||||
|          //Dprintf("H.264: Found NAL SEI at offset %d/%d", i, len); | ||||
|          if (0 < (nal_len = h264_nal_unescape(nal_data, buf + i + 4, len - i - 4))) { | ||||
|             h264_sei_data_t sei = { 0 }; | ||||
|             h264_sei_data_t sei = { 0, 0, VIDEO_SCAN_INVALID }; | ||||
|             if (h264_parse_sei(nal_data, nal_len, &sei)) { | ||||
|                info->frameRate = sei.frame_rate; | ||||
|                info->bitrate = sei.bitrate; | ||||
|   | ||||
| @@ -178,7 +178,7 @@ bool getMPEGVideoInfo(uint8_t *buf, int len, video_info_t *info) | ||||
|       info->format      = VIDEO_FORMAT_UNKNOWN; | ||||
|       break; | ||||
|     } | ||||
|   info->bitrate = 400.0 * (((data[4] << 10) & 0x0003FC00UL) | ((data[5] << 2) & 0x000003FCUL) | (((data[6] & 0xC0) >> 6) & 0x00000003UL)); | ||||
|   info->bitrate = 400.0 * (double)(((data[4] << 10) & 0x0003FC00UL) | ((data[5] << 2) & 0x000003FCUL) | (((data[6] & 0xC0) >> 6) & 0x00000003UL)); | ||||
|  | ||||
|   return true; | ||||
| } | ||||
|   | ||||
							
								
								
									
										55
									
								
								femonosd.c
									
									
									
									
									
								
							
							
						
						
									
										55
									
								
								femonosd.c
									
									
									
									
									
								
							| @@ -116,12 +116,28 @@ | ||||
| #define OSDCLEARINFO() \ | ||||
|         m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT) - 1, clrTransparent) | ||||
|  | ||||
| #ifndef MINFONTSIZE | ||||
| #define MINFONTSIZE 10 | ||||
| #endif | ||||
|  | ||||
| #ifndef MAXFONTSIZE | ||||
| #define MAXFONTSIZE 64 | ||||
| #endif | ||||
|  | ||||
| class cFemonDummyFont : public cFont { | ||||
| public: | ||||
|   virtual int Width(uint c) const { return 10; } | ||||
|   virtual int Width(const char *s) const { return 50; } | ||||
|   virtual int Height(void) const { return 20; } | ||||
|   virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const {} | ||||
| }; | ||||
|  | ||||
| cFemonOsd *cFemonOsd::pInstance = NULL; | ||||
|  | ||||
| cFemonOsd *cFemonOsd::Instance(bool create) | ||||
| { | ||||
|   Dprintf("%s()\n", __PRETTY_FUNCTION__); | ||||
|   if (pInstance == NULL && create) | ||||
|   if ((pInstance == NULL) && create) | ||||
|   { | ||||
|      pInstance = new cFemonOsd(); | ||||
|   } | ||||
| @@ -150,14 +166,11 @@ cFemonOsd::cFemonOsd() | ||||
| { | ||||
|   Dprintf("%s()\n", __PRETTY_FUNCTION__); | ||||
|   m_SvdrpConnection.handle = -1; | ||||
|   if (Setup.UseSmallFont == 0) { | ||||
|      // Dirty hack to force the small fonts... | ||||
|      Setup.UseSmallFont = 1; | ||||
|      m_Font = cFont::GetFont(fontSml); | ||||
|      Setup.UseSmallFont = 0; | ||||
|   m_Font = cFont::CreateFont(Setup.FontSml, min(max(Setup.FontSmlSize, MINFONTSIZE), MAXFONTSIZE)); | ||||
|   if (!m_Font || !m_Font->Height()) { | ||||
|      m_Font = new cFemonDummyFont; | ||||
|      esyslog("ERROR: cFemonOsd::cFemonOsd() cannot create required font."); | ||||
|      } | ||||
|   else | ||||
|      m_Font = cFont::GetFont(fontSml); | ||||
|   if (OSDHEIGHT < (OSDINFOHEIGHT + OSDROWHEIGHT + OSDSTATUSHEIGHT)) | ||||
|      OSDHEIGHT = (OSDINFOHEIGHT + OSDROWHEIGHT + OSDSTATUSHEIGHT); | ||||
| } | ||||
| @@ -179,6 +192,12 @@ cFemonOsd::~cFemonOsd(void) | ||||
|      } | ||||
|   if (m_Osd) | ||||
|      DELETENULL(m_Osd); | ||||
|   if (m_Font) | ||||
|      DELETENULL(m_Font); | ||||
|   if (m_Frontend >= 0) { | ||||
|      close(m_Frontend); | ||||
|      m_Frontend = -1; | ||||
|      } | ||||
|   pInstance = NULL; | ||||
| } | ||||
|  | ||||
| @@ -457,25 +476,25 @@ void cFemonOsd::Action(void) | ||||
|           for (cLine *line = cmd.reply.First(); line; line = cmd.reply.Next(line)) { | ||||
|               const char *s = line->Text(); | ||||
| 	      if (!strncasecmp(s, "CARD:", 5)) | ||||
|                  m_SvdrpFrontend = strtol(s + 5, NULL, 10); | ||||
|                  m_SvdrpFrontend = (int)strtol(s + 5, NULL, 10); | ||||
|               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)) | ||||
|                  strn0cpy(m_FrontendInfo.name, s + 5, sizeof(m_FrontendInfo.name)); | ||||
|               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); | ||||
|               else if (!strncasecmp(s, "SGNL:", 5)) | ||||
|                  m_Signal = strtol(s + 5, NULL, 16); | ||||
|                  m_Signal = (uint16_t)strtol(s + 5, NULL, 16); | ||||
|               else if (!strncasecmp(s, "SNRA:", 5)) | ||||
|                  m_SNR = strtol(s + 5, NULL, 16); | ||||
|                  m_SNR = (uint16_t)strtol(s + 5, NULL, 16); | ||||
|               else if (!strncasecmp(s, "BERA:", 5)) | ||||
|                  m_BER = strtol(s + 5, NULL, 16); | ||||
|                  m_BER = (uint32_t)strtol(s + 5, NULL, 16); | ||||
|               else if (!strncasecmp(s, "UNCB:", 5)) | ||||
|                  m_UNC = strtol(s + 5, NULL, 16); | ||||
|                  m_UNC = (uint32_t)strtol(s + 5, NULL, 16); | ||||
|               else if (!strncasecmp(s, "VIBR:", 5)) | ||||
|                  m_SvdrpVideoBitrate = strtol(s + 5, NULL, 10); | ||||
|                  m_SvdrpVideoBitrate = (double)strtol(s + 5, NULL, 10); | ||||
|               else if (!strncasecmp(s, "AUBR:", 5)) | ||||
|                  m_SvdrpAudioBitrate = strtol(s + 5, NULL, 10); | ||||
|                  m_SvdrpAudioBitrate = (double)strtol(s + 5, NULL, 10); | ||||
|               } | ||||
|           } | ||||
|        DrawInfoWindow(); | ||||
| @@ -646,7 +665,7 @@ bool cFemonOsd::SvdrpConnect(void) | ||||
|       m_SvdrpPlugin = cPluginManager::GetPlugin(SVDRPPLUGIN); | ||||
|       if (m_SvdrpPlugin) { | ||||
|          m_SvdrpConnection.serverIp = femonConfig.svdrpip; | ||||
|          m_SvdrpConnection.serverPort = femonConfig.svdrpport; | ||||
|          m_SvdrpConnection.serverPort = (unsigned short)femonConfig.svdrpport; | ||||
|          m_SvdrpConnection.shared = true; | ||||
|          m_SvdrpPlugin->Service("SvdrpConnection-v1.0", &m_SvdrpConnection); | ||||
|          if (m_SvdrpConnection.handle >= 0) { | ||||
|   | ||||
| @@ -43,7 +43,7 @@ private: | ||||
|   uint32_t          m_UNC; | ||||
|   fe_status_t       m_FrontendStatus; | ||||
|   int               m_DisplayMode; | ||||
|   const cFont      *m_Font; | ||||
|   cFont            *m_Font; | ||||
|   cTimeMs           m_InputTime; | ||||
|   cCondWait         m_Sleep; | ||||
|   cMutex            m_Mutex; | ||||
|   | ||||
| @@ -199,7 +199,7 @@ void cFemonReceiver::Receive(uchar *Data, int Length) | ||||
|         } | ||||
|      uint8_t off = 0; | ||||
|      if (Data[3] & ADAPT_FIELD) { | ||||
|         off = Data[4] + 1; | ||||
|         off = (uint8_t)(Data[4] + 1); | ||||
|         } | ||||
|      if (Data[1] & PAY_START) { | ||||
|         uint8_t *sb = Data + 4 + off; | ||||
|   | ||||
							
								
								
									
										20
									
								
								femontools.c
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								femontools.c
									
									
									
									
									
								
							| @@ -55,6 +55,7 @@ static cString getCA(int value) | ||||
|     case 0x4AE0:            return cString::sprintf("%s (%X)", "RossCrypt",          value); // Digi Raum Electronics Co. Ltd. | ||||
|     case 0x5500:            return cString::sprintf("%s (%X)", "Z-Crypt",            value); // Digi Raum Electronics Co. Ltd. | ||||
|     case 0x5501:            return cString::sprintf("%s (%X)", "Griffin",            value); // Griffin | ||||
|     default:                break; | ||||
|     } | ||||
|   return cString::sprintf("%X", value); | ||||
| } | ||||
| @@ -253,6 +254,7 @@ cString getVideoCodec(int value) | ||||
|   switch (value) { | ||||
|     case VIDEO_CODEC_MPEG2: return cString::sprintf("%s", tr("MPEG-2")); | ||||
|     case VIDEO_CODEC_H264:  return cString::sprintf("%s", tr("H.264")); | ||||
|     default:                break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -267,6 +269,7 @@ cString getAudioCodec(int value) | ||||
|     case AUDIO_CODEC_MPEG2_II:  return cString::sprintf("%s", tr("MPEG-2 Layer II")); | ||||
|     case AUDIO_CODEC_MPEG2_III: return cString::sprintf("%s", tr("MPEG-2 Layer III")); | ||||
|     case AUDIO_CODEC_HEAAC:     return cString::sprintf("%s", tr("HE-AAC")); | ||||
|     default:                    break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -278,6 +281,7 @@ cString getAudioChannelMode(int value) | ||||
|     case AUDIO_CHANNEL_MODE_JOINT_STEREO: return cString::sprintf("%s", tr("joint Stereo")); | ||||
|     case AUDIO_CHANNEL_MODE_DUAL:         return cString::sprintf("%s", tr("dual")); | ||||
|     case AUDIO_CHANNEL_MODE_SINGLE:       return cString::sprintf("%s", tr("mono")); | ||||
|     default:                              break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -295,6 +299,7 @@ cString getCoderate(int value) | ||||
|     case FEC_7_8:  return cString::sprintf("7/8"); | ||||
|     case FEC_8_9:  return cString::sprintf("8/9"); | ||||
|     case FEC_AUTO: return cString::sprintf("%s", trVDR("auto")); | ||||
|     default:       break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -305,6 +310,7 @@ cString getTransmission(int value) | ||||
|     case TRANSMISSION_MODE_2K:   return cString::sprintf("2K"); | ||||
|     case TRANSMISSION_MODE_8K:   return cString::sprintf("8K"); | ||||
|     case TRANSMISSION_MODE_AUTO: return cString::sprintf("%s", trVDR("auto")); | ||||
|     default:                     break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -316,6 +322,7 @@ cString getBandwidth(int value) | ||||
|     case BANDWIDTH_7_MHZ: return cString::sprintf("7 %s", tr("MHz")); | ||||
|     case BANDWIDTH_6_MHZ: return cString::sprintf("6 %s", tr("MHz")); | ||||
|     case BANDWIDTH_AUTO:  return cString::sprintf("%s", trVDR("auto")); | ||||
|     default:              break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -326,6 +333,7 @@ cString getInversion(int value) | ||||
|     case INVERSION_OFF:  return cString::sprintf("%s", tr("off")); | ||||
|     case INVERSION_ON:   return cString::sprintf("%s", tr("on")); | ||||
|     case INVERSION_AUTO: return cString::sprintf("%s", trVDR("auto")); | ||||
|     default:             break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -338,6 +346,7 @@ cString getHierarchy(int value) | ||||
|     case HIERARCHY_2:    return cString::sprintf("2"); | ||||
|     case HIERARCHY_4:    return cString::sprintf("4"); | ||||
|     case HIERARCHY_AUTO: return cString::sprintf("%s", trVDR("auto")); | ||||
|     default:             break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -350,6 +359,7 @@ cString getGuard(int value) | ||||
|     case GUARD_INTERVAL_1_8:  return cString::sprintf("1/8"); | ||||
|     case GUARD_INTERVAL_1_4:  return cString::sprintf("1/4"); | ||||
|     case GUARD_INTERVAL_AUTO: return cString::sprintf("%s", trVDR("auto")); | ||||
|     default:                  break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -364,6 +374,7 @@ cString getModulation(int value) | ||||
|     case QAM_128:  return cString::sprintf("QAM 128"); | ||||
|     case QAM_256:  return cString::sprintf("QAM 256"); | ||||
|     case QAM_AUTO: return cString::sprintf("QAM %s", trVDR("auto")); | ||||
|     default:       break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -403,6 +414,7 @@ cString getAspectRatio(int value) | ||||
|     case VIDEO_ASPECT_RATIO_160_99:   return cString::sprintf("160:99"); | ||||
|     case VIDEO_ASPECT_RATIO_3_2:      return cString::sprintf("3:2"); | ||||
|     case VIDEO_ASPECT_RATIO_2_1:      return cString::sprintf("2:1"); | ||||
|     default:                          break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -417,6 +429,7 @@ cString getVideoFormat(int value) | ||||
|     case VIDEO_FORMAT_NTSC:      return cString::sprintf("%s", tr("NTSC")); | ||||
|     case VIDEO_FORMAT_SECAM:     return cString::sprintf("%s", tr("SECAM")); | ||||
|     case VIDEO_FORMAT_MAC:       return cString::sprintf("%s", tr("MAC")); | ||||
|     default:                     break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -439,6 +452,7 @@ cString getAC3BitStreamMode(int value, int coding) | ||||
|     case AUDIO_BITSTREAM_MODE_C:      return cString::sprintf("%s", tr("Commentary (C)")); | ||||
|     case AUDIO_BITSTREAM_MODE_E:      return cString::sprintf("%s", tr("Emergency (E)")); | ||||
|     case AUDIO_BITSTREAM_MODE_VO_KAR: return cString::sprintf("%s", (coding == 1) ? tr("Voice Over (VO)") : tr("Karaoke")); | ||||
|     default:                          break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -455,6 +469,7 @@ cString getAC3AudioCodingMode(int value, int stream) | ||||
|        case AUDIO_CODING_MODE_3_1: return cString::sprintf("3/1 - %s, %s, %s, %s", tr("L"), tr("C"), tr("R"), tr("S")); | ||||
|        case AUDIO_CODING_MODE_2_2: return cString::sprintf("2/2 - %s, %s, %s, %s", tr("L"), tr("R"), tr("SL"), tr("SR")); | ||||
|        case AUDIO_CODING_MODE_3_2: return cString::sprintf("3/2 - %s, %s, %s, %s, %s", tr("L"), tr("C"), tr("R"), tr("SL"), tr("SR")); | ||||
|        default:                    break; | ||||
|        } | ||||
|      } | ||||
|   return cString::sprintf("---"); | ||||
| @@ -467,6 +482,7 @@ cString getAC3CenterMixLevel(int value) | ||||
|     case AUDIO_CENTER_MIX_LEVEL_MINUS_4_5dB: return cString::sprintf("-4.5 %s", tr("dB")); | ||||
|     case AUDIO_CENTER_MIX_LEVEL_MINUS_6dB:   return cString::sprintf("-6.0 %s", tr("dB")); | ||||
|     case AUDIO_CENTER_MIX_LEVEL_RESERVED:    return cString::sprintf("%s", tr("reserved")); | ||||
|     default:                                 break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -478,6 +494,7 @@ cString getAC3SurroundMixLevel(int value) | ||||
|     case AUDIO_SURROUND_MIX_LEVEL_MINUS_6dB: return cString::sprintf("-6 %s", tr("dB")); | ||||
|     case AUDIO_SURROUND_MIX_LEVEL_0_dB:      return cString::sprintf("0 %s", tr("dB")); | ||||
|     case AUDIO_SURROUND_MIX_LEVEL_RESERVED:  return cString::sprintf("%s", tr("reserved")); | ||||
|     default:                                 break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -489,6 +506,7 @@ cString getAC3DolbySurroundMode(int value) | ||||
|     case AUDIO_DOLBY_SURROUND_MODE_NOT_DOLBYSURROUND: return cString::sprintf("%s", trVDR("no")); | ||||
|     case AUDIO_DOLBY_SURROUND_MODE_DOLBYSURROUND:     return cString::sprintf("%s", trVDR("yes")); | ||||
|     case AUDIO_DOLBY_SURROUND_MODE_RESERVED:          return cString::sprintf("%s", tr("reserved")); | ||||
|     default:                                          break; | ||||
|     } | ||||
|   return cString::sprintf("---"); | ||||
| } | ||||
| @@ -511,6 +529,7 @@ cString getAudioSamplingFreq(int value) | ||||
|   switch (value) { | ||||
|     case AUDIO_SAMPLING_FREQUENCY_INVALID:  return cString::sprintf("---"); | ||||
|     case AUDIO_SAMPLING_FREQUENCY_RESERVED: return cString::sprintf("%s", tr("reserved")); | ||||
|     default:                                break; | ||||
|     } | ||||
|   return cString::sprintf("%d %s", value, tr("Hz")); | ||||
| } | ||||
| @@ -521,6 +540,7 @@ cString getAudioBitrate(double value, double stream) | ||||
|     case AUDIO_BITRATE_INVALID:  return cString::sprintf("---"); | ||||
|     case AUDIO_BITRATE_RESERVED: return cString::sprintf("%s (%s)", tr("reserved"), *getBitrateKbits(value)); | ||||
|     case AUDIO_BITRATE_FREE:     return cString::sprintf("%s (%s)", tr("free"), *getBitrateKbits(value)); | ||||
|     default:                     break; | ||||
|     } | ||||
|   return cString::sprintf("%s (%s)", *getBitrateKbits(stream), *getBitrateKbits(value)); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user