# install dependency for omx encoder
mkdir /CareVision
cd /CareVision
wget http://ftp.us.debian.org/debian/pool/main/g/gnonlin1.0/gstreamer1.0-gnonlin_1.2.1-1_armhf.deb
dpkg -i gstreamer1.0-gnonlin_1.2.1-1_armhf.deb
# install omx encoder
cd /CareVision
sudo wget http://mirror.lemaker.org/omx.tar.gz
sudo tar -zxvf omx.tar.gz
cd omx
sudo chown -R root:root .
sudo ./install.sh
cd ..
rm omx.tar.gz
# install omxh264enc element for gstreamer
cd ..
wget http://mirror.lemaker.org/gstreamer_decoder.tar.bz2
tar xvf gstreamer_decoder.tar.bz2
rm gstreamer_decoder.tar.bz2
mkdir -p /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/config/bellagio
export GST_OMX_CONFIG_DIR=/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/config/bellagio
cd /CareVision/gstreamer_decoder
cp /CareVision/gstreamer_decoder/gstomx.conf /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/config/bellagio
cp /CareVision/gstreamer_decoder/libgstomx.so /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/
cp /CareVision/gstreamer_decoder/libOMX.Action.Video.Encoder.so /usr/lib
cp /CareVision/gstreamer_decoder/libACT_EncAPI.so /usr/lib