Giter Site home page Giter Site logo

Unable to compile about libvdpau-va-gl HOT 12 CLOSED

i-rinat avatar i-rinat commented on July 17, 2024
Unable to compile

from libvdpau-va-gl.

Comments (12)

i-rinat avatar i-rinat commented on July 17, 2024

VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE was added only in the recent version of libvdpau, that's why it's absent on 0.7. I've added compatibility macros' in 3fc29a5. Could you check whenever source from master branch compiles now?

There were also other changes in code, so it would be nice if you check whenever it also works, not only compiles.

from libvdpau-va-gl.

extinctpotato avatar extinctpotato commented on July 17, 2024
adam@acer ~/O/l/build> cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/i386-linux-gnu/libX11.so
-- checking for module 'vdpau'
--   found vdpau, version 0.7
-- checking for module 'glib-2.0'
--   found glib-2.0, version 2.40.2
-- checking for module 'libva-x11'
--   found libva-x11, version 0.35.0
-- checking for modules 'gl;glu'
--   found gl, version 11.0.4
--   found glu, version 9.0.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/adam/Other2/libvdpau-va-gl/build
adam@acer ~/O/l/build> sudo make install
Scanning dependencies of target shader-bundle-tool
[  4%] Building C object glsl/CMakeFiles/shader-bundle-tool.dir/shader-bundle-tool.c.o
Linking C executable shader-bundle-tool
[  4%] Built target shader-bundle-tool
Scanning dependencies of target shader-bundle-src
[  9%] Generating shaders.c, shaders.h
[  9%] Built target shader-bundle-src
Scanning dependencies of target shader-bundle
[ 13%] Building C object glsl/CMakeFiles/shader-bundle.dir/shaders.c.o
Linking C static library libshader-bundle.a
[ 18%] Built target shader-bundle
Scanning dependencies of target vdpau_va_gl
[ 22%] Building CXX object src/CMakeFiles/vdpau_va_gl.dir/api-bitmap-surface.cc.o
[ 27%] Building CXX object src/CMakeFiles/vdpau_va_gl.dir/api-csc-matrix.cc.o
[ 31%] Building CXX object src/CMakeFiles/vdpau_va_gl.dir/api-decoder.cc.o
/home/adam/Other2/libvdpau-va-gl/src/api-decoder.cc: In function ‘VdpStatus vdp::Decoder::Render_h264(std::shared_ptr<vdp::Decoder::Resource>, std::shared_ptr<vdp::VideoSurface::Resource>, void* const*, uint32_t, const VdpBitstreamBuffer*)’:
/home/adam/Other2/libvdpau-va-gl/src/api-decoder.cc:531:77: error: invalid static_cast from type ‘void* const*’ to type ‘const VdpPictureInfoH264*’
     const auto *vdppi = static_cast<VdpPictureInfoH264 const *>(picture_info);
                                                                             ^
make[2]: *** [src/CMakeFiles/vdpau_va_gl.dir/api-decoder.cc.o] Error 1
make[1]: *** [src/CMakeFiles/vdpau_va_gl.dir/all] Error 2
make: *** [all] Error 2

It fails again.

from libvdpau-va-gl.

i-rinat avatar i-rinat commented on July 17, 2024

There were another change in libvdpau: VdpPictureInfo type was changed from void * to void, which made C++ compiler unhappy.

I see no sane way to make compatibility wrappers for that change, so I've changed code to use bundled VDPAU headers instead (4f53876 and a8cd82f). Should be better now.

from libvdpau-va-gl.

extinctpotato avatar extinctpotato commented on July 17, 2024

Now it compiles with any problem, but I don't think it works:

adam@acer:/media/adam-theta/Video/Youtube$ VDPAU_DRIVER=va_gl
adam@acer:/media/adam-theta/Video/Youtube$ mpv -vo=vdpau How_To_Stop_Procrastinating-Joe_Jo.mp4 
Playing: How_To_Stop_Procrastinating-Joe_Jo.mp4
 (+) Video --vid=1 (_) (h264)
 (+) Audio --aid=1 --alang=eng (_) (aac)
[VS] Software VDPAU backend library initialized
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i915_drv_video.so
libva info: va_openDriver() returns -1
[VS] error (vdpDeviceCreateX11): gl error 1280
[vo/vdpau] Error when calling vdp_device_create_x11: 25
Error opening/initializing the selected video_out (-vo) device.
Video: no video

Exiting... (Errors when loading file)

from libvdpau-va-gl.

i-rinat avatar i-rinat commented on July 17, 2024

Are you sure you are using recent version? I think I removed all occurrences of string "vdpDeviceCreateX11" from the code. There is no even a function named that anymore.

It could be there are another version of libvdpau-va-gl built, and libvdpau uses it. There is a list of paths that are checked, and first found library is loaded.

Try to set environment variable VDPAU_DRIVER_PATH to the path where newly built libvdpau_va_gl.so.1 resides.

from libvdpau-va-gl.

i-rinat avatar i-rinat commented on July 17, 2024

I've just tried to test on Ubuntu 12.04, and found that libvdpau it has, doesn't know about VDPAU_DRIVER_PATH variable yet. You need either to place libvdpau_va_gl.so to some library path, or add its directory to the library search path. You could do the latter by export LD_LIBRARY_PATH=$PWD. That will add current directory.

from libvdpau-va-gl.

extinctpotato avatar extinctpotato commented on July 17, 2024
adam@acer:~/Other2/libvdpau-va-gl/build$ VDPAU_DRIVER_PATH=/home/adam/Other2/libvdpau-va-gl/build/
adam@acer:~/Other2/libvdpau-va-gl/build$ LD_LIBRARY_PATH=$PWD
adam@acer:~/Other2/libvdpau-va-gl/build$ VDPAU_DRIVER=va_gl
adam@acer:~/Other2/libvdpau-va-gl/build$ mpv -vo=vdpau /media/adam-theta/Video/Youtube/How_To_Stop_Procrastinating-Joe_Jo.mp4 
Playing: /media/adam-theta/Video/Youtube/How_To_Stop_Procrastinating-Joe_Jo.mp4
 (+) Video --vid=1 (_) (h264)
 (+) Audio --aid=1 --alang=eng (_) (aac)
[VS] Software VDPAU backend library initialized
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i915_drv_video.so
libva info: va_openDriver() returns -1
[VS] error (vdpDeviceCreateX11): gl error 1280
[vo/vdpau] Error when calling vdp_device_create_x11: 25
Error opening/initializing the selected video_out (-vo) device.
Video: no video

Exiting... (Errors when loading file)

Still no avail :/

from libvdpau-va-gl.

i-rinat avatar i-rinat commented on July 17, 2024

$ LD_LIBRARY_PATH=$PWD

That only sets variable for current shell session, but not for child processes. Try to use

$ export LD_LIBRARY_PATH=$PWD

from libvdpau-va-gl.

extinctpotato avatar extinctpotato commented on July 17, 2024

Nope, still the same.
I think it might be some sort of a problem with i915 driver though.

from libvdpau-va-gl.

i-rinat avatar i-rinat commented on July 17, 2024

Do you have another compiled libvdpau_va_gl.so anywhere in the filesystem?

from libvdpau-va-gl.

i-rinat avatar i-rinat commented on July 17, 2024

I think it might be some sort of a problem with i915 driver though.

It could be. Function vdpDeviceCreateX11() tries to compile couple of GPU shaders that used for colorspace conversion. As far as I know, Mesa falls back to software emulation of shaders if hardware have no appropriate support. But it could be that particular version used is returning error instead.

from libvdpau-va-gl.

i-rinat avatar i-rinat commented on July 17, 2024

As the initially reported bug was solved, I'm going to close this issue.

As for "Acer Travelmate 240/250" machine, I did a quick search and found that's it has a Pentium 4 processor. It doesn't have a hardware video decoder, which was only introduced in Core family since about 2010.

Without VA-API support, libvdpau-va-gl will be slower and more CPU time consuming than using Xv output in video players like MPlayer or mpv, since it does data format conversion in a non-optimal way.

from libvdpau-va-gl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.