[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd cvd/Linux/v4lbuffer.h cvd_src/Linux/v4lb...
From: |
Edward Rosten |
Subject: |
[libcvd-members] libcvd cvd/Linux/v4lbuffer.h cvd_src/Linux/v4lb... |
Date: |
Fri, 11 Feb 2011 15:26:55 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Edward Rosten <edrosten> 11/02/11 15:26:55
Modified files:
cvd/Linux : v4lbuffer.h
cvd_src/Linux : v4lbuffer.cc
Log message:
Check to see if no format can be found and give a more sensible error
message.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/Linux/v4lbuffer.h?cvsroot=libcvd&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/Linux/v4lbuffer.cc?cvsroot=libcvd&r1=1.15&r2=1.16
Patches:
Index: cvd/Linux/v4lbuffer.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/Linux/v4lbuffer.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- cvd/Linux/v4lbuffer.h 2 Nov 2009 16:50:25 -0000 1.16
+++ cvd/Linux/v4lbuffer.h 11 Feb 2011 15:26:54 -0000 1.17
@@ -57,6 +57,12 @@
/// @ingroup gException
struct DeviceOpen: public All {DeviceOpen(std::string dev);
///< Construct from the device name
};
+
+ /// Device was OK, but could not provide the requested
colourspace
+ /// @ingroup gException
+ struct NoColourspace: public All{ NoColourspace(std::string
dev, std::string space); ///< Construct from the device name and requested
colourspace
+ };
+
/// Error setting up the device
/// @ingroup gException
struct DeviceSetup: public All {DeviceSetup(std::string dev,
std::string action); ///< Construct from the device string and an error string
Index: cvd_src/Linux/v4lbuffer.cc
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/Linux/v4lbuffer.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- cvd_src/Linux/v4lbuffer.cc 2 Nov 2009 16:50:26 -0000 1.15
+++ cvd_src/Linux/v4lbuffer.cc 11 Feb 2011 15:26:54 -0000 1.16
@@ -53,6 +53,11 @@
what = "V4LBuffer: GetFrame on " + device + " failed: " + msg;
}
+Exceptions::V4LBuffer::NoColourspace::NoColourspace(std::string dev,
std::string space)
+{
+ what = "V4LBuffer: No colourspace on " + dev + " matching " + space;
+}
+
class VPrint_
{
@@ -246,8 +251,13 @@
if(errno != EINVAL)
throw Exceptions::V4LBuffer::DeviceSetup(dev, "V4L2:
VIDIOC_ENUM_FMT");
+ log << "Selected format: " << unfourcc(actual_fmt) << "\n";
+
+ if(actual_fmt == fourcc("None"))
+ throw Exceptions::V4LBuffer::NoColourspace(dev,
unfourcc(actual_fmt));
+
fmt = actual_fmt;
- log << "Selected format: " << unfourcc(fmt) << "\n";
+
if (strcmp((const char*)caps.driver,"bttv") == 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] libcvd cvd/Linux/v4lbuffer.h cvd_src/Linux/v4lb...,
Edward Rosten <=