Home | History | Annotate | Download | only in patches
      1 --- pwlib/plugins/vidinput_v4l2/vidinput_names.cxx.ori	2007-02-14 17:32:48.517613000 +0800
      2 +++ pwlib/plugins/vidinput_v4l2/vidinput_names.cxx	2007-02-14 17:35:27.289899000 +0800
      3 @@ -51,6 +51,19 @@
      4    if (!devdir.Open())
      5      return;
      6  
      7 +#ifdef SOLARIS
      8 +  int devnum = 0;
      9 +  do {
     10 +    PString filename = devdir.GetEntryName();
     11 +    if (!filename.NumCompare("video", 5 , 0)) {
     12 +      PString devname = devdir + filename;
     13 +      struct stat s;
     14 +      if (lstat(devname, &s) == 0) {
     15 +        vid.SetAt(devnum++, devname);
     16 +      }
     17 +    }
     18 +  } while (devdir.Next());
     19 +#else  
     20    do {
     21      PString filename = devdir.GetEntryName();
     22      PString devname = devdir + filename;
     23 @@ -76,6 +89,7 @@
     24        }
     25      }
     26    } while (devdir.Next());
     27 +#endif  
     28  }
     29  
     30  void V4LXNames::PopulateDictionary()
     31 --- pwlib/plugins/vidinput_v4l2/vidinput_v4l2.cxx.ori	2007-02-14 17:33:09.683507000 +0800
     32 +++ pwlib/plugins/vidinput_v4l2/vidinput_v4l2.cxx	2007-02-14 17:33:36.649737000 +0800
     33 @@ -1122,11 +1122,7 @@
     34    }
     35    if (inputDeviceNames.GetSize() == 0) {
     36      POrdinalToString vid;
     37 -#ifdef SOLARIS
     38 -    vid.SetAt(0,"/dev/video");
     39 -#else
     40      ReadDeviceDirectory("/dev/", vid);
     41 -#endif
     42  
     43      for (PINDEX i = 0; i < vid.GetSize(); i++) {
     44        PINDEX cardnum = vid.GetKeyAt(i);
     45 --- pwlib/plugins/vidinput_v4l2/vidinput_v4l2.h.ori	2007-02-14 17:39:38.651980000 +0800
     46 +++ pwlib/plugins/vidinput_v4l2/vidinput_v4l2.h	2007-01-25 10:26:27.910294000 +0800
     47 @@ -74,7 +74,7 @@
     48  #include <ptlib/vconvert.h>
     49  
     50  #ifdef SOLARIS
     51 -#include <videodev2.h>
     52 +#include <sys/videodev2.h>
     53  #else
     54  #include <linux/videodev.h>
     55  #endif
     56 --- pwlib/plugins/configure.in.ori	2007-02-14 17:43:08.093963000 +0800
     57 +++ pwlib/plugins/configure.in	2007-02-14 18:08:25.537939000 +0800
     58 @@ -129,7 +129,7 @@
     59  
     60  if test "${enable_v4l2}z" = "yesz" ; then
     61    if test "${OSTYPE}z" = "solaris2.11z"; then
     62 -    VIDEODEV="videodev2.h"
     63 +    VIDEODEV="sys/videodev2.h"
     64    else
     65      VIDEODEV="linux/videodev2.h"
     66    fi
     67 @@ -138,6 +138,11 @@
     68  #ifdef __linux__
     69  #include <linux/types.h>
     70  #include <linux/time.h>
     71 +#else
     72 +#ifdef __sun
     73 +#include <sys/types.h>
     74 +#include <sys/time.h>
     75 +#endif
     76  #endif
     77  ])
     78    AC_MSG_CHECKING(for V4L2 video support)
     79