[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd cvd/videobuffer.h cvd_src/exceptions.cc
From: |
Edward Rosten |
Subject: |
[libcvd-members] libcvd cvd/videobuffer.h cvd_src/exceptions.cc |
Date: |
Mon, 01 Dec 2008 14:01:15 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Edward Rosten <edrosten> 08/12/01 14:01:15
Modified files:
cvd : videobuffer.h
cvd_src : exceptions.cc
Log message:
Added a new runtime exception, where a video buffer is unable to grab
video in the selected colourspace.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/videobuffer.h?cvsroot=libcvd&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/exceptions.cc?cvsroot=libcvd&r1=1.4&r2=1.5
Patches:
Index: cvd/videobuffer.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/videobuffer.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- cvd/videobuffer.h 28 Nov 2008 16:56:04 -0000 1.12
+++ cvd/videobuffer.h 1 Dec 2008 14:01:13 -0000 1.13
@@ -114,6 +114,17 @@
return m_type;
}
+ /// Flush all old frames out of the video buffer,
+ /// on a flushable buffer, causing the next get_frame()
+ /// to sleep until a frame arrives. On a non-flushable
+ /// buffer, this does nothing.
+ virtual void flush()
+ {
+ if(type() == Flushable)
+ while(frame_pending())
+ put_frame(get_frame());
+ }
+
/// What is the (expected) frame rate of this video buffer, in
frames per second?
virtual double frame_rate()=0;
/// Go to a particular point in the video buffer (only
implemented in buffers of recorded video)
@@ -149,6 +160,16 @@
{
BadPutFrame();
};
+
+ /// The videobuffer was unable to successfully initialize
grabbing in the
+ /// specified colourspace.
+ /// @ingroup gException
+ struct BadColourSpace: public All
+ {
+ /// @param colourspace Specify the failed colourspace.
+ /// @param b Specify the failed buffer.
+ BadColourSpace(const std::string& colourspace, const
std::string& b);
+ };
}
}
Index: cvd_src/exceptions.cc
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/exceptions.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- cvd_src/exceptions.cc 9 May 2005 11:54:59 -0000 1.4
+++ cvd_src/exceptions.cc 1 Dec 2008 14:01:14 -0000 1.5
@@ -30,3 +30,8 @@
{
what="Attempted to put_frame() on the wrong kind of frame.";
}
+
+CVD::Exceptions::VideoBuffer::BadColourSpace::BadColourSpace(const
std::string& c, const std::string& buffer)
+{
+ what=buffer + " can not grab video in the " + c + "colourspace on the
specified device.";
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] libcvd cvd/videobuffer.h cvd_src/exceptions.cc,
Edward Rosten <=