i-rinat / libvdpau-va-gl

VDPAU driver with OpenGL/VAAPI backend
MIT License
161 stars 26 forks source link

Fails to build on Ubuntu versions older than Trusty #28

Closed hotice closed 10 years ago

hotice commented 10 years ago

libvdpau-va-gl fails to build on Ubuntu versions older than 14.04 Trusty Tahr. Would it be possible to fix this? The previous version was built properly on Ubuntu Precise, Quantal, Raring and Saucy.

Here's the build log for Ubuntu 13.10 Saucy: https://launchpadlibrarian.net/162926990/buildlog_ubuntu-saucy-amd64.libvdpau-va-gl_0.3.1-1~webupd8~saucy_FAILEDTOBUILD.txt.gz

And for ubuntu 12.10 Quantal: https://launchpadlibrarian.net/162927122/buildlog_ubuntu-quantal-amd64.libvdpau-va-gl_0.3.1-1~webupd8~quantal_FAILEDTOBUILD.txt.gz

i-rinat commented 10 years ago

Newer versions of ffmpeg/libav use AV_PIX_FMT_NV12 while older use PIX_FMT_NV12. I'll try to figure out some workaround to make compilation possible for both versions.

hotice commented 10 years ago

Thank you!

i-rinat commented 10 years ago

@hotice, can you try to build version from dev branch: https://github.com/i-rinat/libvdpau-va-gl/tree/dev ?

hotice commented 10 years ago

I've tried it and it works!

i-rinat commented 10 years ago

ok, then I'll do couple of pending fixes and make another release in a day or two.

hotice commented 10 years ago

Thank you very much!

i-rinat commented 10 years ago

v0.3.2 with compilation fix is released now.

sgdesmet commented 10 years ago

On Debian Wheezy, i still get:

[ 54%] Building C object src/CMakeFiles/vdpau_va_gl_obj.dir/api-video-surface.c.o
/home/xbmc/libvdpau-va-gl-0.3.2/src/api-video-surface.c: In function 'vdpau_ycbcr_to_av_pixfmt':
/home/xbmc/libvdpau-va-gl-0.3.2/src/api-video-surface.c:303:44: error: 'AV_PIX_FMT_NV12' undeclared (first use in this function)
/home/xbmc/libvdpau-va-gl-0.3.2/src/api-video-surface.c:303:44: note: each undeclared identifier is reported only once for each function it appears in
/home/xbmc/libvdpau-va-gl-0.3.2/src/api-video-surface.c:304:44: error: 'AV_PIX_FMT_YUV420P' undeclared (first use in this function)
/home/xbmc/libvdpau-va-gl-0.3.2/src/api-video-surface.c:305:44: error: 'AV_PIX_FMT_UYVY422' undeclared (first use in this function)
/home/xbmc/libvdpau-va-gl-0.3.2/src/api-video-surface.c:306:44: error: 'AV_PIX_FMT_YUYV422' undeclared (first use in this function)
/home/xbmc/libvdpau-va-gl-0.3.2/src/api-video-surface.c:307:44: error: 'AV_PIX_FMT_NONE' undeclared (first use in this function)
make[2]: *** [src/CMakeFiles/vdpau_va_gl_obj.dir/api-video-surface.c.o] Error 1
make[1]: *** [src/CMakeFiles/vdpau_va_gl_obj.dir/all] Error 2
make: *** [all] Error 2
i-rinat commented 10 years ago

@sgdesmet , I've successfully built both v0.3.2 and most recent snapshot in debian wheezy chroot just now. Maybe you are reconfiguring project over previous build? Try to clean build directory and reconfigure again.

Which version of libswscale-dev package do you have on your machine? Is it 6:0.8.10-1?

sgdesmet commented 10 years ago

Hm, it appears I have version 8:1.0.8-dmo1, which came from a third party repository, and is required for xbmc (also provided by that repository)

i-rinat commented 10 years ago

FFmpeg versioning is a mess. I've found two commits which both essentially the same, they're converting PIXFMT_ macros to AV_PIXFMT_. First changes version from (51, 41, 1) to (51, 42, 0). Second changes version from (51, 73, 102) to (51, 74, 100). But I haven't found commit which changes AV_PIXFMT_ to PIXFMT_ somewhere between (51, 42, 0) and (51, 73, 102). Is it exists? Is there a solid way to check whenever I need compatibility macros or not? I don't know.

You may manually fix src/pixfmt_compat.h if you want to compile it anyway. But as far as I know libvdpau-va-gl have no enough API implemented to use it with XBMC.

sgdesmet commented 10 years ago

Editing that file allowed the build to complete. And as you said, it does not seem to work with XBMC. Thank you anyway though :)