moonlight-embedded icon indicating copy to clipboard operation
moonlight-embedded copied to clipboard

ffmpeg libav version to compile

Open FockeOeuf opened this issue 7 years ago • 3 comments

Hi,

I'm trying to compile moonlight with vaapi, and I get an error with the AVCodecContext::hw_device_ctx property which is does not exist in the libavcodec.h I get from the Debian 9 and Ubuntu Xenial ffmpeg packages I get. Seems that this property does not exist in the branches used for Debian and Ubuntu, but I can't really get which release I need to use in order to be able to compile. Release 2.8 solves the hw_device_ctx issue, but raises another one.

Is it possible to get ffmpeg branch used in moonlight? Or even better have it included in the pkg_check_modules command in the CMakeLists.txt?

Edit: tried with the v3.2.8, hw_device_ctx does not exist, whereas with 3.3 & 3.4 branches seem to have (but I don't know what changes between the branches and may be used by moonlight)

FockeOeuf avatar Nov 14 '17 11:11 FockeOeuf

I have same problem. Here is the output:

[ 92%] Building C object CMakeFiles/moonlight.dir/src/video/ffmpeg_vaapi.c.o /home/pi/sources/moonlight-embedded/src/video/ffmpeg_vaapi.c: In function ‘va_get_format’: /home/pi/sources/moonlight-embedded/src/video/ffmpeg_vaapi.c:51:10: error: ‘AVCodecContext {aka struct AVCodecContext}’ has no member named ‘hw_device_ctx’; did you mean ‘hw_frames_ctx’? context->hw_device_ctx = device_ref; ^~

Nyaran avatar Mar 23 '18 16:03 Nyaran

I was able to fix this error by making the following change in:

moonlight-embedded/src/video/ffmpeg_vappi.c

Line 51: change from context->hw_device_ctx = device_ref;

change to context->hw_frames_ctx = device_ref;

EdgeSync avatar Dec 23 '18 16:12 EdgeSync

I was able to fix this error by making the following change in:

moonlight-embedded/src/video/ffmpeg_vappi.c

Line 51: change from context->hw_device_ctx = device_ref;

change to context->hw_frames_ctx = device_ref;

When I change to hw_frames_ctx, the code is not running anymore, no frame can decode

quannv108 avatar Jun 12 '19 04:06 quannv108