Load different video drivers according to video codecs
On the baytrail platform, there are two video decoder hardwares.
The Intel GEN will handle H264 and VC1 decode and VXD will
handle MPEG4, H263 and VP8 decode. GEN uses i965 driver and
VxD uses pvr driver. We have to load different drivers according
to the codec type of the video.
Use setenv before vaInitialize and unsetenv after it can work.
But there is one problem for thumbnail generation case,
multiple threads will call setenv/unsetenv. One thread just call set
env to pvr, but another thread maybe call set env to i915,
which will lead to previous thread didn't load correct library.
The solution here is to pass driver name through vaDisplay
in function vaGetDisplay, change vaDisplay from type unsigned int
to char * and set driver name to vaDisplay.
Take pvr_drv_video for example, need set vaDisplay=
Signed-off-by: Fei Jiang <email@example.com>
Reviewed-by: Shi, PingX <firstname.lastname@example.org>
Tested-by: Shi, PingX <email@example.com>
Reviewed-by: buildbot <firstname.lastname@example.org>
Tested-by: buildbot <email@example.com>
2 files changed