mirror of
				https://github.com/rofafor/vdr-plugin-femon.git
				synced 2023-10-10 11:36:53 +00:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					b0b0fe4f02 | ||
| 
						 | 
					64e56af6dc | ||
| 
						 | 
					830aa73e1a | ||
| 
						 | 
					78048d8ea0 | 
							
								
								
									
										18
									
								
								COPYING
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								COPYING
									
									
									
									
									
								
							@@ -2,7 +2,7 @@
 | 
			
		||||
		       Version 2, June 1991
 | 
			
		||||
 | 
			
		||||
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
 | 
			
		||||
                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
			
		||||
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 | 
			
		||||
 Everyone is permitted to copy and distribute verbatim copies
 | 
			
		||||
 of this license document, but changing it is not allowed.
 | 
			
		||||
 | 
			
		||||
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users.  This
 | 
			
		||||
General Public License applies to most of the Free Software
 | 
			
		||||
Foundation's software and to any other program whose authors commit to
 | 
			
		||||
using it.  (Some other Free Software Foundation software is covered by
 | 
			
		||||
the GNU Library General Public License instead.)  You can apply it to
 | 
			
		||||
the GNU Lesser General Public License instead.)  You can apply it to
 | 
			
		||||
your programs, too.
 | 
			
		||||
 | 
			
		||||
  When we speak of free software, we are referring to freedom, not
 | 
			
		||||
@@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
 | 
			
		||||
 | 
			
		||||
  The precise terms and conditions for copying, distribution and
 | 
			
		||||
modification follow.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		    GNU GENERAL PUBLIC LICENSE
 | 
			
		||||
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 | 
			
		||||
 | 
			
		||||
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
 | 
			
		||||
    License.  (Exception: if the Program itself is interactive but
 | 
			
		||||
    does not normally print such an announcement, your work based on
 | 
			
		||||
    the Program is not required to print an announcement.)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
These requirements apply to the modified work as a whole.  If
 | 
			
		||||
identifiable sections of that work are not derived from the Program,
 | 
			
		||||
and can be reasonably considered independent and separate works in
 | 
			
		||||
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
 | 
			
		||||
access to copy the source code from the same place counts as
 | 
			
		||||
distribution of the source code, even though third parties are not
 | 
			
		||||
compelled to copy the source along with the object code.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  4. You may not copy, modify, sublicense, or distribute the Program
 | 
			
		||||
except as expressly provided under this License.  Any attempt
 | 
			
		||||
otherwise to copy, modify, sublicense or distribute the Program is
 | 
			
		||||
@@ -225,7 +225,7 @@ impose that choice.
 | 
			
		||||
 | 
			
		||||
This section is intended to make thoroughly clear what is believed to
 | 
			
		||||
be a consequence of the rest of this License.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  8. If the distribution and/or use of the Program is restricted in
 | 
			
		||||
certain countries either by patents or by copyrighted interfaces, the
 | 
			
		||||
original copyright holder who places the Program under this License
 | 
			
		||||
@@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 | 
			
		||||
POSSIBILITY OF SUCH DAMAGES.
 | 
			
		||||
 | 
			
		||||
		     END OF TERMS AND CONDITIONS
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	    How to Apply These Terms to Your New Programs
 | 
			
		||||
 | 
			
		||||
  If you develop a new program, and you want it to be of the greatest
 | 
			
		||||
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
 | 
			
		||||
 | 
			
		||||
    You should have received a copy of the GNU General Public License
 | 
			
		||||
    along with this program; if not, write to the Free Software
 | 
			
		||||
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
			
		||||
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Also add information on how to contact you by electronic and paper mail.
 | 
			
		||||
@@ -336,5 +336,5 @@ necessary.  Here is a sample; alter the names:
 | 
			
		||||
This General Public License does not permit incorporating your program into
 | 
			
		||||
proprietary programs.  If your program is a subroutine library, you may
 | 
			
		||||
consider it more useful to permit linking proprietary applications with the
 | 
			
		||||
library.  If this is what you want to do, use the GNU Library General
 | 
			
		||||
library.  If this is what you want to do, use the GNU Lesser General
 | 
			
		||||
Public License instead of this License.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								HISTORY
									
									
									
									
									
								
							@@ -240,3 +240,32 @@ VDR Plugin 'femon' Revision History
 | 
			
		||||
- Added INFO SVDRP command (partially based on patch by Herbert P<>tzl).
 | 
			
		||||
- Removed system log option - use SVDRP instead.
 | 
			
		||||
- Added --remove-destination to the 'cp' command in Makefile.
 | 
			
		||||
 | 
			
		||||
2007-01-08: Version 1.1.1
 | 
			
		||||
 | 
			
		||||
- Updated for vdr-1.5.0.
 | 
			
		||||
 | 
			
		||||
2007-05-01: Version 1.1.2
 | 
			
		||||
 | 
			
		||||
- Fixed opening while replaying (Thanks to Antti Sepp<70>l<EFBFBD> for reporting this one).
 | 
			
		||||
 | 
			
		||||
2007-05-15: Version 1.1.3
 | 
			
		||||
 | 
			
		||||
- Fixed a race condition in cFemonReceiver (Thanks to Reinhard Nissl).
 | 
			
		||||
 | 
			
		||||
2007-10-14: Version 1.1.4
 | 
			
		||||
 | 
			
		||||
- Backported from 1.2.2.
 | 
			
		||||
 | 
			
		||||
2007-08-14: Version 1.2.0
 | 
			
		||||
 | 
			
		||||
- Updated for vdr-1.5.7.
 | 
			
		||||
 | 
			
		||||
2007-08-19: Version 1.2.1
 | 
			
		||||
 | 
			
		||||
- Updated for vdr-1.5.8.
 | 
			
		||||
 | 
			
		||||
2007-10-14: Version 1.2.2
 | 
			
		||||
 | 
			
		||||
- Added Spids support.
 | 
			
		||||
- Minor OSD layout changes.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							@@ -20,7 +20,7 @@ PLUGIN = femon
 | 
			
		||||
 | 
			
		||||
### The version number of this plugin (taken from the main source file):
 | 
			
		||||
 | 
			
		||||
VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).h | awk '{ print $$6 }' | sed -e 's/[";]//g')
 | 
			
		||||
VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
 | 
			
		||||
 | 
			
		||||
### The C++ compiler and options:
 | 
			
		||||
 | 
			
		||||
@@ -67,6 +67,10 @@ all-redirect: all
 | 
			
		||||
 | 
			
		||||
OBJS = femon.o femonosd.o femonreceiver.o femoncfg.o femoni18n.o femontools.o
 | 
			
		||||
 | 
			
		||||
### The main target:
 | 
			
		||||
 | 
			
		||||
all: libvdr-$(PLUGIN).so
 | 
			
		||||
 | 
			
		||||
### Implicit rules:
 | 
			
		||||
 | 
			
		||||
%.o: %.c
 | 
			
		||||
@@ -83,8 +87,6 @@ $(DEPFILE): Makefile
 | 
			
		||||
 | 
			
		||||
### Targets:
 | 
			
		||||
 | 
			
		||||
all: libvdr-$(PLUGIN).so
 | 
			
		||||
 | 
			
		||||
libvdr-$(PLUGIN).so: $(OBJS)
 | 
			
		||||
	$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
 | 
			
		||||
ifndef FEMON_DEBUG
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								README
									
									
									
									
									
								
							@@ -1,11 +1,16 @@
 | 
			
		||||
This is a DVB Frontend Status Monitor plugin for the Video Disk Recorder (VDR).
 | 
			
		||||
 | 
			
		||||
Written by:                  R o l f . A h r e n b e r g @ s c i . f i
 | 
			
		||||
Written by:                  Rolf Ahrenberg
 | 
			
		||||
                             < R o l f . A h r e n b e r g @ s c i . f i >
 | 
			
		||||
 | 
			
		||||
Project's homepage:          http://www.saunalahti.fi/~rahrenbe/vdr/femon/
 | 
			
		||||
 | 
			
		||||
Latest version available at: http://www.saunalahti.fi/~rahrenbe/vdr/femon/
 | 
			
		||||
 | 
			
		||||
This program is free software; you can redistribute it and/or modify
 | 
			
		||||
it under the terms of the GNU General Public License as published by
 | 
			
		||||
the Free Software Foundation; either version 2 of the License, or
 | 
			
		||||
(at your option) any later version.
 | 
			
		||||
See the file COPYING for license information.
 | 
			
		||||
 | 
			
		||||
Requirements:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										53
									
								
								femon.c
									
									
									
									
									
								
							
							
						
						
									
										53
									
								
								femon.c
									
									
									
									
									
								
							@@ -6,6 +6,7 @@
 | 
			
		||||
 * $Id$
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <vdr/menu.h>
 | 
			
		||||
#include <vdr/remote.h>
 | 
			
		||||
#include "femoncfg.h"
 | 
			
		||||
#include "femoni18n.h"
 | 
			
		||||
@@ -13,12 +14,38 @@
 | 
			
		||||
#include "femonosd.h"
 | 
			
		||||
#include "femonservice.h"
 | 
			
		||||
#include "femontools.h"
 | 
			
		||||
#include "femon.h"
 | 
			
		||||
 | 
			
		||||
#if defined(APIVERSNUM) && APIVERSNUM < 10400
 | 
			
		||||
#error "VDR-1.4.0 API version or greater is required!"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static const char VERSION[]       = "1.1.4";
 | 
			
		||||
static const char DESCRIPTION[]   = "DVB Signal Information Monitor (OSD)";
 | 
			
		||||
static const char MAINMENUENTRY[] = "Signal Information";
 | 
			
		||||
 | 
			
		||||
class cPluginFemon : public cPlugin {
 | 
			
		||||
public:
 | 
			
		||||
  cPluginFemon(void);
 | 
			
		||||
  virtual ~cPluginFemon();
 | 
			
		||||
  virtual const char *Version(void) { return VERSION; }
 | 
			
		||||
  virtual const char *Description(void) { return tr(DESCRIPTION); }
 | 
			
		||||
  virtual const char *CommandLineHelp(void);
 | 
			
		||||
  virtual bool ProcessArgs(int argc, char *argv[]);
 | 
			
		||||
  virtual bool Initialize(void);
 | 
			
		||||
  virtual bool Start(void);
 | 
			
		||||
  virtual void Stop(void);
 | 
			
		||||
  virtual void Housekeeping(void);
 | 
			
		||||
  virtual void MainThreadHook(void) {}
 | 
			
		||||
  virtual cString Active(void) { return NULL; }
 | 
			
		||||
  virtual const char *MainMenuEntry(void) { return (femonConfig.hidemenu ? NULL : tr(MAINMENUENTRY)); }
 | 
			
		||||
  virtual cOsdObject *MainMenuAction(void);
 | 
			
		||||
  virtual cMenuSetupPage *SetupMenu(void);
 | 
			
		||||
  virtual bool SetupParse(const char *Name, const char *Value);
 | 
			
		||||
  virtual bool Service(const char *Id, void *Data);
 | 
			
		||||
  virtual const char **SVDRPHelpPages(void);
 | 
			
		||||
  virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
cPluginFemon::cPluginFemon()
 | 
			
		||||
{
 | 
			
		||||
  // Initialize any member variables here.
 | 
			
		||||
@@ -72,7 +99,11 @@ cOsdObject *cPluginFemon::MainMenuAction(void)
 | 
			
		||||
{
 | 
			
		||||
  // Perform the action when selected from the main VDR menu.
 | 
			
		||||
  Dprintf("%s()\n", __PRETTY_FUNCTION__);
 | 
			
		||||
  return cFemonOsd::Instance(true);
 | 
			
		||||
  if (cReplayControl::NowReplaying())
 | 
			
		||||
     Skins.Message(mtInfo, tr("Femon not available while replaying"));
 | 
			
		||||
  else
 | 
			
		||||
     return cFemonOsd::Instance(true);
 | 
			
		||||
  return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool cPluginFemon::SetupParse(const char *Name, const char *Value)
 | 
			
		||||
@@ -160,6 +191,10 @@ const char **cPluginFemon::SVDRPHelpPages(void)
 | 
			
		||||
cString cPluginFemon::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode)
 | 
			
		||||
{
 | 
			
		||||
  if (strcasecmp(Command, "OPEN") == 0) {
 | 
			
		||||
     if (cReplayControl::NowReplaying()) {
 | 
			
		||||
        ReplyCode = 550; // Requested action not taken
 | 
			
		||||
        return cString("Cannot open femon plugin while replaying");
 | 
			
		||||
        }
 | 
			
		||||
     if (!cFemonOsd::Instance())
 | 
			
		||||
        cRemote::CallPlugin("femon");
 | 
			
		||||
     return cString("Opening femon plugin");
 | 
			
		||||
@@ -225,6 +260,20 @@ cString cPluginFemon::SVDRPCommand(const char *Command, const char *Option, int
 | 
			
		||||
  return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class cMenuFemonSetup : public cMenuSetupPage {
 | 
			
		||||
private:
 | 
			
		||||
  const char *dispmodes[eFemonModeMaxNumber];
 | 
			
		||||
  const char *skins[eFemonSkinMaxNumber];
 | 
			
		||||
  const char *themes[eFemonThemeMaxNumber];
 | 
			
		||||
  cFemonConfig data;
 | 
			
		||||
  virtual void Setup(void);
 | 
			
		||||
protected:
 | 
			
		||||
  virtual eOSState ProcessKey(eKeys Key);
 | 
			
		||||
  virtual void Store(void);
 | 
			
		||||
public:
 | 
			
		||||
  cMenuFemonSetup(void);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
cMenuFemonSetup::cMenuFemonSetup(void)
 | 
			
		||||
{
 | 
			
		||||
  Dprintf("%s()\n", __PRETTY_FUNCTION__);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										56
									
								
								femon.h
									
									
									
									
									
								
							
							
						
						
									
										56
									
								
								femon.h
									
									
									
									
									
								
							@@ -1,56 +0,0 @@
 | 
			
		||||
/*
 | 
			
		||||
 * Frontend Status Monitor plugin for the Video Disk Recorder
 | 
			
		||||
 *
 | 
			
		||||
 * See the README file for copyright information and how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id$
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __FEMON_H
 | 
			
		||||
#define __FEMON_H
 | 
			
		||||
 | 
			
		||||
#include <vdr/plugin.h>
 | 
			
		||||
 | 
			
		||||
static const char VERSION[]       = "1.1.0";
 | 
			
		||||
static const char DESCRIPTION[]   = "DVB Signal Information Monitor (OSD)";
 | 
			
		||||
static const char MAINMENUENTRY[] = "Signal Information";
 | 
			
		||||
 | 
			
		||||
class cPluginFemon : public cPlugin {
 | 
			
		||||
public:
 | 
			
		||||
  cPluginFemon(void);
 | 
			
		||||
  virtual ~cPluginFemon();
 | 
			
		||||
  virtual const char *Version(void) { return VERSION; }
 | 
			
		||||
  virtual const char *Description(void) { return tr(DESCRIPTION); }
 | 
			
		||||
  virtual const char *CommandLineHelp(void);
 | 
			
		||||
  virtual bool ProcessArgs(int argc, char *argv[]);
 | 
			
		||||
  virtual bool Initialize(void);
 | 
			
		||||
  virtual bool Start(void);
 | 
			
		||||
  virtual void Stop(void);
 | 
			
		||||
  virtual void Housekeeping(void);
 | 
			
		||||
  virtual void MainThreadHook(void) {}
 | 
			
		||||
  virtual cString Active(void) { return NULL; }
 | 
			
		||||
  virtual const char *MainMenuEntry(void) { return (femonConfig.hidemenu ? NULL : tr(MAINMENUENTRY)); }
 | 
			
		||||
  virtual cOsdObject *MainMenuAction(void);
 | 
			
		||||
  virtual cMenuSetupPage *SetupMenu(void);
 | 
			
		||||
  virtual bool SetupParse(const char *Name, const char *Value);
 | 
			
		||||
  virtual bool Service(const char *Id, void *Data);
 | 
			
		||||
  virtual const char **SVDRPHelpPages(void);
 | 
			
		||||
  virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
class cMenuFemonSetup : public cMenuSetupPage {
 | 
			
		||||
private:
 | 
			
		||||
  const char *dispmodes[eFemonModeMaxNumber];
 | 
			
		||||
  const char *skins[eFemonSkinMaxNumber];
 | 
			
		||||
  const char *themes[eFemonThemeMaxNumber];
 | 
			
		||||
  cFemonConfig data;
 | 
			
		||||
  virtual void Setup(void);
 | 
			
		||||
protected:
 | 
			
		||||
  virtual eOSState ProcessKey(eKeys Key);
 | 
			
		||||
  virtual void Store(void);
 | 
			
		||||
public:
 | 
			
		||||
  cMenuFemonSetup(void);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
#endif //__FEMON_H
 | 
			
		||||
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								femonclient/vdr-femonclient-0.0.2.tgz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								femonclient/vdr-femonclient-0.0.2.tgz
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										22
									
								
								femoni18n.c
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								femoni18n.c
									
									
									
									
									
								
							@@ -2363,6 +2363,28 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "", // Dansk
 | 
			
		||||
    "", // <20>esky (Czech)
 | 
			
		||||
  },
 | 
			
		||||
  { "Femon not available while replaying", // English
 | 
			
		||||
    "", // Deutsch
 | 
			
		||||
    "", // Slovenski
 | 
			
		||||
    "", // Italiano
 | 
			
		||||
    "", // Nederlands
 | 
			
		||||
    "", // Portugu<67>s
 | 
			
		||||
    "", // Fran<61>ais
 | 
			
		||||
    "", // Norsk
 | 
			
		||||
    "Signaalimittari ei ole k<>ytett<74>viss<73> toiston aikana", // suomi
 | 
			
		||||
    "", // Polski
 | 
			
		||||
    "", // Espa<70>ol
 | 
			
		||||
    "", // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Greek)
 | 
			
		||||
    "", // Svenska
 | 
			
		||||
    "", // Romaneste
 | 
			
		||||
    "", // Magyar
 | 
			
		||||
    "", // Catal<61>
 | 
			
		||||
    "", // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Russian)
 | 
			
		||||
    "", // Hrvatski (Croatian)
 | 
			
		||||
    "", // Eesti
 | 
			
		||||
    "", // Dansk
 | 
			
		||||
    "", // <20>esky (Czech)
 | 
			
		||||
  },
 | 
			
		||||
  { NULL }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										25
									
								
								femonosd.c
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								femonosd.c
									
									
									
									
									
								
							@@ -44,7 +44,7 @@
 | 
			
		||||
#define OSDHEIGHT                 femonConfig.osdheight   // in pixels
 | 
			
		||||
#define OSDWIDTH                  600                     // in pixels
 | 
			
		||||
#define OSDROWHEIGHT              m_Font->Height()        // in pixels
 | 
			
		||||
#define OSDINFOHEIGHT             (OSDROWHEIGHT * 11)     // in pixels (11 rows)
 | 
			
		||||
#define OSDINFOHEIGHT             (OSDROWHEIGHT * 12)     // in pixels (12 rows)
 | 
			
		||||
#define OSDSTATUSHEIGHT           (OSDROWHEIGHT * 6)      // in pixels (6 rows)
 | 
			
		||||
#define OSDSPACING                5
 | 
			
		||||
#define OSDCORNERING              10
 | 
			
		||||
@@ -319,8 +319,8 @@ void cFemonOsd::DrawInfoWindow(void)
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), tr("Dpid"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), *getDpids(channel), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        offset += OSDROWHEIGHT;
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("CA"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), *getCAids(channel, femonConfig.showcasystem), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Spid"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), *getSpids(channel), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), tr("Tpid"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), *cString::sprintf("%d", channel->Tpid()), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        offset += OSDROWHEIGHT;
 | 
			
		||||
@@ -334,6 +334,9 @@ void cFemonOsd::DrawInfoWindow(void)
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), tr("Rid"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), *cString::sprintf("%d", channel->Rid()), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        offset += OSDROWHEIGHT;
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("CA"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), *getCAids(channel, femonConfig.showcasystem), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        offset += OSDROWHEIGHT;
 | 
			
		||||
        switch (m_FrontendInfo.type) {
 | 
			
		||||
          case FE_QPSK:
 | 
			
		||||
               m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), *cString::sprintf("%s #%d - %s", tr("Satellite Card"), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
@@ -432,6 +435,7 @@ void cFemonOsd::DrawInfoWindow(void)
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Resolution"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), m_Receiver ? *cString::sprintf("%d x %d", m_Receiver->VideoHorizontalSize(), m_Receiver->VideoVerticalSize()) : *cString::sprintf("---"), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        offset += OSDROWHEIGHT;
 | 
			
		||||
        offset += OSDROWHEIGHT;
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Audio Stream"), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), *cString::sprintf("#%d %s", IS_AUDIO_TRACK(track) ? channel->Apid(int(track - ttAudioFirst)) : channel->Apid(0), IS_AUDIO_TRACK(track) ? channel->Alang(int(track - ttAudioFirst)) : channel->Alang(0)), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
        offset += OSDROWHEIGHT;
 | 
			
		||||
@@ -451,13 +455,16 @@ void cFemonOsd::DrawInfoWindow(void)
 | 
			
		||||
     else if (m_DisplayMode == eFemonModeAC3) {
 | 
			
		||||
        m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), femonTheme[femonConfig.theme].clrBackground);
 | 
			
		||||
        m_Osd->DrawRectangle(0, OSDINFOWIN_Y(offset), OSDWIDTH, OSDINFOWIN_Y(offset+OSDROWHEIGHT-1), femonTheme[femonConfig.theme].clrTitleBackground);
 | 
			
		||||
        m_Osd->DrawText( OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), *cString::sprintf("%s - %s #%d %s", tr("Stream Information"), tr("AC-3 Stream"), IS_DOLBY_TRACK(track) ? channel->Dpid(int(track - ttDolbyFirst)) : channel->Dpid(0), IS_DOLBY_TRACK(track) ? channel->Dlang(int(track - ttDolbyFirst)) : channel->Dlang(0)), femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font);
 | 
			
		||||
        m_Osd->DrawText( OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Stream Information"), femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font);
 | 
			
		||||
        if (IS_OSDCORNERING) {
 | 
			
		||||
           m_Osd->DrawEllipse(0, OSDINFOWIN_Y(0), OSDCORNERING, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -2);
 | 
			
		||||
           m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -1);
 | 
			
		||||
           }
 | 
			
		||||
        offset += OSDROWHEIGHT;
 | 
			
		||||
        if (m_Receiver && m_Receiver->AC3Valid() && IS_DOLBY_TRACK(track)) {
 | 
			
		||||
           m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("AC-3 Stream"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
           m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), *cString::sprintf("#%d %s", channel->Dpid(int(track - ttDolbyFirst)), channel->Dlang(int(track - ttDolbyFirst))), femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font);
 | 
			
		||||
           offset += OSDROWHEIGHT;
 | 
			
		||||
           m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Bitrate"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
           m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), *cString::sprintf("%s (%s)", *getBitrateKbits(m_Receiver->AC3StreamBitrate()), *getBitrateKbits(m_Receiver->AC3Bitrate())), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
 | 
			
		||||
           offset += OSDROWHEIGHT;
 | 
			
		||||
@@ -602,7 +609,7 @@ void cFemonOsd::Show(void)
 | 
			
		||||
        cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
 | 
			
		||||
        IS_AUDIO_TRACK(track) ? apid[0] = channel->Apid(int(track - ttAudioFirst)) : apid[0] = channel->Apid(0);
 | 
			
		||||
        IS_DOLBY_TRACK(track) ? dpid[0] = channel->Dpid(int(track - ttDolbyFirst)) : dpid[0] = channel->Dpid(0);
 | 
			
		||||
        m_Receiver = new cFemonReceiver(channel->Ca(), channel->Vpid(), apid, dpid);
 | 
			
		||||
        m_Receiver = new cFemonReceiver(channel->GetChannelID(), channel->Ca(), channel->Vpid(), apid, dpid);
 | 
			
		||||
        cDevice::ActualDevice()->AttachReceiver(m_Receiver);
 | 
			
		||||
        }
 | 
			
		||||
     Start();
 | 
			
		||||
@@ -645,7 +652,7 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber)
 | 
			
		||||
     cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
 | 
			
		||||
     IS_AUDIO_TRACK(track) ? apid[0] = channel->Apid(int(track - ttAudioFirst)) : apid[0] = channel->Apid(0);
 | 
			
		||||
     IS_DOLBY_TRACK(track) ? dpid[0] = channel->Dpid(int(track - ttDolbyFirst)) : dpid[0] = channel->Dpid(0);
 | 
			
		||||
     m_Receiver = new cFemonReceiver(channel->Ca(), channel->Vpid(), apid, dpid);
 | 
			
		||||
     m_Receiver = new cFemonReceiver(channel->GetChannelID(), channel->Ca(), channel->Vpid(), apid, dpid);
 | 
			
		||||
     cDevice::ActualDevice()->AttachReceiver(m_Receiver);
 | 
			
		||||
     }
 | 
			
		||||
}
 | 
			
		||||
@@ -662,7 +669,7 @@ void cFemonOsd::SetAudioTrack(int Index, const char * const *Tracks)
 | 
			
		||||
     cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
 | 
			
		||||
     IS_AUDIO_TRACK(track) ? apid[0] = channel->Apid(int(track - ttAudioFirst)) : apid[0] = channel->Apid(0);
 | 
			
		||||
     IS_DOLBY_TRACK(track) ? dpid[0] = channel->Dpid(int(track - ttDolbyFirst)) : dpid[0] = channel->Dpid(0);
 | 
			
		||||
     m_Receiver = new cFemonReceiver(channel->Ca(), channel->Vpid(), apid, dpid);
 | 
			
		||||
     m_Receiver = new cFemonReceiver(channel->GetChannelID(), channel->Ca(), channel->Vpid(), apid, dpid);
 | 
			
		||||
     cDevice::ActualDevice()->AttachReceiver(m_Receiver);
 | 
			
		||||
     }
 | 
			
		||||
}
 | 
			
		||||
@@ -690,7 +697,11 @@ bool cFemonOsd::DeviceSwitch(int direction)
 | 
			
		||||
           cDevice::GetDevice(device)->SwitchChannel(channel, true);
 | 
			
		||||
           if (cDevice::GetDevice(device) == cDevice::PrimaryDevice())
 | 
			
		||||
              cDevice::GetDevice(device)->ForceTransferMode();
 | 
			
		||||
#if defined(APIVERSNUM) && APIVERSNUM < 10500
 | 
			
		||||
           cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel->Vpid(), channel->Apids(), channel->Dpids(), channel->Spids()));
 | 
			
		||||
#else
 | 
			
		||||
           cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel->GetChannelID(), channel->Vpid(), channel->Apids(), channel->Dpids(), channel->Spids()));
 | 
			
		||||
#endif
 | 
			
		||||
           cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number());
 | 
			
		||||
           return (true);
 | 
			
		||||
           }
 | 
			
		||||
 
 | 
			
		||||
@@ -17,8 +17,12 @@
 | 
			
		||||
#define PAYLOAD       0x10
 | 
			
		||||
#define PTS_DTS_FLAGS 0xC0
 | 
			
		||||
 | 
			
		||||
cFemonReceiver::cFemonReceiver(int Ca, int Vpid, int Apid[], int Dpid[])
 | 
			
		||||
cFemonReceiver::cFemonReceiver(tChannelID ChannelID, int Ca, int Vpid, int Apid[], int Dpid[])
 | 
			
		||||
#if defined(APIVERSNUM) && APIVERSNUM < 10500
 | 
			
		||||
:cReceiver(Ca, -1, Vpid, Apid, Dpid, NULL), cThread("femon receiver")
 | 
			
		||||
#else
 | 
			
		||||
:cReceiver(ChannelID, -1, Vpid, Apid, Dpid, NULL), cThread("femon receiver")
 | 
			
		||||
#endif
 | 
			
		||||
{
 | 
			
		||||
  Dprintf("%s()\n", __PRETTY_FUNCTION__);
 | 
			
		||||
  m_VideoPid = Vpid;
 | 
			
		||||
@@ -60,6 +64,7 @@ cFemonReceiver::~cFemonReceiver(void)
 | 
			
		||||
  Dprintf("%s()\n", __PRETTY_FUNCTION__);
 | 
			
		||||
  if (Running())
 | 
			
		||||
     Cancel(3);
 | 
			
		||||
  Detach();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* The following function originates from libdvbmpeg: */
 | 
			
		||||
 
 | 
			
		||||
@@ -96,7 +96,7 @@ protected:
 | 
			
		||||
  virtual void Action(void);
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
  cFemonReceiver(int Ca, int Vpid, int Apid[], int Dpid[]);
 | 
			
		||||
  cFemonReceiver(tChannelID ChannelID, int Ca, int Vpid, int Apid[], int Dpid[]);
 | 
			
		||||
  virtual ~cFemonReceiver();
 | 
			
		||||
 | 
			
		||||
  bool VideoValid(void)           { return m_VideoValid; };          // boolean
 | 
			
		||||
 
 | 
			
		||||
@@ -165,6 +165,15 @@ cString getDpids(const cChannel *channel)
 | 
			
		||||
  return dpids;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cString getSpids(const cChannel *channel)
 | 
			
		||||
{
 | 
			
		||||
  int value = 0;
 | 
			
		||||
  cString spids = cString::sprintf("%d", channel->Spid(value));
 | 
			
		||||
  while (channel->Spid(++value) && (value < MAXSPIDS))
 | 
			
		||||
    spids = cString::sprintf("%s, %d", *spids, channel->Spid(value));
 | 
			
		||||
  return spids;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cString getCAids(const cChannel *channel, bool identify)
 | 
			
		||||
{
 | 
			
		||||
  cString caids;
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@ uint32_t getUNC(int cardIndex = 0);
 | 
			
		||||
 | 
			
		||||
cString getApids(const cChannel *channel);
 | 
			
		||||
cString getDpids(const cChannel *channel);
 | 
			
		||||
cString getSpids(const cChannel *channel);
 | 
			
		||||
cString getCAids(const cChannel *channel, bool identify = false);
 | 
			
		||||
cString getCA(int value);
 | 
			
		||||
cString getCoderate(int value);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user