mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 08:09:19 +02:00
extcam camera: separate preview and recording
This commit is contained in:
@@ -11,12 +11,22 @@ namespace ui
|
||||
{
|
||||
class cameraview_panel : public ui_panel
|
||||
{
|
||||
public:
|
||||
enum state_e {
|
||||
IDLE,
|
||||
PREVIEW,
|
||||
RECORDING
|
||||
};
|
||||
|
||||
private:
|
||||
std::atomic_bool exit_thread = true;
|
||||
std::thread workthread;
|
||||
|
||||
uint8_t* image_ptr = nullptr;
|
||||
std::mutex mutex;
|
||||
|
||||
state_e state = IDLE;
|
||||
|
||||
std::optional<opengl_texture> texture;
|
||||
|
||||
void workthread_func();
|
||||
@@ -27,6 +37,7 @@ class cameraview_panel : public ui_panel
|
||||
|
||||
void render() override;
|
||||
void render_contents() override;
|
||||
bool set_state(state_e e);
|
||||
|
||||
std::string rec_name;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user