Skip to content

mintaka33/media

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Media Driver

Build instructions

1. Build libva

cd libva

./autogen.sh CFLAGS=-g CXXFLAGS=-g

make

sudo make install

2. Build driver

mkdir build

cd build

cmake ../media-driver \
-DCMAKE_INSTALL_PREFIX=/usr \
-DMEDIA_VERSION="2.0.0" \
-DBUILD_ALONG_WITH_CMRTLIB=1 \
-DBS_DIR_GMMLIB=`pwd`/../gmmlib/Source/GmmLib/ \
-DBS_DIR_COMMON=`pwd`/../gmmlib/Source/Common/ \
-DBS_DIR_INC=`pwd`/../gmmlib/Source/inc/ \
-DBS_DIR_MEDIA=`pwd`/../media-driver

make -j8

sudo make install

note: if build debug version driver, add below line in cmake command

-DBUILD_TYPE=Debug

3. Build libva-utils

cd libva-utils

./autogen.sh CFLAGS=-g CXXFLAGS=-g

make

sudo make install

Run driver

1. Set environment variables

  • Edit .bashrc file
cd ~
nano .bashrc
  • Add below lines at the bottom of .bashrc file
export LD_LIBRARY_PATH=/usr/local/lib
export LIBVA_DRIVERS_PATH=/usr/local/lib/dri
export LIBVA_DRIVER_NAME=iHD
  • Restart terminal

2. Run libva-utils sample applications

  • Run vainfo to query driver capabilities
cd libva-utils/vainfo

./vainfo
  • Run decode test
cd libva-utils/decode

./mpeg2vldemo
  • Run encode test
cd libva-utils/encode

./avcenc

Reference

1. libva

2. media-driver

3. gmmlib

4. libva-utils