Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
82 Views

Linux media sdk as root

I am working to integrate the media sdk into a streaming video application that runs under linux. Does the sdk have to be initialized in an application run as root? When I try to use it as a non-root user the vaInitialize call in DRMLibVA constructor fails. I have ruled out environment variables by setting  any missing ones for the non-root user.

thanks,

bfp

0 Kudos
2 Replies
Highlighted
82 Views

Media SDK itself does not require you to be root.  However, this can happen from time to time due to permissions in the libva/DRM stack.  One of the most common causes is permissions on /dev/dri/card0. Does changing the permissions here or adding yourself to the video group help? 

0 Kudos
Highlighted
Beginner
82 Views

I have already  chmod'ed 666 /dev/dri/card0. To get things to work I found that I had to copy the XAUTHORITY environment variable from root user and give that database 666 permissions. I also had to set a DISPLAY environemnt variable.

I noticed that I needed to do these steps to get vainfo to work. Once that was working I could use the media sdk as non-root user.

I am confused as to why X window envirionment settings appear to be necessary to get the media sdk functioning when I am using DRM mode. Can you shed any light on the architecture?

thanks,bfp

0 Kudos