Banuba SDK
frame_processor.hpp
Go to the documentation of this file.
1 /// \file
2 /// \addtogroup EffectPlayer
3 /// @{
4 ///
5 // AUTOGENERATED FILE - DO NOT MODIFY!
6 // This file was generated by Djinni from effect_player.djinni
7 
8 #pragma once
9 
11 #include <bnb/utils/defs.hpp>
12 #include <memory>
13 
14 namespace bnb { namespace interfaces {
15 
16 class processor_configuration;
17 enum class processor_type;
18 enum class realtime_processor_mode;
19 struct processor_result;
20 
21 class BNB_EXPORT frame_processor {
22 public:
23  virtual ~frame_processor() {}
24 
25  /** Realtime feed processor. See RealtimeProcessorMode for more info. */
26  static std::shared_ptr<frame_processor> create_realtime_processor(realtime_processor_mode mode, const std::shared_ptr<processor_configuration> & config);
27 
28  /**
29  * Photo processor. `push` to set photo, processing happens on `pop` synchronously.
30  * Several `pop` calls return same result without unnecessary processing,
31  * except case when recognizer pipeline was changed by EffectPlayer, processing will be restarted.
32  */
33  static std::shared_ptr<frame_processor> create_photo_processor(const std::shared_ptr<processor_configuration> & config);
34 
35  /** Video processor. Consistent `push` - `pop` will process frames synchronously. */
36  static std::shared_ptr<frame_processor> create_video_processor(const std::shared_ptr<processor_configuration> & config);
37 
38  virtual processor_type get_type() = 0;
39 
40  virtual void push(const std::shared_ptr<::bnb::interfaces::frame_data> & fd) = 0;
41 
42  virtual processor_result pop() = 0;
43 };
44 
45 } } // namespace bnb::interfaces
46 /// @}
47 
bnb::interfaces::frame_processor
Definition: frame_processor.hpp:21
frame_data.hpp
bnb::interfaces::processor_result
Definition: processor_result.hpp:18