libcvd
localvideobuffer.h
1 #ifndef CVD_VIDEOBUFFER_LOCAL_H
2 #define CVD_VIDEOBUFFER_LOCAL_H
3 
4 #include <cvd/exceptions.h>
5 #include <cvd/localvideoframe.h>
6 #include <cvd/videobuffer.h>
7 
8 namespace CVD
9 {
10 
16 template <class T>
18 {
19  public:
21  : VideoBuffer<T>(t)
22  {
23  }
24 
25  virtual ~LocalVideoBuffer() { }
26 
27  virtual ImageRef size() = 0;
28  virtual LocalVideoFrame<T>* get_frame() = 0; // blocks until frame ready
29  virtual void put_frame(VideoFrame<T>* f) = 0; // user is finished using f
30  virtual bool frame_pending() = 0; // checks to see if frame ready
31  virtual void seek_to(double) // in seconds
32  {
33  }
34 };
35 
36 }
37 
38 #endif
All classes and functions are within the CVD namespace.
Definition: argb.h:6
Base class for objects which provide a typed video stream.
Definition: videobuffer.h:88
virtual bool frame_pending()=0
Is there a frame waiting in the buffer? This function does not block.
virtual void put_frame(VideoFrame< T > *f)=0
Tell the buffer that you are finished with this frame.
virtual void seek_to(double)
Go to a particular point in the video buffer (only implemented in buffers of recorded video) ...
Definition: localvideobuffer.h:31
Type
Definition: videobuffer.h:14
Base class for a VideoBuffer which manages its own memory for each VideoFrame that it provides...
Definition: localvideobuffer.h:17
Definition: image_ref.h:29
A frame from a VideoBuffer.
Definition: videoframe.h:35
A frame from a LocalVideoBuffer, which manages its own data rather than wrapping data owned by the sy...
Definition: localvideoframe.h:30
virtual ImageRef size()=0
The size of the VideoFrames returned by this buffer.
virtual LocalVideoFrame< T > * get_frame()=0
Returns the next frame from the buffer. This function blocks until a frame is ready.