|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef OPENCV_GAPI_STREAMING_ONEVPL_ONEVPL_SOURCE_HPP
|
|
|
#define OPENCV_GAPI_STREAMING_ONEVPL_ONEVPL_SOURCE_HPP
|
|
|
|
|
|
#include <opencv2/gapi/garg.hpp>
|
|
|
#include <opencv2/gapi/streaming/meta.hpp>
|
|
|
#include <opencv2/gapi/streaming/source.hpp>
|
|
|
#include <opencv2/gapi/streaming/onevpl/cfg_params.hpp>
|
|
|
#include <opencv2/gapi/streaming/onevpl/data_provider_interface.hpp>
|
|
|
#include <opencv2/gapi/streaming/onevpl/device_selector_interface.hpp>
|
|
|
|
|
|
namespace cv {
|
|
|
namespace gapi {
|
|
|
namespace wip {
|
|
|
namespace onevpl {
|
|
|
using CfgParams = std::vector<CfgParam>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GAPI_EXPORTS GSource : public IStreamSource
|
|
|
{
|
|
|
public:
|
|
|
struct Priv;
|
|
|
|
|
|
GSource(const std::string& filePath,
|
|
|
const CfgParams& cfg_params = CfgParams{});
|
|
|
|
|
|
GSource(const std::string& filePath,
|
|
|
const CfgParams& cfg_params,
|
|
|
const std::string& device_id,
|
|
|
void* accel_device_ptr,
|
|
|
void* accel_ctx_ptr);
|
|
|
|
|
|
GSource(const std::string& filePath,
|
|
|
const CfgParams& cfg_params,
|
|
|
const Device &device, const Context &ctx);
|
|
|
|
|
|
GSource(const std::string& filePath,
|
|
|
const CfgParams& cfg_params,
|
|
|
std::shared_ptr<IDeviceSelector> selector);
|
|
|
|
|
|
|
|
|
GSource(std::shared_ptr<IDataProvider> source,
|
|
|
const CfgParams& cfg_params = CfgParams{});
|
|
|
|
|
|
GSource(std::shared_ptr<IDataProvider> source,
|
|
|
const CfgParams& cfg_params,
|
|
|
const std::string& device_id,
|
|
|
void* accel_device_ptr,
|
|
|
void* accel_ctx_ptr);
|
|
|
|
|
|
GSource(std::shared_ptr<IDataProvider> source,
|
|
|
const CfgParams& cfg_params,
|
|
|
std::shared_ptr<IDeviceSelector> selector);
|
|
|
|
|
|
~GSource() override;
|
|
|
|
|
|
bool pull(cv::gapi::wip::Data& data) override;
|
|
|
GMetaArg descr_of() const override;
|
|
|
|
|
|
private:
|
|
|
explicit GSource(std::unique_ptr<Priv>&& impl);
|
|
|
std::unique_ptr<Priv> m_priv;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
using GVPLSource = onevpl::GSource;
|
|
|
|
|
|
template<class... Args>
|
|
|
GAPI_EXPORTS_W cv::Ptr<IStreamSource> inline make_onevpl_src(Args&&... args)
|
|
|
{
|
|
|
return make_src<onevpl::GSource>(std::forward<Args>(args)...);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|