blob: 6f7ca0b57419d2d7c055327488589cf4369b5724 [file] [log] [blame]
Éanna Ó Catháin919c14e2020-09-14 17:36:49 +01001//
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
Éanna Ó Catháinc6ab02a2021-04-07 14:35:25 +010011namespace common
Éanna Ó Catháin919c14e2020-09-14 17:36:49 +010012{
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
Éanna Ó Catháinc6ab02a2021-04-07 14:35:25 +010048}// namespace common