[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd configure configure.in cvd/Linux/v4l1buf...
From: |
Edward Rosten |
Subject: |
[libcvd-members] libcvd configure configure.in cvd/Linux/v4l1buf... |
Date: |
Thu, 24 Apr 2008 23:52:38 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Edward Rosten <edrosten> 08/04/24 23:52:38
Modified files:
. : configure configure.in
cvd/Linux : v4l1buffer.h
cvd_src/Linux : v4l1buffer.cc
Log message:
Added size option to V4L1Buffer.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/configure?cvsroot=libcvd&r1=1.113&r2=1.114
http://cvs.savannah.gnu.org/viewcvs/libcvd/configure.in?cvsroot=libcvd&r1=1.114&r2=1.115
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/Linux/v4l1buffer.h?cvsroot=libcvd&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/Linux/v4l1buffer.cc?cvsroot=libcvd&r1=1.7&r2=1.8
Patches:
Index: configure
===================================================================
RCS file: /cvsroot/libcvd/libcvd/configure,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -b -r1.113 -r1.114
--- configure 24 Apr 2008 23:30:37 -0000 1.113
+++ configure 24 Apr 2008 23:52:38 -0000 1.114
@@ -5901,7 +5901,7 @@
case "$host" in
*linux*)
- os_all_options="dvbuffer v4l2buffer v4l1buffer"
+ os_all_options="dvbuffer v4l2buffer v4l1buffer v4lbuffer"
if test "$with_dvbuffer" != no && test "$have_dvbuffer" != yes
@@ -6877,7 +6877,7 @@
if test $kernel_major.$kernel_minor != 2.4
then
export have_linux_2_4=yes
- elif test $kernel_major.$kernel_minor =! 2.6
+ elif test $kernel_major.$kernel_minor != 2.6
then
export have_linux_2_6=yes
fi
Index: configure.in
===================================================================
RCS file: /cvsroot/libcvd/libcvd/configure.in,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -b -r1.114 -r1.115
--- configure.in 24 Apr 2008 23:30:38 -0000 1.114
+++ configure.in 24 Apr 2008 23:52:38 -0000 1.115
@@ -483,7 +483,7 @@
if test $kernel_major.$kernel_minor != 2.4
then
export have_linux_2_4=yes
- elif test $kernel_major.$kernel_minor =! 2.6
+ elif test $kernel_major.$kernel_minor != 2.6
then
export have_linux_2_6=yes
fi
Index: cvd/Linux/v4l1buffer.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/Linux/v4l1buffer.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- cvd/Linux/v4l1buffer.h 24 Apr 2008 23:30:38 -0000 1.12
+++ cvd/Linux/v4l1buffer.h 24 Apr 2008 23:52:38 -0000 1.13
@@ -107,7 +107,7 @@
* @param dev file name of the device to open
* @param mode color palette to use (see linux/video.h for possible
modes)
*/
- RawV4L1(const std::string & dev, unsigned int mode);
+ RawV4L1(const std::string & dev, unsigned int mode, const ImageRef&);
virtual ~RawV4L1();
/** Get the width in pixels of the captured frames. */
const ImageRef& get_size() const;
@@ -189,7 +189,12 @@
public:
/// Construct a video buffer
/// @param dev file name of the device to use
- V4L1Buffer(const std::string & dev) : RawV4L1( dev,
V4L1::cam_type<T>::mode ) {}
+ V4L1Buffer(const std::string & dev) : RawV4L1( dev,
V4L1::cam_type<T>::mode, ImageRef(0,0)) {}
+
+ /// Construct a video buffer
+ /// @param dev file name of the device to use
+ /// @param size Size of the video stream to grab
+ V4L1Buffer(const std::string & dev, ImageRef size) : RawV4L1( dev,
V4L1::cam_type<T>::mode,size ) {}
virtual ImageRef size()
{
Index: cvd_src/Linux/v4l1buffer.cc
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/Linux/v4l1buffer.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- cvd_src/Linux/v4l1buffer.cc 23 Feb 2006 13:19:39 -0000 1.7
+++ cvd_src/Linux/v4l1buffer.cc 24 Apr 2008 23:52:38 -0000 1.8
@@ -69,7 +69,7 @@
}
}
-RawV4L1::RawV4L1(const std::string & dev, unsigned int mode)
+RawV4L1::RawV4L1(const std::string & dev, unsigned int mode, const ImageRef&
size)
: deviceName( dev ), myDevice(-1), mySize(640,480), myPalette(mode),
myBrightness(0.5), myWhiteness(0.5), myContrast(0.5), myHue(0.5),
mySaturation(0.5),
myBpp(16)
@@ -80,6 +80,21 @@
struct video_capability caps;
if (ioctl(myDevice, VIDIOCGCAP, & caps) != 0)
throw Exceptions::V4L1Buffer::DeviceSetup(deviceName, "get
capabilities");
+
+
+
+ if(size.x != 0)
+ {
+ struct video_window window;
+ if (ioctl (myDevice, VIDIOCGWIN, &window) != 0)
+ throw Exceptions::V4L1Buffer::DeviceSetup(deviceName,
"get window");
+
+ window.width = size.x;
+ window.height = size.y;
+ if (ioctl (myDevice, VIDIOCSWIN, &window) != 0)
+ throw Exceptions::V4L1Buffer::DeviceSetup(deviceName,
"set window");
+ }
+
struct video_mbuf mbuf;
if (ioctl(myDevice, VIDIOCGMBUF, &mbuf) != 0)
throw Exceptions::V4L1Buffer::DeviceSetup(deviceName, "get memory
buffer info");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] libcvd configure configure.in cvd/Linux/v4l1buf...,
Edward Rosten <=