mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-02-17 14:07:28 +08:00
fix ffmpeg videotoolbox wrong log (#10413)
* Fix ffmpeg videotoolbox wrong log when changing bitrate * Let qsv support abr, and it's safe for qsv to changing bitrate. Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -193,7 +193,7 @@ impl EncoderApi for HwRamEncoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn support_abr(&self) -> bool {
|
fn support_abr(&self) -> bool {
|
||||||
["qsv", "vaapi"].iter().all(|&x| !self.config.name.contains(x))
|
["vaapi"].iter().all(|&x| !self.config.name.contains(x))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn support_changing_quality(&self) -> bool {
|
fn support_changing_quality(&self) -> bool {
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ index da7b291b03..3c866177f5 100644
|
|||||||
+ int status = VTSessionSetProperty(vtctx->session,
|
+ int status = VTSessionSetProperty(vtctx->session,
|
||||||
+ kVTCompressionPropertyKey_AverageBitRate,
|
+ kVTCompressionPropertyKey_AverageBitRate,
|
||||||
+ bit_rate_num);
|
+ bit_rate_num);
|
||||||
+ if (!status) {
|
+ if (status) {
|
||||||
+ av_log(avctx, AV_LOG_ERROR, "Error: cannot set average bit rate: %d\n", status);
|
+ av_log(avctx, AV_LOG_ERROR, "Error: cannot set average bit rate: %d\n", status);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
Reference in New Issue
Block a user