questo plugins permette di avere la gestione canali/bouquets come il reel , vedi questo tread:
viewtopic.php?f=2&t=1400
ci sono riuscito, l'unica cosa è che quando si preme Ok del telecommando esce la vechia lista canali di vdr e non quella del plugin, per il momento ho risolta chiamando il plugin con una regola keymacros , ma devo trovare una soluzione. adesso vi posto come fare a compilare yavdr con questo plugin.
se siamo arrivati fino a qui dobiamo essere gia apposto con le librerie per compilare yavdr
Codice: Seleziona tutto
cd /usr/local/src
apt-get source vdr
cd vdr-1.7.16
dpatch apply-all
http://www.megaupload.com/?d=OCEVUYR0
Codice: Seleziona tutto
diff -Naur vdrorg/channels.h vdrpatch/channels.h
--- vdrorg/channels.h	2010-11-24 16:44:45.979433000 +0100
+++ vdrpatch/channels.h	2010-11-24 00:49:16.605541000 +0100
@@ -14,6 +14,7 @@
 #include "sources.h"
 #include "thread.h"
 #include "tools.h"
+#include <vector>
 
 #define ISTRANSPONDER(f1, f2)  (abs((f1) - (f2)) < 4) //XXX
 
@@ -34,7 +35,11 @@
 #define MAXAPIDS 32 // audio
 #define MAXDPIDS 16 // dolby (AC3 + DTS)
 #define MAXSPIDS 32 // subtitles
+#ifdef REELVDR
+#define MAXCAIDS 256 // conditional access
+#else
 #define MAXCAIDS  8 // conditional access
+#endif /*REELVDR*/
 #define MAXTXTPAGES 8 // teletext pages
 
 #define MAXLANGCODE1 4 // a 3 letter language code, zero terminated
@@ -101,6 +106,11 @@
   friend class cSchedules;
   friend class cMenuEditChannel;
   friend class cDvbSourceParam;
+#ifdef USE_BOUQUETS
+  friend class cMenuMyEditChannel;
+  friend class cMenuMyBouquets;
+  friend class cMenuEditBouquet;
+#endif
 private:
   static cString ToText(const cChannel *Channel);
   char *name;
@@ -189,6 +199,17 @@
   int Number(void) const { return number; }
   void SetNumber(int Number) { number = Number; }
   bool GroupSep(void) const { return groupSep; }
+  #ifdef REELVDR
+  void SetGroupSep(bool GroupSep) { groupSep=GroupSep; }
+#endif /*REELVDR*/
   const char *Parameters(void) const { return parameters; }
   const cLinkChannels* LinkChannels(void) const { return linkChannels; }
   const cChannel *RefChannel(void) const { return refChannel; }
@@ -224,6 +245,9 @@
 public:
   cChannels(void);
   bool Load(const char *FileName, bool AllowComments = false, bool MustExist = false);
+  #ifdef REELVDR
+  bool Reload(const char *FileName, bool AllowComments = false, bool MustExist = false);
+#endif
   void HashChannel(cChannel *Channel);
   void UnhashChannel(cChannel *Channel);
   int GetNextGroup(int Idx);   // Get next channel group
diff -Naur vdrorg/config.c vdrpatch/config.c
--- vdrorg/config.c	2010-11-24 16:44:46.343389000 +0100
+++ vdrpatch/config.c	2010-11-23 22:08:57.796556000 +0100
@@ -423,6 +423,16 @@
   ShowRecLength = 0;
   ShowProgressBar = 0;
   MenuCmdPosition = 0;
+  #ifdef REELVDR
+  ExpertOptions  = 0;
+  AddNewChannels = 0;
+  UseBouquetList = 1;
+  OnlyRadioChannels = 0;
+  OnlyEncryptedChannels = 0;
+  OnlyHDChannels = 0;
+  ExpertNavi     = 0;
+  WantChListOnOk = 1;
+#endif /* REELVDR */
 }
 
 cSetup::~cSetup()
@@ -533,6 +543,16 @@
 bool cSetup::Parse(const char *Name, const char *Value)
 {
   if      (!strcasecmp(Name, "OSDLanguage"))       { strn0cpy(OSDLanguage, Value, sizeof(OSDLanguage)); I18nSetLocale(OSDLanguage); }
+  #ifdef REELVDR
+  else if (!strcasecmp(Name, "ExpertOptions"))       ExpertOptions      = atoi(Value);
+  else if (!strcasecmp(Name, "AddNewChannels"))      AddNewChannels     = atoi(Value);
+  else if (!strcasecmp(Name, "UseBouquetList"))      UseBouquetList     = atoi(Value);
+  else if (!strcasecmp(Name, "OnlyRadioChannels"))   OnlyRadioChannels  = atoi(Value);
+  else if (!strcasecmp(Name, "OnlyEncryptedChannels"))OnlyEncryptedChannels = atoi(Value);
+  else if (!strcasecmp(Name, "OnlyHDChannels"))      OnlyHDChannels       = atoi(Value);
+  else if (!strcasecmp(Name, "ExpertNavi"))          ExpertNavi         = atoi(Value);
+  else if (!strcasecmp(Name, "WantChListOnOk"))      WantChListOnOk     = atoi(Value);
+#endif /* REELVDR */
   else if (!strcasecmp(Name, "OSDSkin"))             Utf8Strn0Cpy(OSDSkin, Value, MaxSkinName);
   else if (!strcasecmp(Name, "OSDTheme"))            Utf8Strn0Cpy(OSDTheme, Value, MaxThemeName);
   else if (!strcasecmp(Name, "WarEagleIcons"))       WarEagleIcons      = atoi(Value);
@@ -776,6 +796,16 @@
   Store("ShowProgressBar",    ShowProgressBar);
   Store("MenuCmdPosition",    MenuCmdPosition);
   Store("CutTimePatchEnabled",CutTimePatchEnabled);
+  #ifdef REELVDR
+  Store("ExpertOptions",      ExpertOptions);
+  Store("AddNewChannels",     AddNewChannels);
+  Store("UseBouquetList",     UseBouquetList);
+  Store("OnlyRadioChannels",  OnlyRadioChannels);
+  Store("OnlyEncryptedChannels", OnlyEncryptedChannels);
+  Store("OnlyHDChannels", OnlyHDChannels);
+  Store("ExpertNavi",         ExpertNavi);
+  Store("WantChListOnOk",     WantChListOnOk);
+#endif /* REELVDR */
 
   Store("VerboseLNBlog",       VerboseLNBlog);
   char tmp[20];
diff -Naur vdrorg/config.h vdrpatch/config.h
--- vdrorg/config.h	2010-11-24 16:44:46.343389000 +0100
+++ vdrpatch/config.h	2010-11-23 22:00:49.217550000 +0100
@@ -13,7 +13,11 @@
 #include <arpa/inet.h>
 #include <stdio.h>
 #include <stdlib.h>
+#ifdef REELVDR
+#include <string>
+#else
 #include <string.h>
+#endif /*REELVDR*/
 #include <time.h>
 #include <unistd.h>
 #include "i18n.h"
@@ -323,6 +327,16 @@
   int CardUsesLnbNr[MAXDEVICES];
   int ShowRecDate, ShowRecTime, ShowRecLength, ShowProgressBar, MenuCmdPosition;
   int CutTimePatchEnabled;
+#ifdef REELVDR
+  int ExpertOptions;
+  int AddNewChannels;
+  int UseBouquetList;
+  int OnlyRadioChannels;
+  int OnlyEncryptedChannels;
+  int OnlyHDChannels;
+  int ExpertNavi;
+  int WantChListOnOk;
+#endif /* REELVDR */
   int __EndData__;
   char *noEPGList; // pointer not to be flat-copied
   cSetup(void);
diff -Naur vdrorg/debug.h vdrpatch/debug.h
--- vdrorg/debug.h	1970-01-01 01:00:00.000000000 +0100
+++ vdrpatch/debug.h	2010-11-12 17:02:04.391291000 +0100
@@ -0,0 +1,44 @@
+
+#ifndef DEBUG_H
+#define DEBUG_H
+#include <assert.h>
+
+#ifdef DBG
+  #undef DBG
+  #undef DERR
+  #undef DLOG
+  #undef PRINTF
+#endif
+
+
+#if defined DEBUG
+    #ifdef PLUGIN_NAME_I18N
+        #define CONTEXT PLUGIN_NAME_I18N
+    #else
+        #define CONTEXT "VDR, " __FILE__
+    #endif
+
+    // standard debug macro
+    #define DDD(x...)    printf("["CONTEXT"]: "x); printf("\n")
+
+    // standard error macro (red background)
+    #define DERR(x...)   printf("\033[0;37m\033[1;41m["CONTEXT"]: "x); printf("\033[0m\n")
+
+    // special macro: logs to syslog AND console
+    #define DLOG(x...)   printf("["CONTEXT"]: "x); printf("\n"); dsyslog("["CONTEXT"]: "x)
+
+    // for automatic conversion of printf's - i.e. use sed s/" printf"/" PRINTF"/
+    #define PRINTF(x...) printf("["CONTEXT"]: "x)
+#else
+    #define DDD(x...)
+    #define DERR(x...)
+    #define DLOG(x...)
+    #define PRINTF(x...)
+#endif
+
+//only here for compatibility reasons, don't use any more
+#define ERR "Error"
+
+#define DBG          ""
+
+#endif /* DEBUG_H */
diff -Naur vdrorg/Make.config vdrpatch/Make.config
--- vdrorg/Make.config	2010-11-24 16:44:46.219390000 +0100
+++ vdrpatch/Make.config	2010-11-23 22:12:45.285541000 +0100
@@ -27,6 +27,14 @@
     include $(VDRDIR)/Make.global
 endif
 
+REELVDR=1
+DEFINES  += -DREELVDR
+
+
+USE_BOUQUETS=1
+DEFINES += -DUSE_BOUQUETS
+
+
 BIDI = 1
 GRAPHTFT = 1
 DEFINES += -DUSE_GRAPHTFT
diff -Naur vdrorg/menu.c vdrpatch/menu.c
--- vdrorg/menu.c	2010-11-24 16:44:46.347390000 +0100
+++ vdrpatch/menu.c	2010-11-24 14:36:43.484388000 +0100
@@ -135,6 +135,7 @@
 
 // --- cMenuEditSrcItem ------------------------------------------------------
 
+#ifndef REELVDR
 class cMenuEditSrcItem : public cMenuEditIntItem {
 private:
   const cSource *source;
@@ -144,6 +145,8 @@
   cMenuEditSrcItem(const char *Name, int *Value);
   eOSState ProcessKey(eKeys Key);
   };
+#endif
+
 
 cMenuEditSrcItem::cMenuEditSrcItem(const char *Name, int *Value)
 :cMenuEditIntItem(Name, Value, 0)
@@ -4341,6 +4344,9 @@
          else
             return osEnd;
          break;
+#ifdef REELVDR
+    case kInfo: return osEnd; break;
+#endif
     default:
          if ((Key & (k_Repeat | k_Release)) == 0) {
             cRemote::Put(Key);
diff -Naur vdrorg/menu.h vdrpatch/menu.h
--- vdrorg/menu.h	2010-11-24 16:44:46.347390000 +0100
+++ vdrpatch/menu.h	2010-11-24 14:37:15.388408000 +0100
@@ -19,6 +19,18 @@
 #include "recorder.h"
 #include "skins.h"
 
+#ifdef REELVDR
+class cMenuEditSrcItem : public cMenuEditIntItem {
+private:
+  const cSource *source;
+protected:
+  virtual void Set(void);
+public:
+  cMenuEditSrcItem(const char *Name, int *Value);
+  eOSState ProcessKey(eKeys Key);
+  };
+#endif
+
 class cMenuText : public cOsdMenu {
 private:
   char *text;
@@ -99,8 +111,30 @@
   virtual const char* MenuKind() { return "MenuEvent"; }
   };
 
+#ifdef REELVDR
+struct MenuMainHook_Data_V1_0 {
+  eOSState  Function;    /*IN*/
+  cOsdMenu *pResultMenu; /*OUT*/
+};
+#define CREATE_MENU_MAIN(function,menu) {                              \
+  MenuMainHook_Data_V1_0 data;                                         \
+  memset(&data, 0, sizeof(data));                                      \
+  data.Function = function;                                            \
+  if (!cPluginManager::CallFirstService("MenuMainHook-V1.0", &data))   \
+    menu = new cMenuMain(function);                                    \
+  else                                                                 \
+    menu = data.pResultMenu;                                           \
+}
+#endif /* REELVDR*/
+
+
 class cMenuMain : public cOsdMenu {
+#ifdef REELVDR
+protected:
+  cMenuMain(const char *Title):cOsdMenu(Title){}; // Allow custom constructor
+#else
 private:
+#endif
   bool replaying;
   cOsdItem *stopReplayItem;
   cOsdItem *cancelEditingItem;
diff -Naur vdrorg/osdbase.c vdrpatch/osdbase.c
--- vdrorg/osdbase.c	2010-11-24 16:44:46.175390000 +0100
+++ vdrpatch/osdbase.c	2010-11-24 00:25:58.044544000 +0100
@@ -561,6 +561,9 @@
     case kRight|k_Repeat:
     case kRight: PageDown(); break;
     case kBack: return osBack;
+    #ifdef REELVDR
+   // case kInfo: return DisplayHelpMenu(title);
+#endif /* REELVDR */
     case kOk:   if (marked >= 0) {
                    SetStatus(NULL);
                    if (marked != current)
diff -Naur vdrorg/osdbase.h vdrpatch/osdbase.h
--- vdrorg/osdbase.h	2010-11-24 16:44:46.175390000 +0100
+++ vdrpatch/osdbase.h	2010-11-24 00:27:47.668551000 +0100
@@ -46,6 +50,10 @@
                 osUser10,
               };
 
+#ifdef USE_BOUQUETS
+enum eChannellistMode { Default, currentBouquet, classicList, bouquets, favourites, addToFavourites };
+#endif /* USE_BOUQUETS */
+
 class cOsdItem : public cListObject {
 private:
   char *text;
diff -Naur vdrorg/vdr.c vdrpatch/vdr.c
--- vdrorg/vdr.c	2010-11-24 16:44:46.331405000 +0100
+++ vdrpatch/vdr.c	2010-11-24 00:36:06.913551000 +0100
@@ -1237,7 +1237,22 @@
                   Menu = new cDisplayChannel(NORMALKEY(key));
                   break;
              // Viewing Control:
-             case kOk:   LastChannel = -1; break; // forces channel display
+               #ifdef REELVDR
+             case kInfo:
+             case kOk:  if ((Setup.WantChListOnOk && (key == kOk)) 
+                            || (!Setup.WantChListOnOk && (key == kInfo)) )
+                        {
+                            DirectMainFunction(osChannels);
+                        }
+                        else 
+                        {
+                            LastChannel = -1;
+                        }
+                        break;
+#else
+              case kOk:   LastChannel = -1; break; // forces channel display
+#endif
+             
              // Instant resume of the last viewed recording:
              case kPlay:
                   if (cReplayControl::LastReplayed()) { Codice: Seleziona tutto
sudo patch -p1 < ../bouquetpatchvdr.diffCodice: Seleziona tutto
make plugins REMOTE=LIRC CONFDIR=/var/lib/vdr LOCDIR=/usr/share/locale VIDEODIR=/var/lib/video.00 PLUGINLIBDIR=/usr/lib/vdr/plugins
Codice: Seleziona tutto
cd PLUGINS/src
svn co svn://reelbox.org/testing/src/vdr-plugins/src/bouquets-0.1  r 15566ora applichiamo la patch che serve per il plugin come prima fate copia e incolla di questa patch e chiamatela bouquetpatch.diff
Codice: Seleziona tutto
diff -Naur bouquets-0.1/Makefile bouquets/Makefile
--- bouquets-0.1/Makefile	2010-11-25 11:29:26.132664000 +0100
+++ bouquets/Makefile	2010-11-24 17:11:43.903390000 +0100
@@ -9,12 +9,15 @@
 #
 PLUGIN = bouquets
 
-### The object files (add further files here):
+### 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')
+
+### The C++ compiler and options:
+
+CXX      ?= g++
+CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual -fPIC
 
-OBJS = $(PLUGIN).o MenuBouquets.o MenuBouquetsList.o \
-	MenuEditBouquet.o SetChannelOptionsMenu.o MenuBouquetItem.o \
-	MenuChannelItem.o MenuEditChannel.o
-#filetools.o i18n.o
 
 ### The directory environment:
 
@@ -27,3 +30,69 @@
 -include $(VDRDIR)/Make.config
 -include $(VDRDIR)/Make.common
 
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
+
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
+
+# This is required for VDRs older than 1.3.47
+ifeq ($(strip $(APIVERSION)),)
+  APIVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
+endif
+
+### The name of the distribution archive:
+
+ARCHIVE = $(PLUGIN)-$(VERSION)
+PACKAGE = vdr-$(ARCHIVE)
+
+### Includes and Defines (add further entries here):
+
+INCLUDES += -I$(VDRDIR)/include
+
+DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+
+### The object files (add further files here):
+
+OBJS = $(PLUGIN).o MenuBouquets.o MenuBouquetsList.o \
+	MenuEditBouquet.o SetChannelOptionsMenu.o MenuBouquetItem.o \
+	MenuChannelItem.o MenuEditChannel.o
+#filetools.o i18n.o
+
+### Implicit rules:
+
+%.o: %.c
+	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
+
+# Dependencies:
+
+MAKEDEP = $(CXX) -MM -MG
+DEPFILE = .dependencies
+$(DEPFILE): Makefile
+	@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+
+-include $(DEPFILE)
+
+### Internationalization (I18N):
+
+ISPO = $(shell grep '\#define APIVERSNUM' $(VDRDIR)/config.h | awk '{if($$3>=10507){printf("yes")}else{printf("no")}}')
+
+
+
+### Targets:
+
+all: libvdr-$(PLUGIN).so 
+
+libvdr-$(PLUGIN).so: $(OBJS)
+	$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
+	@cp $@ $(LIBDIR)/$@.$(APIVERSION)
+
+dist: clean
+	@-rm -rf $(TMPDIR)/$(ARCHIVE)
+	@mkdir $(TMPDIR)/$(ARCHIVE)
+	@cp -a * $(TMPDIR)/$(ARCHIVE)
+	@tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
+	@-rm -rf $(TMPDIR)/$(ARCHIVE)
+	@echo Distribution package created as $(PACKAGE).tgz
+
+clean:
+	@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
+	@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
diff -Naur bouquets-0.1/MenuBouquets.c bouquets/MenuBouquets.c
--- bouquets-0.1/MenuBouquets.c	2010-11-25 11:29:26.132664000 +0100
+++ bouquets/MenuBouquets.c	2010-11-25 11:39:34.091682000 +0100
@@ -1442,11 +1442,11 @@
                 {
                     return EditChannel();
                 }
-                break;
-            case k2digit:
-                AddFavourite(false);
-                break;
-            case kGreater:
+             //   break;
+          //  case k2digit:
+            //    AddFavourite(false);
+              //  break;
+          //  case kGreater:
                 if (view_ == currentBouquet)
                 {
                     //printf("-------editMode2 = 1------\n");
diff -Naur bouquets-0.1/SetChannelOptionsMenu.c bouquets/SetChannelOptionsMenu.c
--- bouquets-0.1/SetChannelOptionsMenu.c	2010-11-22 16:29:51.978490000 +0100
+++ bouquets/SetChannelOptionsMenu.c	2010-11-25 11:38:57.828699000 +0100
@@ -62,7 +62,7 @@
 
     SetTitle(tr("Channellist: set filters"));
 
-    AddFloatingText(tr("Please select the content of the channellist"), 48);
+   // AddFloatingText(tr("Please select the content of the channellist"), 48);
 
     Add(new cOsdItem("", osUnknown, false));    // blank lineCodice: Seleziona tutto
patch -p1 < ../bouquetpatch.diffP.S bisogna ricompilare tutti i plugins perche ho aggiunto delle nuove classi nei sorgenti vdr.