Public interface allows to customize extraction of video stream data used by onevpl::GSource instead of reading stream from file (by default).
More...
#include <opencv2/gapi/streaming/onevpl/data_provider_interface.hpp>
Public interface allows to customize extraction of video stream data used by onevpl::GSource instead of reading stream from file (by default).
Interface implementation constructor MUST provide consistency and creates fully operable object. If error happened implementation MUST throw DataProviderException
kind exceptions
- Note
- Interface implementation MUST manage stream and other constructed resources by itself to avoid any kind of leak. For simple interface implementation example please see
StreamDataProvider
in tests/streaming/gapi_streaming_tests.cpp
◆ Ptr
◆ ~IDataProvider()
virtual cv::gapi::wip::onevpl::IDataProvider::~IDataProvider |
( |
| ) |
|
|
inlinevirtual |
◆ empty()
virtual bool cv::gapi::wip::onevpl::IDataProvider::empty |
( |
| ) |
const |
|
pure virtual |
The function is used by onevpl::GSource to check more binary data availability.
It MUST return TRUE in case of EOF and NO_THROW exceptions.
- Returns
- boolean value which detects end of stream
◆ fetch_data()
virtual size_t cv::gapi::wip::onevpl::IDataProvider::fetch_data |
( |
size_t |
out_data_bytes_size, |
|
|
void * |
out_data |
|
) |
| |
|
pure virtual |
The function is used by onevpl::GSource to extract binary data stream from IDataProvider implementation.
It MUST throw DataProviderException
kind exceptions in fail cases. It MUST return 0 in EOF which considered as not-fail case.
- Parameters
-
out_data_bytes_size | the available capacity of out_data buffer. |
out_data | the output consumer buffer with capacity out_data_bytes_size. |
- Returns
- fetched bytes count.
The documentation for this struct was generated from the following file: