Banuba SDK
output.hpp
1 #pragma once
2 
3 #include <bnb/player_api/interfaces/render_target.hpp>
4 #include <bnb/utils/defs.hpp>
5 
6 #include <memory>
7 
8 namespace bnb::player_api::interfaces
9 {
10  class output;
11 } // namespace bnb::player_api::interfaces
12 
13 namespace bnb::player_api
14 {
15  using output_sptr = std::shared_ptr<bnb::player_api::interfaces::output>;
16 } // namespace bnb::player_api
17 
18 namespace bnb::player_api::interfaces
19 {
20 
21  /**
22  * The interface is inherited by all classes that must work with player,
23  * and responsible for passing the rendered frame to the output view
24  */
25  class BNB_EXPORT output
26  {
27  public:
28  virtual ~output() = default;
29 
30  /**
31  * Attach output to the player. Called by the player on the render thread.
32  */
33  virtual void attach() = 0;
34 
35  /**
36  * Detach output from the player. Called by the player on the render thread.
37  */
38  virtual void detach() = 0;
39 
40  /**
41  * Present the drawn frame by the player to the output
42  */
43  virtual void present(const render_target_sptr& render_target) = 0;
44  }; // class output
45 
46 } // namespace bnb::player_api::interfaces
bnb::player_api::interfaces::output
The interface is inherited by all classes that must work with player, and responsible for passing the...
Definition: output.hpp:25
bnb::player_api::interfaces::render_target
Responsible for preparation for drawing frames to 'outputs'.
Definition: render_target.hpp:26