[GnomeMeeting-devel-list] V4L device detection



Hi,

this is a hack to make it possible for the V4L plugin to detect the
devices each time refresh is clicked.

It fixes the following problem:
* start gm with your webcam;
* your webcam is in the list;
* disconnect your webcam (or remove its driver from the kernel);
* refresh
* the webcam is still here!

I call it a hack because it makes the detection do things it wasn't
designed to do. I think that would need a clean rewrite.

Snark
diff -ur pwlib-cvs-20040210.CVS/plugins/vidinput_v4l/vidinput_v4l.cxx pwlib-cvs-20040210.CVS.patched/plugins/vidinput_v4l/vidinput_v4l.cxx
--- pwlib-cvs-20040210.CVS/plugins/vidinput_v4l/vidinput_v4l.cxx	2004-02-06 23:24:08.000000000 +0100
+++ pwlib-cvs-20040210.CVS.patched/plugins/vidinput_v4l/vidinput_v4l.cxx	2004-02-12 08:51:22.000000000 +0100
@@ -338,6 +338,7 @@
   PString      entry;
   PStringList  devlist;
   
+  inputDeviceNames.RemoveAll (); // flush the previous run
   if (procvideo.Exists()) {
     if (procvideo.Open(PFileInfo::RegularFile)) {
       do {
@@ -500,8 +501,8 @@
 {
   PWaitAndSignal m(mutex);
   PStringList result;
-  for (PINDEX i = 0; i < userKey.GetSize(); i++)
-    result += userKey.GetKeyAt(i);
+  for (PINDEX i = 0; i < inputDeviceNames.GetSize(); i++)
+    result += GetUserFriendly (inputDeviceNames[i]);
  
   return result;
 }


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