av1 record, set zero codec private

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-08-07 15:18:34 +08:00
parent c61fa71a70
commit 510cffb305
4 changed files with 32 additions and 15 deletions

View File

@@ -436,8 +436,7 @@ fn run(vs: VideoService) -> ResultType<()> {
log::info!("init quality={:?}, abr enabled:{}", quality, abr);
let codec_name = Encoder::negotiated_codec();
let recorder = get_recorder(c.width, c.height, &codec_name);
let last_recording =
(recorder.lock().unwrap().is_some() || video_qos.record()) && codec_name != CodecName::AV1;
let last_recording = recorder.lock().unwrap().is_some() || video_qos.record();
drop(video_qos);
let encoder_cfg = get_encoder_config(&c, quality, last_recording);
@@ -479,8 +478,7 @@ fn run(vs: VideoService) -> ResultType<()> {
allow_err!(encoder.set_quality(quality));
video_qos.store_bitrate(encoder.bitrate());
}
let recording = (recorder.lock().unwrap().is_some() || video_qos.record())
&& codec_name != CodecName::AV1;
let recording = recorder.lock().unwrap().is_some() || video_qos.record();
if recording != last_recording {
bail!("SWITCH");
}