Closed Vizalkar closed 10 months ago
这个接口好像没必要
The mdk::Player::setDecoder function should return the chosen decoder, in order for the caller to know what actually happened. Would return an empty string if no suitable decoder were found in the list.
The chosen decoder is unknown until start to decode. Even when playing a single video, decoder can change if failed to decode a frame(broken input).
There is a MediaEvent {0, "decoder.video", DecoderName, stream}
. Currently DecoderName is not always correct, for example set D3D11 but open a codec not in the supported list, the event still reports D3D11. I will fix this soon.
try the latest build, MediaEvent decoder name should be correct
It seems like the decoder name in the event after setting "FFmpeg:hwaccel=vdpau" is just "FFmpeg" so one cannot know if the hardware acceleration is actually being supported or not, I need the full information
try the latest sdk. btw, you have to use FFmpeg:hwcontext=vdpau
instead, it the same as VDPAU
and VDPAU
will be used in the event
大佬,FFmpeg:hwcontext=vdpau 的意思是优先用vdpau硬解,如果失败,再用ffmpeg软解?
大佬,FFmpeg:hwcontext=vdpau 的意思是优先用vdpau硬解,如果失败,再用ffmpeg软解?
不是,FFmpeg:hwcontext=vdpau我加了个别名VDPAU,是调用FFmpeg里的vdpau解码,失败不回退软解。用FFmpeg内部的机制回退软解要加sw_fallback=1,也就是FFmpeg:hwcontext=1:sw_fallback=1
,但这会导致不会切换到setDecoders设的其他解码器,所以默认不用ffmpeg的机制回退软解,而是显示再加个FFmpeg setDecoders(MediaType::Video, {VDPAU, FFmpeg})
setDecoders是按照顺序优先级尝试解码吗?
setDecoders是按照顺序优先级尝试解码吗?
对
好的,谢谢,大佬你更新的真快,每天早晨起来又看你发布版本了
硬解码字符串好像严格区分大小写?我写成ffmpeg不行,必须是FFmpeg
Hi
Because setDecoder takes a list of decoders as argument, one is never sure which decoder of the list is actually used. I need this information in my program and it seems like the only thing that tells this is the logs. I think that :
Do you agree ?
Regards Adrien Grosjean