Load different video drivers according to video codecs

BZ: 98522

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=

Change-Id: I671fb8817e2f76eb8f4baaf8d63cdbc75ba90f77
Signed-off-by: Fei Jiang <fei.jiang@intel.com>
Reviewed-on: http://android.intel.com:8080/102308
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
2 files changed