This repository has been archived by the owner on Apr 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Zhao, Halley edited this page Jul 9, 2014
·
23 revisions
- git clone git://anongit.freedesktop.org/vaapi/libva
- git clone git://anongit.freedesktop.org/vaapi/intel-driver
- git clone https://github.com/01org/libyami.git
- git clone https://github.com/01org/omxil_core.git omxil-core
- git clone https://github.com/01org/omx_comp.git omx-components
- git clone https://github.com/01org/gst-omx.git
now, we uses Ubuntu 13.10 with its default GStreamer packages (1.2 version).
#!/bin/sh
export OMX_ROOT_DIR="/opt/omx"
export GST_OMX_CONFIG_DIR="/home/halley/gst-omx-conf"
export VAAPI_PREFIX="${OMX_ROOT_DIR}/vaapi"
export LIBYAMI_PREFIX="${OMX_ROOT_DIR}/libyami"
export OMXCOMPONENT_PREFIX="${OMX_ROOT_DIR}/omx"
export GSTOMX_PREFIX="${OMX_ROOT_DIR}/gst-omx"
ADD_PKG_CONFIG_PATH="${VAAPI_PREFIX}/lib/pkgconfig/:${LIBYAMI_PREFIX}/lib/pkgconfig/:${OMXCOMPONENT_PREFIX}/lib/pkgconfig/:/usr/lib/x86_64-linux-gnu/pkgconfig/"
ADD_LD_LIBRARY_PATH="${VAAPI_PREFIX}/lib/:${LIBYAMI_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 "* LIBYAMI_PREFIX: ${LIBYAMI_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 "* libyami: git clean -dxf && ./autogen.sh --prefix=\$LIBYAMI_PREFIX && make -j8 && make install"
echo "* omx: git clean -dxf && sh autogen.sh && ./configure --prefix=\$OMXCOMPONENT_PREFIX --enable-libyami --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"
$ 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
[omxmjpegdec]
type-name=GstOMXMJPEGDec
core-name=/opt/omx/omx/lib/libOmxCore.so.0
component-name=OMX.Intel.VideoDecoder.MJPEG
rank=256
in-port-index=0
out-port-index=1
hacks=drain-may-not-return
[omxh264enc]
type-name=GstOMXH264Enc
core-name=/opt/omx/omx/lib/libOmxCore.so.0
component-name=OMX.Intel.VideoEncoder.AVC
rank=256
in-port-index=0
out-port-index=1
hacks=drain-may-not-return
// h264 playback
gst-launch-1.0 filesrc location= /path/to/h264/file ! qtdemux ! h264parse ! omxh264dec ! videoconvert ! ximagesink
// vp8 playback
gst-launch-1.0 filesrc location= /path/to/vp8/ivf/file ! ivfparse ! omxvp8dec ! videoconvert ! ximagesink
// jpeg decoder with camera
gst-launch-1.0 v4l2src num-buffers=50 ! image/jpeg ! jpegparse ! omxmjpegdec ! videoconvert ! ximagesink
// jpeg decoder with local media file
gst-launch-1.0 filesrc location= /home/halley/media/video/Baby_PCM_mJPEG.AVI ! avidemux ! image/jpeg ! jpegparse ! omxmjpegdec ! videoconvert ! ximagesink
// h264 encoder
gst-launch-1.0 videotestsrc num-buffers=100 ! omxh264enc ! filesink location=1.264
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:
## install the gst-omx lib for another time
make -j 8 && make install
gst-inspect-1.0 --gst-plugin-path=/path/to/gst-omx/plugin