mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #20546 from sivanov-work:initial_vpl_source
G-API: oneVPL (simplification) source base commit * oneVPL source initial * Fix compilation * Fix compilation path * Fix NO VPL compile * Fix unused vars * Fix unused vars in example * Simplify oneVPL search: no custom path & download * Fix standalone GAPI * Apply comments
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
//
|
||||
// Copyright (C) 2021 Intel Corporation
|
||||
|
||||
#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>
|
||||
|
||||
namespace cv {
|
||||
namespace gapi {
|
||||
namespace wip {
|
||||
|
||||
class GAPI_EXPORTS OneVPLSource : public IStreamSource
|
||||
{
|
||||
public:
|
||||
struct Priv;
|
||||
|
||||
explicit OneVPLSource(const std::string& filePath);
|
||||
~OneVPLSource() override;
|
||||
|
||||
bool pull(cv::gapi::wip::Data& data) override;
|
||||
GMetaArg descr_of() const override;
|
||||
|
||||
private:
|
||||
explicit OneVPLSource(std::unique_ptr<Priv>&& impl);
|
||||
std::unique_ptr<Priv> m_priv;
|
||||
};
|
||||
|
||||
template<class... Args>
|
||||
GAPI_EXPORTS_W cv::Ptr<IStreamSource> inline make_vpl_src(const std::string& filePath, Args&&... args)
|
||||
{
|
||||
return make_src<OneVPLSource>(filePath, std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
} // namespace wip
|
||||
} // namespace gapi
|
||||
} // namespace cv
|
||||
|
||||
#endif // OPENCV_GAPI_STREAMING_ONEVPL_ONEVPL_SOURCE_HPP
|
||||
Reference in New Issue
Block a user