client side handle codec format

This commit is contained in:
csf
2022-07-05 22:17:34 +08:00
parent 6c9e601c59
commit 5bd08bf0a7
10 changed files with 68 additions and 81 deletions

View File

@@ -6,7 +6,7 @@ use hbb_common::{
anyhow::{anyhow, Context},
config::HwCodecConfig,
lazy_static, log,
message_proto::{test_delay, H264s, H265s, Message, VideoFrame, H264, H265},
message_proto::{H264s, H265s, Message, VideoFrame, H264, H265},
ResultType,
};
use hwcodec::{
@@ -143,13 +143,6 @@ impl EncoderApi for HwEncoder {
self.encoder.set_bitrate((bitrate * 1000) as _).ok();
Ok(())
}
fn get_codec_format(&self) -> test_delay::CodecFormat {
match self.format {
DataFormat::H264 => test_delay::CodecFormat::H264,
DataFormat::H265 => test_delay::CodecFormat::H265,
}
}
}
impl HwEncoder {