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
◆ mfx_codec_id_type
◆ Ptr
◆ ~IDataProvider()
virtual cv::gapi::wip::onevpl::IDataProvider::~IDataProvider |
( |
| ) |
|
|
virtualdefault |
◆ 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_bitstream_data()
virtual bool cv::gapi::wip::onevpl::IDataProvider::fetch_bitstream_data |
( |
std::shared_ptr< mfx_bitstream > & | in_out_bitsream | ) |
|
|
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 MFX_ERR_MORE_DATA in EOF which considered as not-fail case.
- Parameters
-
in_out_bitsream | the input-output reference on MFX bitstream buffer which MUST be empty at the first request to allow implementation to allocate it by itself and to return back. Subsequent invocation of fetch_bitstream_data MUST use the previously used in_out_bitsream to avoid skipping rest of frames which haven't been consumed |
- Returns
- true for fetched data, false on EOF and throws exception on error
◆ get_mfx_codec_id()
virtual mfx_codec_id_type cv::gapi::wip::onevpl::IDataProvider::get_mfx_codec_id |
( |
| ) |
const |
|
pure virtual |
The documentation for this struct was generated from the following file: