mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 19:49:19 +02:00
extcam camera preview
This commit is contained in:
31
widgets/cameraview_extcam.h
Normal file
31
widgets/cameraview_extcam.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "uilayer.h"
|
||||
|
||||
namespace ui
|
||||
{
|
||||
class cameraview_panel : public ui_panel
|
||||
{
|
||||
std::atomic_bool exit_thread = true;
|
||||
std::thread workthread;
|
||||
|
||||
uint8_t* image_ptr = nullptr;
|
||||
std::mutex mutex;
|
||||
|
||||
std::optional<opengl_texture> texture;
|
||||
|
||||
void workthread_func();
|
||||
|
||||
public:
|
||||
cameraview_panel();
|
||||
~cameraview_panel();
|
||||
|
||||
void render() override;
|
||||
void render_contents() override;
|
||||
};
|
||||
} // namespace ui
|
||||
Reference in New Issue
Block a user