mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
Show current codec in menu when auto codec is chosen (#7942)
* change negotiated codec name to negotiated codec format Signed-off-by: 21pages <pages21@163.com> * fallback to vp9 directly if failed to create encoder Current fallback method is clear hwcodec config Signed-off-by: 21pages <pages21@163.com> * show current codec in menu when auto codec is chosen Signed-off-by: 21pages <pages21@163.com> --------- Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -355,14 +355,18 @@ Future<List<TRadioMenu<String>>> toolbarCodec(
|
||||
|
||||
TRadioMenu<String> radio(String label, String value, bool enabled) {
|
||||
return TRadioMenu<String>(
|
||||
child: Text(translate(label)),
|
||||
child: Text(label),
|
||||
value: value,
|
||||
groupValue: groupValue,
|
||||
onChanged: enabled ? onChanged : null);
|
||||
}
|
||||
|
||||
var autoLabel = translate('Auto');
|
||||
if (groupValue == 'auto') {
|
||||
autoLabel = '$autoLabel (${ffi.qualityMonitorModel.data.codecFormat})';
|
||||
}
|
||||
return [
|
||||
radio('Auto', 'auto', true),
|
||||
radio(autoLabel, 'auto', true),
|
||||
if (codecs[0]) radio('VP8', 'vp8', codecs[0]),
|
||||
radio('VP9', 'vp9', true),
|
||||
if (codecs[1]) radio('AV1', 'av1', codecs[1]),
|
||||
|
||||
Reference in New Issue
Block a user