34#define NDEVR_SUPPORTS_LOCAL_CAMERA 1
35#if NDEVR_SUPPORTS_LOCAL_CAMERA
36#include <NDEVR/PhysicalCameraView.h>
37#include <NDEVR/Camera.h>
38#include <NDEVR/Pointer.h>
39#include <NDEVR/File.h>
45 class VulkanGraphicsWindow;
57 VulkanPhysicalCameraView();
62 VulkanPhysicalCameraView(
const DynamicPointer<Camera>& camera, DesignObjectLookup* lookup, QWidget* parent =
nullptr);
63 virtual ~VulkanPhysicalCameraView();
64 virtual bool setCameraSource(
const StringView& connection_id)
override;
65 virtual void refreshInstance()
override;
67 void setToDefaultCamera();
68 virtual void setCameraZoom(fltp08 zoom)
override;
73 VulkanVideoRenderer* videoWidget();
76 virtual void setRemoteSource(
const StringView& remote);
77 bool event(QEvent* event)
override;
81 bool handleRemoteSink(_GstAppSink* sink);
83 void updateRenderLocation();
85 void processCapturedImage(
int index,
const QImage& img);
86 void handleCameraError(
int camera_error);
87 void handleScreenshotError(
int id,
int error,
const QString& errorString);
88 void handleVideoError();
89 void updateCameraState(
bool state);
90 void updateRecorderState(
int state);
91 void updateRecorderTimespan();
93 static void OnEnd(_GstAppSink* sink,
void* user);
95 void updateCameraSourceCombo();
96 bool startRecord(
const File& file)
override;
97 bool finishRecord(File file)
override;
98 virtual bool pauseRecord(
bool paused,
const File& file)
override;
99 virtual bool takeImage(
const File& file)
override;
100 virtual void invertScreenColors(
bool invert)
override;
102 Vector<2, uint04> m_source_size = Constant<Vector<2, uint04>>::Invalid;
103 VulkanGraphicsWindow* m_window =
nullptr;
104 DesignObjectLookup* m_lookup =
nullptr;
105 _GstElement* m_pipeline =
nullptr;
106 File m_screenshot_location;
107 VulkanVideoRenderer* m_video_widget =
nullptr;
108 QCustomComboBox* m_selection_combo;
109 bool m_is_running =
false;
The equivelent of std::vector but with a bit more control.
A core class where all Design Objects including models, materials, and geometries are stored.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Factory for creating PhysicalCameraView instances and querying supported output formats.
A Viewport that represents a physical camera stream, or real world camera view.
A compact way to present a list of options to the user.
Provides access to a local camera on the system, such as a webcam or camera for a phone.
virtual bool canCreateView(const DynamicPointer< Camera > &camera, DesignObjectLookup *model_manager, bool ignore_active) override
Checks whether this factory can create a view for the given camera.
virtual PhysicalCameraView * createView(const DynamicPointer< Camera > &camera, DesignObjectLookup *model_manager, QWidget *parent) override
Creates a VulkanPhysicalCameraView for the given camera.
virtual Buffer< DynamicPointer< Camera > > availableCameraStreams() const override
Returns all camera streams available for Vulkan-based rendering.
A Model subclass that renders a video stream from a GStreamer source into the 3D scene.
The primary namespace for the NDEVR SDK.