Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

linux media sdk about libva problem

andya
Beginner
673 Views

Hi,

i use stream decode(HW)for linux,but it‘s must root user.

i test found,the proble maybe library for libva,it‘s must root user.if use  official website latest,normal user its ok,but libmfxhw64.so: undefined reference to `vaCreateSurfaces@VA_API_0.34.0' why?can you help me

test example:

 

test code:

#include <stdio.h>
#include <va/va.h>
#include <va/va_drm.h>
#include <fcntl.h>
void main()
{
        int fd;
        VADisplay _va_dpy;
        fd = open("/dev/dri/card0", O_RDWR);
        printf(" open fd:%d", fd);
        _va_dpy = vaGetDisplayDRM(fd);
        int maj_ver, min_ver;
        vaInitialize(_va_dpy, &maj_ver, &min_ver);
}

gcc test.c -L /usr/local/lib -lva-drm

1.result:(normal user) use http://www.freedesktop.org/software/vaapi/releases/libva/libva-1.2.1.tar.bz2 libva livdrm

[zhaoya@localhost decode]$ ./a.out
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
 

2.result:(normal user) use  libva libdrm in linux media sdk

[zhaoya@localhost bin]$ ./a.out
libva info: VA-API version 0.34.0
open lib: Invalid argument
libva info: va_getDriverName() returns 1

i try use  libva of official website latest replace it, but have error:libmfxhw64.so: undefined reference to `vaCreateSurfaces@VA_API_0.34.0'

 

 

 

 

 

 

 

0 Kudos
3 Replies
Jeffrey_M_Intel1
Employee
673 Views

Media SDK ships with a customized libva.  It is not expected to work with the general version.  For now there are many scenarios where Intel Media SDK runs best as root.  Please let us know if this is acceptable or running as a non-privileged user is a strong requirement.

Thanks, Jeff

0 Kudos
andya
Beginner
673 Views

now our company product add the sdk function, running as a non-privileged user is a strong, i need help. how solutions?

0 Kudos
Jeffrey_M_Intel1
Employee
673 Views

For now many scenarios require running as root with Media SDK for Linux Servers.  Work is in progress to remove this limitation.  If this is a blocking issue please feel free to send a private message so we can discuss next steps.

0 Kudos
Reply