Re: TTUSB DEC-2000T Driver: tuning problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mario Rossi wrote:

An application can simply try DMX_PES_OTHER first and if

-ENOTSUPPORTED is >returned,

as it would be the case here, it can fallback to DMX_PES_{AUDIO,VIDEO}.
Mythtv does it this way afaik.


it seems doable. I'll have a try modifying dvbstream (and mplayer
which is the same) and try to see what happens.

cheers


please, try this patch for dvbstream and report
Index: dvbstream.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbstream/dvbstream.c,v
retrieving revision 1.32
diff -u -r1.32 dvbstream.c
--- dvbstream.c	5 Oct 2006 20:25:16 -0000	1.32
+++ dvbstream.c	17 Oct 2006 21:57:54 -0000
@@ -141,9 +141,17 @@
   pesFilterParams.pes_type = pestype;
   pesFilterParams.flags   = DMX_IMMEDIATE_START;
 
-  if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0)  {
-    fprintf(stderr,"Failed setting filter for pid %i: ",pid);
-    perror("DMX SET PES FILTER");
+  if ((ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams)) < 0)  {
+    if(pesFilterParams.pes_type==DMX_PES_OTHER) {
+      pesFilterParams.pes_type = DMX_PES_VIDEO;
+      if ((ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams)) < 0)  {
+        pesFilterParams.pes_type = DMX_PES_AUDIO;
+        if((ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams)) < 0)  {
+          fprintf(stderr,"Failed setting filter for pid %i: ",pid);
+          perror("DMX SET PES FILTER");
+	}
+      }
+    }
   }
 }
 
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux