2024年2月22日发(作者:京碧琴)
交叉编译Gstreamer
准备环境:
export CC=arm-none-linux-gnueabi-gcc
export CXX=arm-none-linux-gnueabi-g++
export RANLIB=arm-none-linux-gnueabi-ranlib
export STRIP=arm-none-linux-gnueabi-strip
export AS=arm-none-linux-gnueabi-as
export AR=arm-none-linux-gnueabi-ar
export LD=arm-none-linux-gnueabi-ld
export HOST_CXX=c++
export HOST_CC=gcc
export HOST_RANLIB=ranlib
export HOST_STRIP=strip
export HOST_AS=as
export HOST_AR=ar
export HOST_LD=ld
export
PATH=/home/sns/CodeSourcery/Sourcery_G++_Lite/bin:/home/sns/j2sdk1.4.2_18/bin:$PATH
export XORG_PREFIX="/home/sns/xorg/dist"
export CFLAGS="-I$XORG_PREFIX/include"
export LDFLAGS="-L$XORG_PREFIX/lib -Wl,-rpath=$XORG_PREFIX/lib"
export
PKG_CONFIG_PATH=$XORG_PREFIX/local/lib/pkgconfig:$XORG_PREFIX/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig
export LD_LIBRARY_PATH=$XORG_PREFIX/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=$XORG_PREFIX/bin:$LD_RUN_PATH
export LIBXCB_ALLOW_SLOPPY_LOCK=1
export XML_CFLAGS=-I$XORG_PREFIX/include/libxml2
export XML_LIBS="-L$XORG_PREFIX/lib -lxml2"
export GTK_CFLAGS=-I$XORG_PREFIX/include/gtk-2.0
export GTK_LIBS="-L$XORG_PREFIX/lib -lgtk-x11-2.0"
export X_CFLAGS=-I$XORG_PREFIX/include
export X_LIBS=-L$XORG_PREFIX/lib
编译依赖包:
##liboil
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
##libogg
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
##libvorbis
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
##alsa
./configure
##gstreamer
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --enable-plugin --enable-registry --enable-nls
--enable-examples --enable-tests && make install
##gst-plugin-base
##echo ac_cv_lib_Xv_XvQueryExtension=yes>>
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --enable-largefile --enable-adder --enable-app
--enable-audioconvert --enable-audiorate --enable-audiotestsrc
--enable-ffmpegcolorspace --enable-gdp --enable-playback --enable-audioresample
--enable-subparse --enable-tcp --enable-typefind --enable-videotestsrc
--enable-videorate --enable-videoscale --enable-volume --enable-x --enable-xvideo
--enable-xshm --enable-gst_v4l --enable-alsa --enable-ogg --enable-oggtest
--enable-pango
--enable-shave
--enable-vorbis --enable-vorbistest --enable-freetypetest
--disable-gnome_vfs --with-plugins --with-x --with-gudev
--with-ogg-libraries=$XORG_PREFIX/lib
--with-vorbis=$XORG_PREFIX
--with-ft-prefix=$XORG_PREFIX
--prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
--with-ogg=$XORG_PREFIX
--with-ogg-includes=$XORG_PREFIX/include
--with-vorbis-libraries=$XORG_PREFIX/lib
--with-vorbis-includes=$XORG_PREFIX/include
--with-ft-exec-prefix=$XORG_PREFIX/bin
extra:
--with-default-audiosink --with-default-audiosrc --with-default-videosink
--with-default-videosrc --with-default-visualizer --with-audioresample-format
--with-x --with-gudev --with-ogg=$XORG_PREFIX
--with-ogg-libraries=$XORG_PREFIX/lib --with-ogg-includes=$XORG_PREFIX/include
--with-vorbis=$XORG_PREFIX --with-vorbis-libraries=$XORG_PREFIX/lib
--with-vorbis-includes=$XORG_PREFIX/include
--with-ft-exec-prefix=$XORG_PREFIX/bin
simple:
./configure --prefix=$XORG_PREFIX
--with-ft-prefix=$XORG_PREFIX
--host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --without-check --disable-gtk-doc --disable-alsa
--disable-theora --disable-vorbistest --disable-valgrind --disable-cdparanoia
##gst-plugin-good
./configure --prefix=$XORG_PREFIX
--enable-audiorate
--host=arm-none-linux-gnueabi
--enable-audiotestsrc
--target=arm-none-linux-gnueabi --enable-largefile --enable-adder --enable-app
--enable-audioconvert
--enable-ffmpegcolorspace --enable-gdp --enable-playback --enable-audioresample
--enable-subparse --enable-tcp --enable-typefind --enable-videotestsrc
--enable-videorate --enable-videoscale --enable-volume --enable-x --enable-xvideo
--enable-xshm --enable-gst_v4l --enable-alsa --enable-ogg --enable-oggtest
--enable-pango --enable-vorbis --enable-vorbistest --enable-freetypetest
--enable-shave --disable-gnome_vfs && make && make install
执行:
gst-launch --gst-debug-no-color --gst-debug=TI*:2 filesrc
location=../../media_files/4 ! typefind ! qtdemux
name=demux io_00 ! queue max-size-buffers=8000 max-size-time=0
max-size-bytes=0 ! typefind ! TIAuddec1 ! audioconvert ! audio/x-raw-int,
width=16, depth=16 ! alsasink d _00 ! typefind ! TIViddec2 !
TIDmaiVideoSink displayStd=v4l2 displayDevice=/dev/video1 videoStd=VGA
videoOutput=LCD resizer=FALSE accelFrameCopy=FALSE rotation=90
aalib
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
audiofile
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
esound
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
orbit:
echo ac_cv_c_bigendian=yes>>
echo ac_cv_alignof_CORBA_octet=1>>
echo ac_cv_alignof_CORBA_boolean=4>>
echo ac_cv_alignof_CORBA_char=1>>
echo ac_cv_alignof_CORBA_wchar=2>>
echo ac_cv_alignof_CORBA_short=2>>
echo ac_cv_alignof_CORBA_long=4>>
echo ac_cv_alignof_CORBA_long_long=8>>
echo ac_cv_alignof_CORBA_float=4>>
echo ac_cv_alignof_CORBA_double=8>>
echo ac_cv_alignof_CORBA_long_double=16>>
echo ac_cv_alignof_CORBA_struct=1>>
echo ac_cv_alignof_CORBA_pointer=4>>
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --cache-file= && make && make
install
若出现idl-compiler不能执行,那么重新解压,然后用不是交叉编译的方式编译,然后将idl-compiler拷贝替换掉交叉编译里面的
gconf
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
libcaca
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
libshout
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
libproxy
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
proxy.c:(.text+0xe4): undefined reference to `rpl_malloc'
解:#undef malloc
libsoup
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --without-gnome && make && make install
gst-plugin-good
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --enable-examples --enable-gconftool
--enable-videofilter --enable-alpha
--enable-auparse --enable-autodetect
--enable-apetag
--enable-avi
--enable-audiofx
--enable-cutter
--enable-debugutils --enable-deinterlace --enable-effectv --enable-equalizer
--enable-flv --enable-id3demux --enable-icydemux --enable-interleave --enable-flx
--enable-goom --enable-goom2k1 --enable-law --enable-level --enable-matroska
--enable-monoscope --enable-multifile --enable-multipart --enable-qtdemux
--enable-replaygain --enable-rtp --enable-rtsp --enable-smpte --enable-spectrum
--enable-udp --enable-videobox --enable-videocrop --enable-videomixer
--enable-wavenc --enable-wavparse --enable-y4m --enable-directso
--with-libv4l2 --with-x --with-aalib-prefix=$XORG_PREFIX/lib
--with-aalib-exec-prefix=$XORG_PREFIX/bin --with-esd-prefix=$XORG_PREFIX
--with-esd-exec-prefix=$XORG_PREFIX/bin --with-shout2-prefix=$XORG_PREFIX
extra:
--with-default-audiosrc
--with-default-visualizer
--with-default-videosink --with-default-videosrc
--with-libv4l2 --with-x
--with-aalib-exec-prefix=$XORG_PREFIX/lib
--with-esd-exec-prefix=$XORG_PREFIX/bin
--with-aalib-prefix=$XORG_PREFIX/lib
--with-esd-prefix=$XORG_PREFIX
--with-shout2-prefix=$XORG_PREFIX
今天重新对GStreamer-0.10.22 进行了安装,安装步骤如下:
-、安装glib-2.18.4
cd glib-2.18.4
./configure
make
make install
二、设置环境变量
export
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH
三、安装/
四、安装gstreamer-0.10.22
cd gstreamer-0.10.22
./configure
make
make install
五、安装liboil-0.3.16
cd liboil-0.3.16
./configure
make
make install
六、安装gst-plugins-base-0.10.22
cd gst-plugins-base-0.10.22
./configure
make
make install
七、安装gst-plugins-good-0.10.14
cd gst-plugins-good-0.10.614
./configure
make
make install
到此可以用gst-launch -vm audiotestsrc ! audioconvert ! audioresample ! osssink
测试能在杨声器里听到蜂鸣音
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --x-includes=/home/sns/xorg/dist/include
--x-libraries=/home/sns/xorg/dist/lib && make && make install
2024年2月22日发(作者:京碧琴)
交叉编译Gstreamer
准备环境:
export CC=arm-none-linux-gnueabi-gcc
export CXX=arm-none-linux-gnueabi-g++
export RANLIB=arm-none-linux-gnueabi-ranlib
export STRIP=arm-none-linux-gnueabi-strip
export AS=arm-none-linux-gnueabi-as
export AR=arm-none-linux-gnueabi-ar
export LD=arm-none-linux-gnueabi-ld
export HOST_CXX=c++
export HOST_CC=gcc
export HOST_RANLIB=ranlib
export HOST_STRIP=strip
export HOST_AS=as
export HOST_AR=ar
export HOST_LD=ld
export
PATH=/home/sns/CodeSourcery/Sourcery_G++_Lite/bin:/home/sns/j2sdk1.4.2_18/bin:$PATH
export XORG_PREFIX="/home/sns/xorg/dist"
export CFLAGS="-I$XORG_PREFIX/include"
export LDFLAGS="-L$XORG_PREFIX/lib -Wl,-rpath=$XORG_PREFIX/lib"
export
PKG_CONFIG_PATH=$XORG_PREFIX/local/lib/pkgconfig:$XORG_PREFIX/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig
export LD_LIBRARY_PATH=$XORG_PREFIX/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=$XORG_PREFIX/bin:$LD_RUN_PATH
export LIBXCB_ALLOW_SLOPPY_LOCK=1
export XML_CFLAGS=-I$XORG_PREFIX/include/libxml2
export XML_LIBS="-L$XORG_PREFIX/lib -lxml2"
export GTK_CFLAGS=-I$XORG_PREFIX/include/gtk-2.0
export GTK_LIBS="-L$XORG_PREFIX/lib -lgtk-x11-2.0"
export X_CFLAGS=-I$XORG_PREFIX/include
export X_LIBS=-L$XORG_PREFIX/lib
编译依赖包:
##liboil
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
##libogg
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
##libvorbis
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
##alsa
./configure
##gstreamer
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --enable-plugin --enable-registry --enable-nls
--enable-examples --enable-tests && make install
##gst-plugin-base
##echo ac_cv_lib_Xv_XvQueryExtension=yes>>
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --enable-largefile --enable-adder --enable-app
--enable-audioconvert --enable-audiorate --enable-audiotestsrc
--enable-ffmpegcolorspace --enable-gdp --enable-playback --enable-audioresample
--enable-subparse --enable-tcp --enable-typefind --enable-videotestsrc
--enable-videorate --enable-videoscale --enable-volume --enable-x --enable-xvideo
--enable-xshm --enable-gst_v4l --enable-alsa --enable-ogg --enable-oggtest
--enable-pango
--enable-shave
--enable-vorbis --enable-vorbistest --enable-freetypetest
--disable-gnome_vfs --with-plugins --with-x --with-gudev
--with-ogg-libraries=$XORG_PREFIX/lib
--with-vorbis=$XORG_PREFIX
--with-ft-prefix=$XORG_PREFIX
--prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
--with-ogg=$XORG_PREFIX
--with-ogg-includes=$XORG_PREFIX/include
--with-vorbis-libraries=$XORG_PREFIX/lib
--with-vorbis-includes=$XORG_PREFIX/include
--with-ft-exec-prefix=$XORG_PREFIX/bin
extra:
--with-default-audiosink --with-default-audiosrc --with-default-videosink
--with-default-videosrc --with-default-visualizer --with-audioresample-format
--with-x --with-gudev --with-ogg=$XORG_PREFIX
--with-ogg-libraries=$XORG_PREFIX/lib --with-ogg-includes=$XORG_PREFIX/include
--with-vorbis=$XORG_PREFIX --with-vorbis-libraries=$XORG_PREFIX/lib
--with-vorbis-includes=$XORG_PREFIX/include
--with-ft-exec-prefix=$XORG_PREFIX/bin
simple:
./configure --prefix=$XORG_PREFIX
--with-ft-prefix=$XORG_PREFIX
--host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --without-check --disable-gtk-doc --disable-alsa
--disable-theora --disable-vorbistest --disable-valgrind --disable-cdparanoia
##gst-plugin-good
./configure --prefix=$XORG_PREFIX
--enable-audiorate
--host=arm-none-linux-gnueabi
--enable-audiotestsrc
--target=arm-none-linux-gnueabi --enable-largefile --enable-adder --enable-app
--enable-audioconvert
--enable-ffmpegcolorspace --enable-gdp --enable-playback --enable-audioresample
--enable-subparse --enable-tcp --enable-typefind --enable-videotestsrc
--enable-videorate --enable-videoscale --enable-volume --enable-x --enable-xvideo
--enable-xshm --enable-gst_v4l --enable-alsa --enable-ogg --enable-oggtest
--enable-pango --enable-vorbis --enable-vorbistest --enable-freetypetest
--enable-shave --disable-gnome_vfs && make && make install
执行:
gst-launch --gst-debug-no-color --gst-debug=TI*:2 filesrc
location=../../media_files/4 ! typefind ! qtdemux
name=demux io_00 ! queue max-size-buffers=8000 max-size-time=0
max-size-bytes=0 ! typefind ! TIAuddec1 ! audioconvert ! audio/x-raw-int,
width=16, depth=16 ! alsasink d _00 ! typefind ! TIViddec2 !
TIDmaiVideoSink displayStd=v4l2 displayDevice=/dev/video1 videoStd=VGA
videoOutput=LCD resizer=FALSE accelFrameCopy=FALSE rotation=90
aalib
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
audiofile
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
esound
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
orbit:
echo ac_cv_c_bigendian=yes>>
echo ac_cv_alignof_CORBA_octet=1>>
echo ac_cv_alignof_CORBA_boolean=4>>
echo ac_cv_alignof_CORBA_char=1>>
echo ac_cv_alignof_CORBA_wchar=2>>
echo ac_cv_alignof_CORBA_short=2>>
echo ac_cv_alignof_CORBA_long=4>>
echo ac_cv_alignof_CORBA_long_long=8>>
echo ac_cv_alignof_CORBA_float=4>>
echo ac_cv_alignof_CORBA_double=8>>
echo ac_cv_alignof_CORBA_long_double=16>>
echo ac_cv_alignof_CORBA_struct=1>>
echo ac_cv_alignof_CORBA_pointer=4>>
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --cache-file= && make && make
install
若出现idl-compiler不能执行,那么重新解压,然后用不是交叉编译的方式编译,然后将idl-compiler拷贝替换掉交叉编译里面的
gconf
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
libcaca
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
libshout
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
libproxy
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi && make && make install
proxy.c:(.text+0xe4): undefined reference to `rpl_malloc'
解:#undef malloc
libsoup
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --without-gnome && make && make install
gst-plugin-good
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --enable-examples --enable-gconftool
--enable-videofilter --enable-alpha
--enable-auparse --enable-autodetect
--enable-apetag
--enable-avi
--enable-audiofx
--enable-cutter
--enable-debugutils --enable-deinterlace --enable-effectv --enable-equalizer
--enable-flv --enable-id3demux --enable-icydemux --enable-interleave --enable-flx
--enable-goom --enable-goom2k1 --enable-law --enable-level --enable-matroska
--enable-monoscope --enable-multifile --enable-multipart --enable-qtdemux
--enable-replaygain --enable-rtp --enable-rtsp --enable-smpte --enable-spectrum
--enable-udp --enable-videobox --enable-videocrop --enable-videomixer
--enable-wavenc --enable-wavparse --enable-y4m --enable-directso
--with-libv4l2 --with-x --with-aalib-prefix=$XORG_PREFIX/lib
--with-aalib-exec-prefix=$XORG_PREFIX/bin --with-esd-prefix=$XORG_PREFIX
--with-esd-exec-prefix=$XORG_PREFIX/bin --with-shout2-prefix=$XORG_PREFIX
extra:
--with-default-audiosrc
--with-default-visualizer
--with-default-videosink --with-default-videosrc
--with-libv4l2 --with-x
--with-aalib-exec-prefix=$XORG_PREFIX/lib
--with-esd-exec-prefix=$XORG_PREFIX/bin
--with-aalib-prefix=$XORG_PREFIX/lib
--with-esd-prefix=$XORG_PREFIX
--with-shout2-prefix=$XORG_PREFIX
今天重新对GStreamer-0.10.22 进行了安装,安装步骤如下:
-、安装glib-2.18.4
cd glib-2.18.4
./configure
make
make install
二、设置环境变量
export
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH
三、安装/
四、安装gstreamer-0.10.22
cd gstreamer-0.10.22
./configure
make
make install
五、安装liboil-0.3.16
cd liboil-0.3.16
./configure
make
make install
六、安装gst-plugins-base-0.10.22
cd gst-plugins-base-0.10.22
./configure
make
make install
七、安装gst-plugins-good-0.10.14
cd gst-plugins-good-0.10.614
./configure
make
make install
到此可以用gst-launch -vm audiotestsrc ! audioconvert ! audioresample ! osssink
测试能在杨声器里听到蜂鸣音
./configure --prefix=$XORG_PREFIX --host=arm-none-linux-gnueabi
--target=arm-none-linux-gnueabi --x-includes=/home/sns/xorg/dist/include
--x-libraries=/home/sns/xorg/dist/lib && make && make install