Commit 97eeed89 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5484 from bluerobotics/pr-rm-record-no-gstream

Fixups for building without gstreamer/videostreaming support
parents ce5678cf 256fed26
...@@ -43,6 +43,7 @@ QGCView { ...@@ -43,6 +43,7 @@ QGCView {
property var _geoFenceController: _planMasterController.geoFenceController property var _geoFenceController: _planMasterController.geoFenceController
property var _rallyPointController: _planMasterController.rallyPointController property var _rallyPointController: _planMasterController.rallyPointController
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property var _videoReceiver: QGroundControl.videoManager.videoReceiver
property bool _mainIsMap: QGroundControl.videoManager.hasVideo ? QGroundControl.loadBoolGlobalSetting(_mainIsMapKey, true) : true property bool _mainIsMap: QGroundControl.videoManager.hasVideo ? QGroundControl.loadBoolGlobalSetting(_mainIsMapKey, true) : true
property bool _isPipVisible: QGroundControl.videoManager.hasVideo ? QGroundControl.loadBoolGlobalSetting(_PIPVisibleKey, true) : false property bool _isPipVisible: QGroundControl.videoManager.hasVideo ? QGroundControl.loadBoolGlobalSetting(_PIPVisibleKey, true) : false
property real _savedZoomLevel: 0 property real _savedZoomLevel: 0
...@@ -370,14 +371,14 @@ QGCView { ...@@ -370,14 +371,14 @@ QGCView {
anchors.right: _flightVideo.right anchors.right: _flightVideo.right
height: ScreenTools.defaultFontPixelHeight * 2 height: ScreenTools.defaultFontPixelHeight * 2
width: height width: height
visible: QGroundControl.videoManager.videoReceiver.videoRunning && QGroundControl.settingsManager.videoSettings.showRecControl.rawValue visible: _videoReceiver && _videoReceiver.videoRunning && QGroundControl.settingsManager.videoSettings.showRecControl.rawValue
opacity: 0.75 opacity: 0.75
Rectangle { Rectangle {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: height width: height
radius: QGroundControl.videoManager && QGroundControl.videoManager.videoReceiver && QGroundControl.videoManager.videoReceiver.recording ? 0 : height radius: QGroundControl.videoManager && _videoReceiver && _videoReceiver.recording ? 0 : height
color: "red" color: "red"
} }
...@@ -394,7 +395,7 @@ QGCView { ...@@ -394,7 +395,7 @@ QGCView {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: QGroundControl.videoManager.videoReceiver && QGroundControl.videoManager.videoReceiver.recording ? QGroundControl.videoManager.videoReceiver.stopRecording() : QGroundControl.videoManager.videoReceiver.startRecording() onClicked: _videoReceiver && _videoReceiver.recording ? _videoReceiver.stopRecording() : _videoReceiver.startRecording()
} }
} }
......
...@@ -25,11 +25,13 @@ Item { ...@@ -25,11 +25,13 @@ Item {
id: root id: root
property double _ar: QGroundControl.settingsManager.videoSettings.aspectRatio.rawValue property double _ar: QGroundControl.settingsManager.videoSettings.aspectRatio.rawValue
property bool _showGrid: QGroundControl.settingsManager.videoSettings.gridLines.rawValue > 0 property bool _showGrid: QGroundControl.settingsManager.videoSettings.gridLines.rawValue > 0
property var _videoReceiver: QGroundControl.videoManager.videoReceiver
Rectangle { Rectangle {
id: noVideo id: noVideo
anchors.fill: parent anchors.fill: parent
color: Qt.rgba(0,0,0,0.75) color: Qt.rgba(0,0,0,0.75)
visible: !QGroundControl.videoManager.videoReceiver.videoRunning visible: !(_videoReceiver && _videoReceiver.videoRunning)
QGCLabel { QGCLabel {
text: qsTr("WAITING FOR VIDEO") text: qsTr("WAITING FOR VIDEO")
font.family: ScreenTools.demiboldFontFamily font.family: ScreenTools.demiboldFontFamily
...@@ -41,20 +43,20 @@ Item { ...@@ -41,20 +43,20 @@ Item {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: "black" color: "black"
visible: QGroundControl.videoManager.videoReceiver.videoRunning visible: _videoReceiver && _videoReceiver.videoRunning
QGCVideoBackground { QGCVideoBackground {
id: videoContent id: videoContent
height: parent.height height: parent.height
width: _ar != 0.0 ? height * _ar : parent.width width: _ar != 0.0 ? height * _ar : parent.width
anchors.centerIn: parent anchors.centerIn: parent
receiver: QGroundControl.videoManager.videoReceiver receiver: _videoReceiver
display: QGroundControl.videoManager.videoReceiver.videoSurface display: _videoReceiver && _videoReceiver.videoSurface
visible: QGroundControl.videoManager.videoReceiver.videoRunning visible: _videoReceiver && _videoReceiver.videoRunning
Connections { Connections {
target: QGroundControl.videoManager.videoReceiver target: _videoReceiver
onImageFileChanged: { onImageFileChanged: {
videoContent.grabToImage(function(result) { videoContent.grabToImage(function(result) {
if (!result.saveToFile(QGroundControl.videoManager.videoReceiver.imageFile)) { if (!result.saveToFile(_videoReceiver.imageFile)) {
console.error('Error capturing video frame'); console.error('Error capturing video frame');
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment