Banuba SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
libs
spal
bnb
spal
camera
base_mocker.hpp
1
#pragma once
2
3
#include <bnb/types/base_types.hpp>
4
#include <bnb/spal/camera/base.hpp>
5
6
#include <thread>
7
#include <string>
8
9
namespace
bnb
10
{
11
class
BNB_EXPORT camera_base_mocker :
public
camera_base
12
{
13
public
:
14
using
camera_base::push_frame_cb_t;
15
16
explicit
camera_base_mocker(
const
push_frame_cb_t& cb, uint32_t frame_rate = 30);
17
~camera_base_mocker()
override
;
18
19
/*
20
* Main thread
21
*/
22
void
set_frame_rate(uint32_t frame_rate);
23
24
protected
:
25
virtual
void
update_image_content() = 0;
26
void
start()
override
;
27
28
private
:
29
using
micro_sleep_t = std::chrono::duration<long, std::micro>;
30
micro_sleep_t m_frame_rate_sleep;
31
32
void
thread_func();
33
34
std::thread m_thread;
35
};
36
37
}
// namespace bnb
Generated by
1.17.0