Banuba SDK
Loading...
Searching...
No Matches
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
14namespace bnb { namespace interfaces {
15
16class processor_configuration;
17enum class processor_type;
19struct processor_result;
20
21class BNB_EXPORT frame_processor {
22public:
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
static std::shared_ptr< frame_processor > create_realtime_processor(realtime_processor_mode mode, const std::shared_ptr< processor_configuration > &config)
Realtime feed processor.
static std::shared_ptr< frame_processor > create_video_processor(const std::shared_ptr< processor_configuration > &config)
Video processor.
static std::shared_ptr< frame_processor > create_photo_processor(const std::shared_ptr< processor_configuration > &config)
Photo processor.