// Copyright (c) 2012-2017 VideoStitch SAS // Copyright (c) 2018 stitchEm #include "./noFlow.hpp" #include "parse/json.hpp" #include "libvideostitch/parse.hpp" namespace VideoStitch { namespace Core { NoFlow::Factory::Factory() {} Potential NoFlow::Factory::parse(const Ptv::Value&) { return Potential(new NoFlow::Factory()); } Ptv::Value* NoFlow::Factory::serialize() const { Ptv::Value* res = Ptv::Value::emptyObject(); res->push("type", new Parse::JsonValue(NoFlow::getName())); return res; } std::string NoFlow::Factory::getImageFlowName() const { return NoFlow::getName(); } bool NoFlow::Factory::needsInputPreProcessing() const { return false; } std::string NoFlow::Factory::hash() const { std::stringstream ss; ss << "No Flow"; return ss.str(); } Potential NoFlow::Factory::create() const { std::map parameters; return Potential(new NoFlow(parameters)); } ImageFlowFactory* NoFlow::Factory::clone() const { return new Factory(); } NoFlow::NoFlow(const std::map& parameters) : ImageFlow(parameters) {} std::string NoFlow::getName() { return std::string("no"); } Status NoFlow::findSingleScaleImageFlow(const int2&, const int2&, const GPU::Buffer&, const int2&, const int2&, const GPU::Buffer&, GPU::Buffer, GPU::Stream) { // Do nothing return Status::OK(); } Status NoFlow::upsampleFlow(const int2&, const int2&, const GPU::Buffer&, const int2&, const int2&, const GPU::Buffer&, const GPU::Buffer&, GPU::Buffer, GPU::Stream) { // Do nothing return Status::OK(); } ImageFlow::ImageFlowAlgorithm NoFlow::getFlowAlgorithm() const { return ImageFlow::ImageFlowAlgorithm::NoFlow; } } // namespace Core } // namespace VideoStitch