1 // 2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 6 #pragma once 7 8 #include <cstddef> 9 #include <memory> 10 11 namespace common 12 { 13 /** 14 * @brief Frames output interface 15 * 16 * @tparam FrameDataT frame container data type 17 */ 18 template<typename FrameDataT> class IFrameOutput 19 { 20 21 public: 22 /** 23 * @brief Writes frame to the selected output 24 * 25 * @param frame container 26 */ 27 virtual void WriteFrame(std::shared_ptr <FrameDataT>& frame) = 0; 28 29 /** 30 * @brief Closes the frame output 31 */ 32 virtual void Close() = 0; 33 34 /** 35 * @brief Checks if the frame sink is ready to write. 36 * 37 * @return True if frame sink is ready, False otherwise 38 */ 39 virtual bool IsReady() const = 0; 40 41 /** 42 * @brief Default destructor 43 */ 44 virtual ~IFrameOutput() = default; 45 46 }; 47 48 }// namespace common 49