Re: [Ekiga-list] Ekiga && V4L && FreeBSD



On Wed, Mar 19, 2008 at 05:23:12PM +0100, Damien Sandras wrote:
> And contribute it back to us, otherwise we can not commit it...

The following is already in the freebsd port and has been verified
to work. Are you interested in other patches that we have in the
port? If so please see: 

http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/pwlib/files/

--- plugins/vidinput_v4l/vidinput_v4l.cxx.orig	Wed Jan  3 23:37:37 2007
+++ plugins/vidinput_v4l/vidinput_v4l.cxx	Wed Feb  7 01:30:50 2007
@@ -484,6 +484,15 @@
         struct stat s;
         if (lstat(devname, &s) == 0) {
  
+#if defined(P_FREEBSD)
+	  // device numbers are irrelevant here, so we match on names instead.
+          if (filename.GetLength() <= 5 || filename.Left(5) != "video")
+		continue;
+	  int num = atoi(filename.Mid(6));
+	  if (num < 0 || num > 63)
+		continue;
+          vid.SetAt(num, devname);
+#else
           static const int deviceNumbers[] = { 81 };
           for (PINDEX i = 0; i < PARRAYSIZE(deviceNumbers); i++) {
             if (MAJOR(s.st_rdev) == deviceNumbers[i]) {
@@ -493,6 +502,7 @@
               }
             }
           }
+#endif
         }
       }
     }

This is against pwlib 1.12.0

-Steve


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