31 class CaptureCallback ;
43 G_EXCEPTION( NoDevice ,
"no such device" ) ;
44 G_EXCEPTION( Error ,
"video capture error" ) ;
49 virtual void start() = 0 ;
52 virtual void stop() = 0 ;
55 virtual bool simple()
const = 0 ;
62 virtual bool read(
unsigned char * ,
size_t n ) = 0 ;
71 virtual int fd()
const = 0 ;
79 virtual unsigned int dx()
const = 0 ;
82 virtual unsigned int dy()
const = 0 ;
85 virtual bool active()
const = 0 ;
89 virtual std::string
info()
const = 0 ;
93 void operator=(
const Capture & ) ;
virtual ~Capture()=0
Destructor.
virtual unsigned int dx() const =0
Returns the width.
virtual bool simple() const =0
Returns true if a complete RGB24 image can be read out of the capture device and straight into a cont...
virtual int fd() const =0
Returns the fd for select().
virtual unsigned int dy() const =0
Returns the height.
virtual bool active() const =0
Returns true after construction or start(), and false after stop().
A video-capture buffer class to hold image data, with overloaded constructors for the various V4l i/o...
virtual void operator()(const Gv::CaptureBuffer &)=0
Called to pass back an image buffer.
virtual void stop()=0
Stops capturing.
virtual std::string info() const =0
Returns information for debugging and logging purposes.
A callback interface for the Gv::Capture class.
virtual bool read(unsigned char *, size_t n)=0
Does a read of an RGB24 image into the user-supplied buffer, on condition that the device is simple()...
A video capture abstract interface, exposing a file descriptor and a method to handle read events on ...
virtual void start()=0
Restarts capturing after a stop(). Not normally needed.