This abstract class defines the interface that every video source must implement. More...
#include <ivideosource.h>
Public Member Functions | |
| virtual | ~IVideoSource () |
| Destructor, doing nothing. More... | |
| virtual gg::ColourSpace | get_colour () |
| Get colour space in which this source is operating. More... | |
| virtual bool | get_frame_dimensions (int &width, int &height)=0 |
| Get frame dimensions. More... | |
| virtual bool | get_frame (gg::VideoFrame &frame)=0 |
Grab next available frame. More... | |
| virtual double | get_frame_rate ()=0 |
| Get frame rate of used source. More... | |
| virtual void | set_sub_frame (int x, int y, int width, int height)=0 |
| Set a ROI within each grabbed frame. More... | |
| virtual void | get_full_frame () |
| Reset sub-framing, i.e. return full frames instead of only ROI. More... | |
| void | set_number_of_frames_to_burn (unsigned int burn_num) |
| Set number of frames to discard after starting streaming (i.e. one-off, until streaming becomes stable). This is a device-specific setting. More... | |
| unsigned int | get_number_of_frames_to_burn () |
Public Member Functions inherited from gg::IObservable | |
| virtual | ~IObservable () |
| virtual void | attach (IObserver &observer) |
| Attach given observer to this observable. If observer already attached, no action is taken, no action is taken. More... | |
| virtual void | detach (IObserver &observer) |
| Detach given observer from this observable. More... | |
| virtual void | notify (VideoFrame &frame) noexcept |
| Notify all attached observers of new data. More... | |
Protected Member Functions | |
| IVideoSource () | |
Default constructor that resets sub-framing and also _num_burn_frames. More... | |
| IVideoSource (gg::ColourSpace colour) | |
| Constructor setting colour space. More... | |
| DISALLOW_COPY_AND_ASSIGNMENT (IVideoSource) | |
Protected Member Functions inherited from gg::IObservable | |
| bool | attached (const IObserver &observer) const noexcept |
| Check whether passed observer is already attached. Because this function is protected, no thread-safety operation is performed inside it. More... | |
Protected Attributes | |
| gg::ColourSpace | _colour |
| Indicates the colour space in which this source is operating. More... | |
| bool | _get_sub_frame |
If false, then grab full frames, otherwise a specific ROI within grabbed frames. More... | |
| unsigned int | _num_burn_frames |
| Number of frames to discard after starting streaming. More... | |
Protected Attributes inherited from gg::IObservable | |
| std::vector< IObserver *> | _observers |
| std::mutex | _observers_lock |
This abstract class defines the interface that every video source must implement.
This enables the underlying algorithms to be agnostic of the data sources.
|
inlinevirtual |
Destructor, doing nothing.
|
inlineprotected |
Default constructor that resets sub-framing and also _num_burn_frames.
|
inlineprotected |
Constructor setting colour space.
| colour |
|
protected |
|
inlinevirtual |
Get colour space in which this source is operating.
|
pure virtual |
Grab next available frame.
| frame | the caller is responsible for making sure the colour space of frame matches that of this object |
false if the colour space of frame mismatches that of this object OR if there is a problem with the acquisition, true otherwise
|
pure virtual |
Get frame dimensions.
| width | |
| height |
|
pure virtual |
Get frame rate of used source.
|
inlinevirtual |
Reset sub-framing, i.e. return full frames instead of only ROI.
|
inline |
|
inline |
Set number of frames to discard after starting streaming (i.e. one-off, until streaming becomes stable). This is a device-specific setting.
| burn_num |
|
pure virtual |
Set a ROI within each grabbed frame.
| x | upper left corner |
| y | upper left corner |
| width | from x onwards |
| height | from y onwards |
|
protected |
Indicates the colour space in which this source is operating.
|
protected |
If false, then grab full frames, otherwise a specific ROI within grabbed frames.
|
protected |
Number of frames to discard after starting streaming.