hwcodec uses one repository (#7701)
* update hwcodec, gpucodec repo is merged to hwcodec Signed-off-by: 21pages <pages21@163.com> * rename gpucodec.rs to vram.rs Signed-off-by: 21pages <pages21@163.com> * rename all gpucodec to vram, because vram is a feature of hwcodec Signed-off-by: 21pages <pages21@163.com> * use one check process and one config file * set check encode image size to 720p Signed-off-by: 21pages <pages21@163.com> --------- Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -836,8 +836,8 @@ pub fn has_hwcodec() -> bool {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn has_gpucodec() -> bool {
|
||||
cfg!(feature = "gpucodec")
|
||||
pub fn has_vram() -> bool {
|
||||
cfg!(feature = "vram")
|
||||
}
|
||||
|
||||
#[cfg(feature = "flutter")]
|
||||
@@ -846,14 +846,14 @@ pub fn supported_hwdecodings() -> (bool, bool) {
|
||||
let decoding = scrap::codec::Decoder::supported_decodings(None, true, None, &vec![]);
|
||||
#[allow(unused_mut)]
|
||||
let (mut h264, mut h265) = (decoding.ability_h264 > 0, decoding.ability_h265 > 0);
|
||||
#[cfg(feature = "gpucodec")]
|
||||
#[cfg(feature = "vram")]
|
||||
{
|
||||
// supported_decodings check runtime luid
|
||||
let gpu = scrap::gpucodec::GpuDecoder::possible_available_without_check();
|
||||
if gpu.0 {
|
||||
let vram = scrap::vram::VRamDecoder::possible_available_without_check();
|
||||
if vram.0 {
|
||||
h264 = true;
|
||||
}
|
||||
if gpu.1 {
|
||||
if vram.1 {
|
||||
h265 = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user