[vls-devel] Patch to ignore missing DVB programmes

Andrew de Quincey adq_dvb at lidskialf.net
Mon Mar 17 19:42:46 CET 2003


Hi, currently, if vls finds a DVB program is missing, it hangs after attempting to start it. 

However, I need it to continue running even if a DVB program is missing. This patch adds a new 
parameter "IgnoreMissing" to the dvb device configuration section which causes it to just warn about 
missing programs instead.

It also fixes a compilation error in the DVB stuff (an unimplemented abstract method).


--- CUT HERE---
Index: src/modules/dvbinput/dvbinput.cpp
===================================================================
RCS file: /var/cvs/videolan/vls/src/modules/dvbinput/dvbinput.cpp,v
retrieving revision 1.23
diff -u -r1.23 dvbinput.cpp
--- src/modules/dvbinput/dvbinput.cpp	18 Feb 2003 12:40:40 -0000	1.23
+++ src/modules/dvbinput/dvbinput.cpp	17 Mar 2003 18:37:18 -0000
@@ -149,6 +149,7 @@
   iNumber = pApp->GetSetting(GetName() + ".DeviceNumber", "0").ToInt();
   m_iSendMethod = pApp->GetSetting(GetName() + ".SendMethod", "0").ToInt();
   m_bIgnoreTimeout = pApp->GetSetting(GetName()+".IgnoreTimeout", "0").ToInt();
+  m_bIgnoreMissing = pApp->GetSetting(GetName()+".IgnoreMissing", "0").ToInt();
   dvbrc = pApp->GetSetting(GetName()+ ".Dvbrc", "");
   if(dvbrc.Length() != 0)
   {
@@ -567,9 +568,18 @@
   }
   else
   {
-    throw E_Exception(GEN_ERR, "Program \"" +
-                      pBroadcast->GetProgram()->GetName() +
-                      "\" doesn't exist");
+    if (!m_bIgnoreMissing) 
+    {
+      throw E_Exception(GEN_ERR, "Program \"" +
+			pBroadcast->GetProgram()->GetName() +
+			"\" doesn't exist");
+    }
+    else
+    {
+      Log(m_hLog, LOG_WARN, C_String("Ignoring missing program \"") +
+	  pBroadcast->GetProgram()->GetName() +
+	  C_String("\""));
+    }
   }
 
   m_cLock.UnLock();
Index: src/modules/dvbinput/dvbinput.h
===================================================================
RCS file: /var/cvs/videolan/vls/src/modules/dvbinput/dvbinput.h,v
retrieving revision 1.13
diff -u -r1.13 dvbinput.h
--- src/modules/dvbinput/dvbinput.h	3 Feb 2003 11:47:32 -0000	1.13
+++ src/modules/dvbinput/dvbinput.h	17 Mar 2003 18:37:18 -0000
@@ -74,6 +74,7 @@
 
   bool m_bHasDecoder;
   bool m_bIgnoreTimeout;
+  bool m_bIgnoreMissing;
 
   C_Vector<C_String>  m_vProgramNames;
   int m_iFrequency;
Index: src/modules/dvbreader/dvbreader.h
===================================================================
RCS file: /var/cvs/videolan/vls/src/modules/dvbreader/dvbreader.h,v
retrieving revision 1.4
diff -u -r1.4 dvbreader.h
--- src/modules/dvbreader/dvbreader.h	22 Feb 2003 02:38:56 -0000	1.4
+++ src/modules/dvbreader/dvbreader.h	17 Mar 2003 18:37:18 -0000
@@ -48,7 +48,8 @@
   virtual int Seek(s64 iOffset, int bStartPos);
   virtual int GetFrame(byte ** pBuff ,int iSize) { return 0;};
   virtual int GetAudioFrame(byte ** pBuff ,int iSize) { return 0;};
-  
+  virtual int GetAudioFD() { return 0;};
+   
   virtual s64 Size();
   virtual s64 GetPos();
--- CUT HERE---


-- 
adq
-- 
This is the vls-devel mailing-list, see http://www.videolan.org/streaming/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vls-devel mailing list