[Libva] Running libva applications without X
Gwenole Beauchesne
gb.devel at gmail.com
Fri Apr 12 22:02:24 PDT 2013
Hi,
2013/4/13 Jonathan Haws <Jonathan.Haws at sdl.usu.edu>:
> However, I don't have X setup or configured since I don't need it or want it. Is there a way around this? Is there a way I can get X configured solely to provide me with this? Can I simply pass a NULL pointer to this (I would doubt it)? I don't want to do any sort of displaying of the video - just decoding.
>
> Are there better ways to do this? Am I on the right track? How can I get my headless system ready to use VAAPI without a full blown window manager?
You need to look into the VA/DRM API. I think I had sample code set in
place in hwdecode-demos (vo_drm.c). This will work as long as you
don't have an X server running and that you don't expect several users
to do the same thing at the same time, i.e. access to the HW.
It's very simple, you just need to create a VA display with
vaGetDisplayDRM() instead of vaGetDisplay() used for X11. In the
former case, you pass on a file descriptor to an open GPU device.
Either you use libudev to determine the correct device path, or you
have a consistent system and you could just open /dev/dri/card0
instead.
Regards,
Gwenole.
More information about the Libva
mailing list