How to set libva_driver_name in qmake file



  • I am trying build an application using FFMPEG with hardware acceleration.
    For that I need to set path for hardware accelerators and libva driver name.

    export PKG_CONFIG_PATH=/opt/mediasdk/lib/pkgconfig/:$PKG_CONFIG_PATH
    export LD_LIBRARY_PATH=/opt/mediasdk/lib/:$LD_LIBRARY_PATH
    export LIBVA_DRIVER_NAME=iHD

    These are the path I used to set through Linux terminal.
    I am able to set LDD and pkg_config path. But I am able to understand how to set libva_driver_name.

    Error is ::
    "[AVHWDeviceContext @ 0x7f4c18003380] libva: va_getDriverName() failed with unknown libva error,driver_name=(null)
    [AVHWDeviceContext @ 0x7f4c18003380] Failed to initialise VAAPI connection: -1 (unknown libva error)."



  • @Mahesh_Palkar said in How to set libva_driver_name in qmake file:

    I am trying build an application using FFMPEG with hardware acceleration.
    For that I need to set path for hardware accelerators and libva driver name.

    how is this eventually related to Qt framework?

    libva: va_getDriverName() failed with unknown libva error,driver_name=(null)

    should you look for any related issues in the documentation/forum from the libva implementation you're using?



  • Actually I want to do hardware decoding using FFMPEG in qt. So to enable hardware decoding i need to enable libva drivers ie i965.
    So my question is how can I set Libva path and driver name so that when I call ffmpeg api to hardware decode it should take driver.



  • what is qmake equivalent to following in cmake

    export PKG_CONFIG_PATH=/opt/mediasdk/lib/pkgconfig/:$PKG_CONFIG_PATH
    export LD_LIBRARY_PATH=/opt/mediasdk/lib/:$LD_LIBRARY_PATH
    export LIBVA_DRIVER_NAME=iHD


Log in to reply