From e48c6044ce6fafe461d99eeabbb3f56fed2a2dd7 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Wed, 28 Aug 2019 02:34:30 -0400 Subject: [PATCH] Start local video recording along with camera video recording. --- custom-example/res/CustomCameraControl.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/custom-example/res/CustomCameraControl.qml b/custom-example/res/CustomCameraControl.qml index 3a9350a05..64a2b6627 100644 --- a/custom-example/res/CustomCameraControl.qml +++ b/custom-example/res/CustomCameraControl.qml @@ -44,6 +44,8 @@ Item { property real _labelFieldWidth: ScreenTools.defaultFontPixelWidth * 28 property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 30 property real _editFieldHeight: ScreenTools.defaultFontPixelHeight * 2 + property var _videoReceiver: QGroundControl.videoManager.videoReceiver + property bool _recordingLocalVideo: _videoReceiver && _videoReceiver.recording property var _dynamicCameras: activeVehicle ? activeVehicle.dynamicCameras : null property bool _isCamera: _dynamicCameras ? _dynamicCameras.cameras.count > 0 : false @@ -301,10 +303,18 @@ Item { if(_cameraVideoMode) { if(_camera.videoStatus === QGCCameraControl.VIDEO_CAPTURE_STATUS_RUNNING) { _camera.stopVideo() + //-- Local video as well + if (_recordingVideo) { + _videoReceiver.stopRecording() + } } else { if(!_fullSD) { _camera.startVideo() } + //-- Local video as well + if(_videoReceiver) { + _videoReceiver.startRecording() + } } } else { if(_camera.photoStatus === QGCCameraControl.PHOTO_CAPTURE_INTERVAL_IDLE || _camera.photoStatus === QGCCameraControl.PHOTO_CAPTURE_INTERVAL_IN_PROGRESS) { -- 2.22.0