Skip to content

Commit

Permalink
add big throttle warning to the OSD (can be disabled if wanted)
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Nov 23, 2023
1 parent cffb1c1 commit bdf81a8
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 16 deletions.
1 change: 1 addition & 0 deletions qml/ui/elements/AppSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ Settings {
property bool wb_link_rate_control_widget_show_frequency: true
property bool wb_link_rate_control_widget_show_bitrate: true
property bool wb_link_rate_control_widget_show_fec_and_keyframe: true
property bool wb_link_rate_control_widget_show_throttle_warning: true

property bool wb_link_rate_control_widget_show_bitrate_detailed: true

Expand Down
62 changes: 46 additions & 16 deletions qml/ui/widgets/WBLinkRateControlWidget.qml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,27 @@ Make the video more stable (less microfreezes) on the cost of less image quality
onCheckedChanged: settings.wb_link_rate_control_widget_show_fec_and_keyframe = checked
}
}
Item {
width: parent.width
height: 32
Text {
text: qsTr("Show throttle warning")
color: "white"
height: parent.height
font.bold: true
font.pixelSize: detailPanelFontPixels;
anchors.left: parent.left
verticalAlignment: Text.AlignVCenter
}
Switch {
width: 32
height: parent.height
anchors.rightMargin: 6
anchors.right: parent.right
checked: settings.wb_link_rate_control_widget_show_throttle_warning
onCheckedChanged: settings.wb_link_rate_control_widget_show_throttle_warning = checked
}
}


Item {
Expand Down Expand Up @@ -433,38 +454,32 @@ Make the video more stable (less microfreezes) on the cost of less image quality
anchors.fill: parent
scale: bw_current_scale

Item {
anchors.fill: parent
anchors.centerIn: parent
Column {
anchors.top: widgetInner.top
width: parent.width

Text {
id: channelText
y: 0
width: parent.width
height: parent.height / 3
color: settings.color_text
text: get_text_channel()
anchors.top: parent.top
anchors.bottomMargin: 0
verticalAlignment: Text.AlignBottom
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 14
font.family: settings.font_text
style: Text.Outline
styleColor: settings.color_glow
visible: settings.wb_link_rate_control_widget_show_frequency
}

Text {
id: mcsText
y: 0
width: parent.width
height: 14
color: settings.color_text
text: get_text_bitrate()
anchors.top: channelText.bottom
anchors.bottomMargin: 0
verticalAlignment: Text.AlignBottom
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 14
font.family: settings.font_text
Expand All @@ -473,23 +488,38 @@ Make the video more stable (less microfreezes) on the cost of less image quality
visible: settings.wb_link_rate_control_widget_show_bitrate
}
Text {
id: fec_keyfra
y: 0
width: parent.width
height: 14
color: settings.color_text
text: get_text_fec_keyframe()
//anchors.bottom: parent.bottom
//anchors.bottomMargin: 0
anchors.left: parent.left
anchors.top: mcsText.bottom
verticalAlignment: Text.AlignBottom
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 14
font.family: settings.font_text
style: Text.Outline
styleColor: settings.color_glow
visible: settings.wb_link_rate_control_widget_show_fec_and_keyframe
}
Text{
width: parent.width
height: 14
color: settings.color_warn
font.pixelSize: 14
font.family: settings.font_text
style: Text.Outline
styleColor: settings.color_glow
visible: settings.wb_link_rate_control_widget_show_throttle_warning
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text: {
if(_ohdSystemAir.is_alive && _ohdSystemAir.curr_n_rate_adjustments>0){
return "THROTTLED";
}
return "";
}
}

}
}
Expand Down

0 comments on commit bdf81a8

Please sign in to comment.