The Capture device for HTTP images. More...
#include <httpcapture.h>
Public Member Functions | |
DISALLOW_COPY_AND_ASSIGN (HTTPCapture) | |
Copy and assign of the class is not allowed. | |
double | getBarrelCorrection () override |
Retrieves the barrel correction applied to the source. More... | |
FrameCapture | getBuffered () override |
Retrieves the currently buffered frame. More... | |
std::string | getDescription () const override |
Retrieves the description of the device. More... | |
int | getDeviceID () const override |
Returns the ID number the device was initialized with. More... | |
double | getFramerate () const override |
Retrieves the capture device framerate. More... | |
int | getMissedFrames () const override |
Retrieves the logged frame misses. More... | |
FrameCapture | getNext (bool skip, bool *error) override |
Retrieves the next frame. More... | |
std::string | getPath () const override |
Retrieves the path given during the initialization. More... | |
cv::Size | getResolution () const override |
Retrieves the capture device resolution. More... | |
int | getRetrievedFrames () const override |
Retrieves the total logged frames. More... | |
INTERFACE_TYPE | getType () const override |
Retrieves the type of the device. More... | |
bool | hasNew () override |
Checks whether the device has a new image to retrieve or not. More... | |
bool | isOpen () const override |
Checks whether the capturing device is open or not. More... | |
bool | open (const std::string &path) override |
Opens the video file or the stream. More... | |
void | resetStats () override |
Resets the statistical counters. More... | |
void | setBarrelCorrection (double amount) override |
Sets the amount of the barrel correction to be applied. More... | |
bool | setResolution (const cv::Size &new_size) override |
Sets the capturing device resolution. More... | |
Public Member Functions inherited from cavapa_gui::CaptureInterface | |
DISALLOW_COPY_AND_ASSIGN (CaptureInterface) | |
Copy and assign of the class is not allowed. | |
Additional Inherited Members | |
Public Types inherited from cavapa_gui::CaptureInterface | |
enum | INTERFACE_TYPE { HTTP, OPENCV } |
Used to define the type of source interface. | |
The Capture device for HTTP images.
The class can be used as the interface device for capturing the HTTP images from websites (like webcam). It uses CURL library for it's image retrieval.
|
inlineoverridevirtual |
Retrieves the barrel correction applied to the source.
Implements cavapa_gui::CaptureInterface.
|
overridevirtual |
Retrieves the currently buffered frame.
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Retrieves the description of the device.
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Returns the ID number the device was initialized with.
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Retrieves the capture device framerate.
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Retrieves the logged frame misses.
A frame miss occurs everytime when getNext() is called and the previous retrieval was still ongoing.
Implements cavapa_gui::CaptureInterface.
|
overridevirtual |
Retrieves the next frame.
Basically it returns the currently buffered frame and signals the device to grab a new image for next call to the function. If the device has not returned from previous image grab the call is recorded as a missed frame.
skip | Specifies if the frame can be skipped. When set to true, this will force the main thread to wait for a new image from the device. This can result in a huge lag if the device is not capable of retrieving images fast enough. |
error | Will receive an error message if something went wrong. |
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Retrieves the path given during the initialization.
Implements cavapa_gui::CaptureInterface.
|
overridevirtual |
Retrieves the capture device resolution.
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Retrieves the total logged frames.
Basically, this is a counter on how many times getNext() has been called.
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Retrieves the type of the device.
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Checks whether the device has a new image to retrieve or not.
This checks if the FrameTime on the buffered image differs from what was retrieved on the last getNext().
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Checks whether the capturing device is open or not.
Implements cavapa_gui::CaptureInterface.
|
overridevirtual |
Opens the video file or the stream.
path | The path of the video file or the network stream. |
Implements cavapa_gui::CaptureInterface.
|
overridevirtual |
Resets the statistical counters.
This affects the missed and total frame counters.
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Sets the amount of the barrel correction to be applied.
amount | The barrel effect. 0.0 means none. |
Implements cavapa_gui::CaptureInterface.
|
inlineoverridevirtual |
Sets the capturing device resolution.
new_size | The size to be set. |
Implements cavapa_gui::CaptureInterface.