Chinaunix首页 | 论坛 | 博客
  • 博客访问: 512911
  • 博文数量: 174
  • 博客积分: 8001
  • 博客等级: 中将
  • 技术积分: 1840
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-04 19:30
文章分类

全部博文(174)

文章存档

2011年(1)

2010年(24)

2009年(149)

我的朋友

分类: LINUX

2009-05-10 22:00:33

从提供的demo的脚步入手研究:
 
decode_avi.sh
 

. ./target_gst.sh
. ../shared/decode_avi.sh

target_gst.sh

#------------------------------------------------------------------# Set GStreamer attributes for this platform
#------------------------------------------------------------------
PLATFORM=dm355
. ../shared/target_env.sh

# Audio / Video Decode defaults
audio_plugin="mad"
audiocodecName=""
video_plugin="TIViddec2"
videocodeName="mpeg4dec"
soundStd="oss"
dispStd="fbdev"
dispDevice=""
videoStd="D1_NTSC"
videoOut="COMPOSITE"
resizer="FALSE";
accelFrameCopy="TRUE"

# Imaging defaults
encode_image_plugin="TIImgenc1"
decode_image_plugin="TIImgdec1"
resolution="720x480"
inputcolorSpace="UYVY"
outputcolorSpace="UYVY"
qValue="75"

target_env.sh

#------------------------------------------------------------------
# Configure the target filesystem and environment
#------------------------------------------------------------------
GSTREAMER_INSTALL_DIR=/opt/gstreamer
GSTINSPECT=gst-inspect
GSTLAUNCH=gst-launch

# Make sure we store the registry cache in /tmp so we don't fail when running
# from a read-only file system. If we don'
t do this, GStreamer tries to
# create the cache in the current directory.
export GST_REGISTRY=/tmp/gst_registry.bin

# Configure our LD_LIBRARY_PATH so GStreamer applications can find shared
# object libraries while loading.
export LD_LIBRARY_PATH=${GSTREAMER_INSTALL_DIR}/lib

# Set the GST_PLUGIN_PATH to the directory where GStreamer should look for
# its plugins
export GST_PLUGIN_PATH=${GSTREAMER_INSTALL_DIR}/lib/gstreamer-0.10

# Put the GStreamer binaries in our path
export PATH=${GSTREAMER_INSTALL_DIR}/bin:$PATH

/shared/decode_avi.sh

#------------------------------------------------------------------
# Execute common code
#------------------------------------------------------------------
cat /dev/zero > /dev/fb/2 2>/dev/null
. ../shared/process_avopts.sh
. ../shared/run_pipe.sh

#------------------------------------------------------------------
# Enable debugging flags (optional)
#------------------------------------------------------------------
#DEBUG="--gst-debug-no-color --gst-debug=${audio_plugin}:5"
#DEBUG="--gst-debug-no-color --gst-debug=${video_plugin}:5"
#DEBUG="--gst-debug-no-color --gst-debug=TIDmaiVideoSink:5"
#DEBUG="--gst-debug-no-color --gst-debug=TIDmaiVideoSink:*"
#DEBUG="--gst-debug-no-color --gst-debug=GST_PLUGIN_LOADING:*"
DEBUG="--gst-debug-no-color --gst-debug=TI*:2"

#-----------------------------------------------------------------
# Execute the pipeline
#------------------------------------------------------------------
run_pipe "${GSTLAUNCH} ${DEBUG} filesrc location=$fileName ! typefind ! avidemux name=demux demux.audio_00 ! queue max-size-buffers=1200 max-size-time=0 max-size-bytes=0 ! typefind ! ${audio_plugin} ${audio_plugin_args} ! ${audio_sink} demux.video_00 ! typefind ! ${video_plugin} ${video_plugin_args} ! ${video_sink} ${rotation_opts}"
exit $?

阅读(1931) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~