Debian Codegraph @

cvd/localvideobuffer.h

raw symbols SCIP
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
11 /// Base class for a VideoBuffer which manages its own memory for each VideoFrame that
12 /// it provides. (In contrast to most buffers, where the memory is managed
13 /// by the video hardware.)
14 /// @param T The pixel type of the video frames
15 /// @ingroup gVideoBuffer
16 template <class T>
17 class LocalVideoBuffer : public CVD::VideoBuffer<T>
18 {
19 public:
20 LocalVideoBuffer(typename VideoBufferType::Type t)
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