LeopardBoard 365 GStreamer Pipelines - Legacy SDK

From RidgeRun Developer Connection

Revision as of 22:41, 10 September 2010 by Pbarrantes (Talk | contribs)
Jump to:navigation, search

The following examples show the usage of GStreamer with the RR DM365 Leopard board SDK. All the commands indicated in this examples are intended to be executed on the target, NOT the host.

Contents

Audio in

Connect an audio player device to the MIC jack and speakers/headphones to the OUT jack. Play some audio on the device and execute the next pipeline

gst-launch autoaudiosrc ! alsasink

The sound should be heard on the headphones/speakers If the audio volume is too low, edit it by typing:

alsamixer

then increase the PCM level. Also if the sound is noisy activate the AGC option using alsamixer (key M toggles between mute and active).

Audio playback

gst-launch audiotestsrc ! alsasink

If the audio volume is too low, edit it by typing:

alsamixer

then increase the PCM level

Video initialization

When you boot your board the RidgeRun logo will be displayed, in order to display video the following commands must be executed:

loadmodules.sh
fbset -disable

Component output initialization

There's a known bug with the component output initialization. Before you play or capture video using the component output this commands must be executed on the target:

echo "COMPOSITE" > /sys/class/davinci_display/ch0/output
echo "COMPONENT" > /sys/class/davinci_display/ch0/output

Video and audio playback

QT_AV_FILE=big_buck_bunny_720p_h264.mov

wget http://mirror.bigbuckbunny.de/peach/bigbuckbunny_movies/$QT_AV_FILE

gst-launch filesrc location=$QT_AV_FILE ! qtdemux  name=demux ! queue ! dmaidec_h264 numOutputBufs=14 ! priority nice=-10 !  \
queue ! priority nice=-10 ! dmaiperf ! TIDmaiVideoSink  accelFrameCopy=true videoOutput=component videoStd=720P_60 \
demux.audio_00 !queue ! priority nice=-5 ! dmaidec_aac ! alsasink

NOTE: Depending on the video displayed, the CMEM pools need to be modified to meet the requirements. This is needed when you execute a pipeline and the following error is displayed:

 CMEMK Error: Failed to find a pool which fits <poolsize>

First you need the start and end addresses of the CMEM pools, these can be obtained executing loadmodules.sh and checking the output: a line like the next one will be printed

Loading CMEM from 0x<startaddr> to 0x<endaddr>

then type:

rmmod cmemk
modprobe cmemk phys_start=<startaddr> phys_end=<endaddr> pools=<somepools>, <mynewpools>

where <mynewpools> must be in format: <numberofpools>x<poolsize> (e.g 2x128). You may also need to resize/delete <somepools>

Video playback

gst-launch videotestsrc ! TIDmaiVideoSink
gst-launch filesrc location= <filename>.mp4 ! qtdemux  name=demux ! queue ! dmaidec_mpeg4 numOutputBufs=14 ! TIDmaiVideoSink videoOutput=component videoStd=720P_60
gst-launch filesrc location= <filename>.mp4 ! qtdemux  name=demux ! queue ! dmaidec_mpeg4 numOutputBufs=14 ! TIDmaiVideoSink videoOutput=DVI videoStd=720P_60
gst-launch filesrc location= <filename>.mp4 ! qtdemux  name=demux ! queue ! dmaidec_h264 ! TIDmaiVideoSink videoOutput=composite videoStd=D1_NTSC

Video capture

The previewer and resizer for video capture must be initialized by the user. In order to do that the application named IPIPE initializer must be installed on the target. On the configuration screen (make config) go to File System Configuration->Select target's file system software and select it.

Once it is installed, the previewer and resizer can be initialized by typing:

ipipe_init -d 1

The application has another options like white balance and brightness/contrast adjustment. You can explore them by using --help.

NOTE: The initialization must be done before any video capture session.

gst-launch -e v4l2src always-copy=false ! video/x-raw-yuv,format=\(fourcc\)UYVY, width=640, height=480, framerate=\(fraction\)30/1 ! dmaiperf ! dmaiaccel ! 
TIDmaiVideoSink sync=false accelFrameCopy=false videoOutput=composite videoStd=D1_NTSC
gst-launch -e v4l2src always-copy=false ! video/x-raw-yuv,format=\(fourcc\)UYVY, width=1280, height=720, framerate=\(fraction\)23/1 ! dmaiaccel ! dmaiperf ! 
TIDmaiVideoSink videoOutput=component sync=false accelFrameCopy=true videoStd=720P_60
gst-launch -e v4l2src always-copy=false ! video/x-raw-yuv,format=\(fourcc\)UYVY, width=1280, height=720, framerate=\(fraction\)23/1 ! dmaiaccel ! dmaiperf !
TIDmaiVideoSink videoOutput=DVI sync=false accelFrameCopy=true videoStd=720P_60
Navigation
Toolbox