Skip to content

Commit 8f40bd1

Browse files
Show the active codec in Video Pipeline Debug
1 parent 7d14be6 commit 8f40bd1

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

‎qml/ui/widgets/VideoPipelineDebugWidget.qml‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ BaseWidget {
2525

2626
property int selectedCamera: 0
2727
property var selectedModel: selectedCamera === 0 ? _cameraStreamModelPrimary : _cameraStreamModelSecondary
28+
readonly property string codecLabel: {
29+
var codec = selectedModel.encoding_codec
30+
if (codec === 0) return "H.264"
31+
if (codec === 1) return "H.265"
32+
if (codec === 2) return "MJPEG"
33+
return qsTr("N/A")
34+
}
2835
property var selectedSettingsModel: selectedCamera === 0 ? _airCameraSettingsModel : _airCameraSettingsModel2
2936
property int requestedMbits: 10
3037
property int requestedQpMin: 5
@@ -459,6 +466,10 @@ BaseWidget {
459466
columnSpacing: 12
460467
rowSpacing: 3
461468

469+
Text { text: qsTr("Codec"); color: "white"; font.pixelSize: 13; Layout.preferredWidth: 132 }
470+
Text { text: debugWidget.codecLabel; color: settings.color_text; font.pixelSize: 13; Layout.fillWidth: true; elide: Text.ElideRight }
471+
Text { text: qsTr("Real bitrate"); color: "#05ff00"; font.pixelSize: 13; Layout.preferredWidth: 132 }
472+
Text { text: selectedModel.curr_video_measured_encoder_bitrate; color: settings.color_text; font.pixelSize: 13; Layout.fillWidth: true; elide: Text.ElideRight }
462473
Text { text: qsTr("Dynamic bitrate"); color: "white"; font.pixelSize: 13; Layout.preferredWidth: 132 }
463474
Text {
464475
text: selectedModel.supports_variable_bitrate ? qsTr("yes") : qsTr("no")
@@ -477,8 +488,6 @@ BaseWidget {
477488
}
478489
Text { text: qsTr("Set bitrate"); color: "white"; font.pixelSize: 13; Layout.preferredWidth: 132 }
479490
Text { text: selectedModel.curr_recomended_video_bitrate_string; color: settings.color_text; font.pixelSize: 13; Layout.fillWidth: true; elide: Text.ElideRight }
480-
Text { text: qsTr("Real bitrate"); color: "#05ff00"; font.pixelSize: 13; Layout.preferredWidth: 132 }
481-
Text { text: selectedModel.curr_video_measured_encoder_bitrate; color: settings.color_text; font.pixelSize: 13; Layout.fillWidth: true; elide: Text.ElideRight }
482491
Text { text: qsTr("Set FPS"); color: "white"; font.pixelSize: 13; Layout.preferredWidth: 132 }
483492
Text { text: selectedModel.curr_set_video_fps; color: settings.color_text; font.pixelSize: 13; Layout.fillWidth: true; elide: Text.ElideRight }
484493
Text { text: qsTr("Real FPS"); color: "#05ff00"; font.pixelSize: 13; Layout.preferredWidth: 132 }
@@ -878,7 +887,16 @@ BaseWidget {
878887
elide: Text.ElideRight
879888
}
880889
Text {
881-
width: parent.width - 80
890+
width: 45
891+
height: parent.height
892+
text: debugWidget.codecLabel
893+
color: settings.color_text
894+
font.pixelSize: 12
895+
verticalAlignment: Text.AlignVCenter
896+
elide: Text.ElideRight
897+
}
898+
Text {
899+
width: parent.width - 133
882900
height: parent.height
883901
text: qsTr("real %1").arg(selectedModel.curr_video_measured_encoder_bitrate)
884902
color: settings.color_text

0 commit comments

Comments
 (0)