14#include <egt/detail/meta.h>
15#include <egt/window.h>
43 std::unique_ptr<detail::GstDecoderImpl> m_camera_impl;
103 const std::string& device =
"/dev/video0",
180 void scale(
float hscale,
float vscale)
override;
188 void deserialize(
Serializer::Properties& props);
A CameraWindow is a widget to capture image feed from the camera sensor and render it on screen using...
Definition camera.h:39
std::vector< std::string > list_devices()
EGT_NODISCARD bool playing() const
Check is the camera pipeline in play state.
CameraWindow(CameraWindow &&)=default
bool play()
Set the camera pipeline to the play state.
CameraWindow(const std::string &device="/dev/video0", PixelFormat format_hint=PixelFormat::yuyv, WindowHint hint=WindowHint::overlay)
Create a camera window.
CameraWindow & operator=(CameraWindow &&)=default
std::string device() const
void draw(Painter &painter, const Rect &rect) override
Draw the widget.
SignalW< const std::string & > on_error
Event signal.
Definition camera.h:54
CameraWindow & operator=(const CameraWindow &)=delete
CameraWindow(const Rect &rect, const std::string &device="/dev/video0", PixelFormat format_hint=PixelFormat::yuyv, WindowHint hint=WindowHint::overlay)
Create a camera window.
CameraWindow(const CameraWindow &)=delete
void serialize(Serializer &serializer) const override
Serialize the widget to the specified serializer.
void do_draw() override
Perform the actual drawing.
Definition camera.h:128
SignalW< const std::string & > on_disconnect
Generated when an USB camera disconnected.
Definition camera.h:64
bool start()
Initialize camera pipeline to capture image feed from the camera sensor and render to Window.
CameraWindow(Serializer::Properties &props)
Construct a camera window.
Definition camera.h:112
SignalW< const std::string & > on_connect
Generated when an USB camera connected.
Definition camera.h:59
void device(const std::string &device)
CameraWindow(Serializer::Properties &props, bool is_derived)
~CameraWindow() noexcept override
void scale(float hscale, float vscale) override
Set the scale of the widget.
Drawing interface for 2D graphics.
Definition painter.h:45
Abstract base serializer class.
Definition serialize.h:34
std::list< std::tuple< std::string, std::string, Serializer::Attributes > > Properties
Definition serialize.h:47
A Window is a Widget that handles drawing to a Screen.
Definition window.h:47
WindowHint
Hint used for configuring Window backends.
Definition widgetflags.h:683
PixelFormat
Supported pixel formats.
Definition types.h:94
EGT framework namespace.
Definition animation.h:24