Hi,

lucian orasanu schrieb:

> it is changed after patch with function above and in
> menu.c at line 304 is expecting another function like
> this: 
> 
> SChannel->cChannel::SetSatTransponderData(RotorPos->R_Code(),Frequenz,Pol,Symbolrate,FEC_AUTO);
> 
> so i modified this line in menu.c like this:
> 
> SChannel->cChannel::SetSatTransponderData(RotorPos->R_Code(),Frequenz,Pol,Symbolrate,Symbolrate,Symbolrate,Symbolrate,Symbolrate);

Try changing it to:

SChannel->cChannel::SetSatTransponderData(RotorPos->R_Code(),Frequenz,Pol,Symbolrate,DVBFE_FEC_AUTO,DVBFE_MOD_AUTO,DVBFE_DELSYS_DVBS,DVBFE_ROLLOFF_UNKNOWN);

You'll need to apply the attached VDR patch instead of the one
included with vdr-rotor.

Please keep in mind that I cannot test this patch. The suggested
line above will only support DVB-S. For DVB-S2 and H.264 support,
a lot more needs to be changed.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[EMAIL PROTECTED]
--- ../vdr-1.5.12-dvbs2-other/device.h	2007-10-21 11:21:52.000000000 +0200
+++ device.h	2008-01-10 22:09:12.000000000 +0100
@@ -23,6 +23,7 @@
 #include "spu.h"
 #include "thread.h"
 #include "tools.h"
+#include <linux/dvb/frontend.h>
 
 #define MAXDEVICES         16 // the maximum number of devices in the system
 #define MAXPIDHANDLES      64 // the maximum number of different PIDs per device
@@ -261,6 +266,7 @@ public:
   virtual bool HasProgramme(void);
          ///< Returns true if the device is currently showing any programme to
          ///< the user, either through replaying or live.
+  virtual bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd) {return false;}
 
 // PID handle facilities
 
--- ../vdr-1.5.12-dvbs2-other/dvbdevice.c	2008-01-01 22:55:18.000000000 +0100
+++ dvbdevice.c	2008-01-10 22:13:39.000000000 +0100
@@ -71,6 +71,7 @@ static int DvbOpen(const char *Name, int
 class cDvbTuner : public cThread {
 private:
   enum eTunerStatus { tsIdle, tsSet, tsTuned, tsLocked };
+  bool SendDiseqc;
   int fd_frontend;
   int cardIndex;
   int tuneTimeout;
@@ -83,6 +84,7 @@ private:
   cMutex mutex;
   cCondVar locked;
   cCondVar newSet;
+  dvb_diseqc_master_cmd diseqc_cmd;
   bool GetFrontendStatus(fe_status_t &Status, int TimeoutMs = 0);
   bool SetFrontend(void);
   virtual void Action(void);
@@ -91,12 +93,14 @@ public:
   virtual ~cDvbTuner();
   bool IsTunedTo(const cChannel *Channel) const;
   void Set(const cChannel *Channel, bool Tune);
+  bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd);
   bool Locked(int TimeoutMs = 0);
   };
 
 cDvbTuner::cDvbTuner(int Fd_Frontend, int CardIndex, dvbfe_delsys FrontendType)
 {
   fd_frontend = Fd_Frontend;
+  SendDiseqc = false;
   cardIndex = CardIndex;
   frontendType = FrontendType;
   tuneTimeout = 0;
@@ -145,6 +149,17 @@ bool cDvbTuner::Locked(int TimeoutMs)
   return tunerStatus >= tsLocked;
 }
 
+bool cDvbTuner::SendDiseqcCmd(dvb_diseqc_master_cmd cmd)
+{
+  cMutexLock MutexLock(&mutex);
+  if (!(frontendType & (DVBFE_DELSYS_DVBS | DVBFE_DELSYS_DVBS2)) || SendDiseqc)
+    return false;
+  diseqc_cmd=cmd;
+  SendDiseqc=true;
+  newSet.Broadcast();
+  return true;
+}
+
 bool cDvbTuner::GetFrontendStatus(fe_status_t &Status, int TimeoutMs)
 {
   if (TimeoutMs) {
@@ -348,6 +363,10 @@ void cDvbTuner::Action(void)
         if (GetFrontendStatus(NewStatus, 10))
            Status = NewStatus;
         cMutexLock MutexLock(&mutex);
+        if (SendDiseqc) {
+           CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_MASTER_CMD, &diseqc_cmd));
+           SendDiseqc=false;
+           }
         switch (tunerStatus) {
           case tsIdle:
                break;
@@ -918,6 +950,11 @@ bool cDvbDevice::HasLock(int TimeoutMs)
   return dvbTuner ? dvbTuner->Locked(TimeoutMs) : false;
 }
 
+bool cDvbDevice::SendDiseqcCmd(dvb_diseqc_master_cmd cmd)
+{
+  return dvbTuner->SendDiseqcCmd(cmd);
+}
+
 int cDvbDevice::GetAudioChannelDevice(void)
 {
   if (HasDecoder()) {
--- ../vdr-1.5.12-dvbs2-other/dvbdevice.h	2008-01-01 22:55:18.000000000 +0100
+++ dvbdevice.h	2008-01-10 22:09:12.000000000 +0100
@@ -66,11 +67,13 @@ public:
   virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
 public:
   virtual bool HasLock(int TimeoutMs = 0);
+  virtual bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd);
 
 // PID handle facilities
 
_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to