summaryrefslogtreecommitdiff
path: root/src/qcam/main_window.h
diff options
context:
space:
mode:
authorUmang Jain <email@uajain.com>2020-06-16 19:45:38 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-06-17 00:27:56 +0300
commit7055e96ecc9144390a259e4e23be7fb77ca93364 (patch)
tree55493af50a1bd6c4ba4bb593e214ef414d9ac80d /src/qcam/main_window.h
parente9b47217b44cd775498e3fd676be50217d73ad41 (diff)
qcam: main_window: Introduce initial hotplug support
Hook up various QCam UI bits with hotplug support introduced in previous commits. This looks good-enough as first steps to see how the hotplugging functionality is turning out to be from application point-of-view. One can still think of few edge case nuances not yet covered under this implementation especially around having only one camera in the system and hotplugging/hot-unplugging it. Hence, those are intentionally kept out of scope for now. It might require some thinking on how to handle it on application level having additional time on hand. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/qcam/main_window.h')
-rw-r--r--src/qcam/main_window.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h
index 59fa2d98..4606fe48 100644
--- a/src/qcam/main_window.h
+++ b/src/qcam/main_window.h
@@ -32,6 +32,8 @@ using namespace libcamera;
class QAction;
class QComboBox;
+class HotplugEvent;
+
enum {
OptCamera = 'c',
OptHelp = 'h',
@@ -87,8 +89,12 @@ private:
int startCapture();
void stopCapture();
+ void addCamera(std::shared_ptr<Camera> camera);
+ void removeCamera(std::shared_ptr<Camera> camera);
+
void requestComplete(Request *request);
void processCapture();
+ void processHotplug(HotplugEvent *e);
void processViewfinder(FrameBuffer *buffer);
/* UI elements */