diff options
author | Éanna Ó Catháin <eanna.ocathain@arm.com> | 2021-04-07 14:35:25 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2021-05-07 09:11:52 +0000 |
commit | c6ab02a626e15b4a12fc09ecd844eb8b95380c3c (patch) | |
tree | 9912ed9cdb89cdb24483b22d6621ae30049ae321 /samples/common/include/CVUtils/IFrameOutput.hpp | |
parent | e813d67f86df41a238ff79b5c554ef5027f56576 (diff) | |
download | armnn-c6ab02a626e15b4a12fc09ecd844eb8b95380c3c.tar.gz |
MLECO-1252 ASR sample application using the public ArmNN C++ API.
Change-Id: I98cd505b8772a8c8fa88308121bc94135bb45068
Signed-off-by: Éanna Ó Catháin <eanna.ocathain@arm.com>
Diffstat (limited to 'samples/common/include/CVUtils/IFrameOutput.hpp')
-rw-r--r-- | samples/common/include/CVUtils/IFrameOutput.hpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/samples/common/include/CVUtils/IFrameOutput.hpp b/samples/common/include/CVUtils/IFrameOutput.hpp new file mode 100644 index 0000000000..6f7ca0b574 --- /dev/null +++ b/samples/common/include/CVUtils/IFrameOutput.hpp @@ -0,0 +1,48 @@ +// +// Copyright © 2020 Arm Ltd and Contributors. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include <cstddef> +#include <memory> + +namespace common +{ +/** + * @brief Frames output interface + * + * @tparam FrameDataT frame container data type + */ + template<typename FrameDataT> class IFrameOutput + { + + public: + /** + * @brief Writes frame to the selected output + * + * @param frame container + */ + virtual void WriteFrame(std::shared_ptr <FrameDataT>& frame) = 0; + + /** + * @brief Closes the frame output + */ + virtual void Close() = 0; + + /** + * @brief Checks if the frame sink is ready to write. + * + * @return True if frame sink is ready, False otherwise + */ + virtual bool IsReady() const = 0; + + /** + * @brief Default destructor + */ + virtual ~IFrameOutput() = default; + + }; + +}// namespace common |