Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.
halleyzhao edited this page Mar 26, 2014 · 23 revisions

related git repos

  1. git clone -b staging git://anongit.freedesktop.org/vaapi/libva
  2. git clone -b staging git://anongit.freedesktop.org/vaapi/intel-driver
  3. git clone -b staging https://github.com/halleyzhao/omxil_core.git
  4. git clone -b staging https://github.com/halleyzhao/omx_comp.git
  5. git clone [email protected]:01org/libvacodec.git
  6. git clone https://github.com/01org/gst-omx.git

my sample build env

#!/bin/sh
export OMX_ROOT_DIR="/opt/omx"
export GST_OMX_CONFIG_DIR="/home/halley/f-libvacodec/gst-omx-conf"

export VAAPI_PREFIX="${OMX_ROOT_DIR}/vaapi"
export LIBVACODEC_PREFIX="${OMX_ROOT_DIR}/libvacodec"
export OMXCOMPONENT_PREFIX="${OMX_ROOT_DIR}/omx"
export GSTOMX_PREFIX="${OMX_ROOT_DIR}/gst-omx"

ADD_PKG_CONFIG_PATH="${VAAPI_PREFIX}/lib/pkgconfig/:${LIBVACODEC_PREFIX}/lib/pkgconfig/:${OMXCOMPONENT_PREFIX}/lib/pkgconfig/:/usr/lib/x86_64-linux-gnu/pkgconfig/"
ADD_LD_LIBRARY_PATH="${VAAPI_PREFIX}/lib/:${LIBVACODEC_PREFIX}/lib/:${OMXCOMPONENT_PREFIX}/lib/"
ADD_PATH="${VAAPI_PREFIX}/bin/"

PLATFORM_ARCH_64=`uname -a | grep x86_64`
if [ -n "$PKG_CONFIG_PATH" ]; then
	export PKG_CONFIG_PATH="${ADD_PKG_CONFIG_PATH}:$PKG_CONFIG_PATH"
elif [ -n "$PLATFORM_ARCH_64" ]; then
	export PKG_CONFIG_PATH="${ADD_PKG_CONFIG_PATH}:/usr/lib/pkgconfig/:/usr/lib/i386-linux-gnu/pkgconfig/"
else 
	export PKG_CONFIG_PATH="${ADD_PKG_CONFIG_PATH}:/usr/lib/pkgconfig/:/usr/lib/x86_64-linux-gnu/pkgconfig/"
fi

export LD_LIBRARY_PATH="${ADD_LD_LIBRARY_PATH}:$LD_LIBRARY_PATH"

export PATH="${ADD_PATH}:$PATH"
export GST_PLUGIN_PATH_1_0="${GSTOMX_PREFIX}/lib/gstreamer-1.0/"

echo "*======================current configuration============================="
echo "* VAAPI_PREFIX:               $VAAPI_PREFIX"
echo "* LIBVACODEC_PREFIX:          ${LIBVACODEC_PREFIX}"
echo "* OMXCOMPONENT_PREFIX:        ${OMXCOMPONENT_PREFIX}"
echo "* GSTOMX_PREFIX:              ${GSTOMX_PREFIX}"
echo "* LD_LIBRARY_PATH:            ${LD_LIBRARY_PATH}"
echo "* PATH:                       $PATH"
echo "*========================================================================="

echo "* make sure to update your gst conf file (in ${GST_OMX_CONFIG_DIR})"

echo "* vaapi:          git clean -dxf && ./autogen.sh --prefix=\$VAAPI_PREFIX && make -j8 && make install"
echo "* libvacodec:     git clean -dxf && ./autogen.sh --prefix=\$LIBVACODEC_PREFIX && make -j8 && make install"
echo "* omx component:  git clean -dxf && sh autogen.sh && ./configure --prefix=\$OMXCOMPONENT_PREFIX --enable-libvacodec --enable-native-buffer=no --enable-vp8-role-name  && make -j8 && make install"
echo "* gst-omx:        git clean -dxf && ./autogen.sh --prefix=\$GSTOMX_PREFIX --with-omx-target=bellagio --with-omx-header-path=/opt/omx/omx/include/omx && make -j8 && make install"

gst-omx-conf

$ cat gstomx.conf 
[omxh264dec]
type-name=GstOMXH264Dec
core-name=/opt/omx/omx/lib/libOmxCore.so.0
component-name=OMX.Intel.VideoDecoder.AVC
rank=256
in-port-index=0
out-port-index=1
hacks=drain-may-not-return

[omxvp8dec]
type-name=GstOMXVP8Dec
core-name=/opt/omx/omx/lib/libOmxCore.so.0
component-name=OMX.Intel.VideoDecoder.VP8
rank=256
in-port-index=0
out-port-index=1
hacks=drain-may-not-return

sample command to run

gst-launch-1.0 filesrc location= /path/to/h264/file ! qtdemux ! h264parse ! omxh264dec ! videoconvert ! ximagesink
gst-launch-1.0 filesrc location= /path/to/vp8/ivf/file ! ivfparse ! omxvp8dec ! videoconvert ! ximagesink

save gst-omx element back from blacklist

sometimes omxdech264 is blacklisted (maybe after an unsuccessful build). the symptom is:

gst-inspect-1.0 doesn't show it (omxdech264)
gst-inspect-1.0 /path/to/gst-omx/plugin does show it (omxdech264)
you can see it by gst-inspect-1.0 -b 

our GST_PLUGIN_PATH_1_0 doesn't save it back to life the following works for me:

gst-inspect-1.0 --gst-plugin-patch=/path/to/gst-omx/plugin
Clone this wiki locally