GStreamer移植

1. glib2移植

注意:不要设置环境变量

1.1 下载glib2

http://www.linuxfromscratch.org/blfs/view/svn/general/glib2.html

1.2 host 编译glib2

./configure

make&make install

获得 glib-compile-schemas 工具,导出其所在路径到PATH

1.3 交叉编译glib2

./configure CC=arm-none-linux-gnueabi-gcc --host=arm-linux --prefix=/home/vincent/project/g30/Rootfs/usr glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes ac_cv_lib_rt_clock_gettime=no glib_cv_monotonic_clock=yes

make&make install

2. gstreamer移植

2.1 下载

http://gstreamer.freedesktop.org/modules/

2.2 交叉编译

CC=arm-none-linux-gnueabi-gcc PKG_CONFIG_PATH=/home/vincent/project/g30/Rootfs/usr/lib/pkgconfig ./configure --build=i686-linux --host=arm-none-linux --prefix=/home/vincent/project/g30/Rootfs/usr --enable-playbin2 --disable-loadsave --disable-gtk-doc ac_cv_func_register_printf_function=no --disable-tests --disable-valgrind 

make&make install


3. 测试

制定头文件路径

-I$(TARGET_USR)/include/gstreamer-1.0 -I$(TARGET_USR)/include/glib-2.0

注:需将 glibconfig.h文件拷贝至$(TARGET_USR)/include/glib-2.0目录

指定连接库:

gstreamer:`pkg-config --cflags --libs gstreamer-1.0`

libffi:-lffi





你可能感兴趣的:(glib,gstreamer)