hide recording button if using av1

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-06-29 21:26:25 +08:00
parent 5b1d2abb71
commit c2023e8ca3
4 changed files with 22 additions and 8 deletions

View File

@@ -101,6 +101,9 @@ impl DerefMut for Recorder {
impl Recorder {
pub fn new(mut ctx: RecorderContext) -> ResultType<Self> {
if ctx.format == CodecFormat::AV1 {
bail!("not support av1 recording");
}
ctx.set_filename()?;
let recorder = match ctx.format {
CodecFormat::VP8 | CodecFormat::VP9 => Recorder {