mirror of
https://github.com/opencv/opencv.git
synced 2025-06-27 23:11:57 +08:00

G-API-NG/Streaming: don't require explicit metadata in compileStreaming() * First probably working version Hardcode gose to setSource() :) * Pre final version of move metadata declaration from compileStreaming() to setSource(). * G-API-NG/Streaming: recovered the existing Streaming functionality - The auto-meta test is disabling since it crashes. - Restored .gitignore * G-API-NG/Streaming: Made the meta-less compileStreaming() work - Works fine even with OpenCV backend; - Fluid doesn't support such kind of compilation so far - to be fixed * G-API-NG/Streaming: Fix Fluid to support meta-less compilation - Introduced a notion of metadata-sensitive passes and slightly refactored GCompiler and GFluidBackend to support that - Fixed a TwoVideoSourcesFail test on streaming * Add three smoke streaming tests to gapi_streaming_tests. All three teste run pipeline with two different input sets 1) SmokeTest_Two_Const_Mats test run pipeline with two const Mats 2) SmokeTest_One_Video_One_Const_Scalar test run pipleline with Mat(video source) and const Scalar 3) SmokeTest_One_Video_One_Const_Vector test run pipeline with Mat(video source) and const Vector # Please enter the commit message for your changes. Lines starting * style fix * Some review stuff * Some review stuff
75 lines
2.5 KiB
C++
75 lines
2.5 KiB
C++
// 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) 2018 Intel Corporation
|
|
|
|
|
|
#ifndef GAPI_API_GBACKEND_PRIV_HPP
|
|
#define GAPI_API_GBACKEND_PRIV_HPP
|
|
|
|
#include <memory>
|
|
#include <unordered_set>
|
|
|
|
#include <ade/graph.hpp>
|
|
#include <ade/passes/pass_base.hpp> // passes::PassContext
|
|
#include <ade/execution_engine/execution_engine.hpp> // ..SetupContext
|
|
|
|
#include "opencv2/gapi/gcommon.hpp"
|
|
#include "opencv2/gapi/gkernel.hpp"
|
|
|
|
#include "compiler/gmodel.hpp"
|
|
|
|
|
|
namespace cv
|
|
{
|
|
namespace gimpl
|
|
{
|
|
class GBackend;
|
|
class GIslandExecutable;
|
|
} // namespace gimpl
|
|
} // namespace cv
|
|
|
|
// GAPI_EXPORTS is here to make tests build on Windows
|
|
class GAPI_EXPORTS cv::gapi::GBackend::Priv
|
|
{
|
|
public:
|
|
using EPtr = std::unique_ptr<cv::gimpl::GIslandExecutable>;
|
|
|
|
virtual void unpackKernel(ade::Graph &graph,
|
|
const ade::NodeHandle &op_node,
|
|
const GKernelImpl &impl);
|
|
|
|
// FIXME: since backends are not passed to ADE anymore,
|
|
// there's no need in having both cv::gimpl::GBackend
|
|
// and cv::gapi::GBackend - these two things can be unified
|
|
// NOTE - nodes are guaranteed to be topologically sorted.
|
|
|
|
// NB: This method is deprecated
|
|
virtual EPtr compile(const ade::Graph &graph,
|
|
const GCompileArgs &args,
|
|
const std::vector<ade::NodeHandle> &nodes) const;
|
|
|
|
|
|
virtual EPtr compile(const ade::Graph &graph,
|
|
const GCompileArgs &args,
|
|
const std::vector<ade::NodeHandle> &nodes,
|
|
const std::vector<cv::gimpl::Data>& ins_data,
|
|
const std::vector<cv::gimpl::Data>& outs_data) const;
|
|
|
|
// Ask backend to provide general backend-specific compiler passes
|
|
virtual void addBackendPasses(ade::ExecutionEngineSetupContext &);
|
|
|
|
// Ask backend to put extra meta-sensitive backend passes Since
|
|
// the inception of Streaming API one can compile graph without
|
|
// meta information, so if some passes depend on this information,
|
|
// they are called when meta information becomes available.
|
|
virtual void addMetaSensitiveBackendPasses(ade::ExecutionEngineSetupContext &);
|
|
|
|
virtual cv::gapi::GKernelPackage auxiliaryKernels() const;
|
|
|
|
virtual ~Priv() = default;
|
|
};
|
|
|
|
#endif // GAPI_API_GBACKEND_PRIV_HPP
|