GStreamer (四)交叉编译
交叉编译
- 下载链接库
- 交叉编译
- 1、下载Gstreamer (方式二 ),进入到编译目录
- 2、在gst-build目录下创建交叉编译配置文件cross_file.txt
- 3、修改meson_options.txt中libmount选项为false,否则编译前需要先编译libmount。
- 4、在gst-build目录执行meson 命令:
- 5、编译
- 6、将编译好的gstreamer安装到指定的pefix目录。
- 参考
下载链接库
编译Gstreamer需要依赖其他的链接库,比如:zlib,libffi,libxml,orc,x264,glib,gettext,openssl
链接库地址:http://sources.webos-ports.org/?login=from_csdn
Gstreamer官网:https://gstreamer.freedesktop.org/
Gstreamer下载地址:
方式一:https://gstreamer.freedesktop.org/src/?login=from_csdn
方式二:
git clone https://gitlab.freedesktop.org/gstreamer/gst-build.git -b 1.18
交叉编译
1、下载Gstreamer (方式二 ),进入到编译目录
cd gst-build
2、在gst-build目录下创建交叉编译配置文件cross_file.txt
pkg_config_libdir为交叉编译工具链pkgconfig路径
[properties]
pkg_config_libdir = ['/usr/local/complie_tool/fsl-linaro-toolchain/arm-fsl-linux-gnueabi/multi-libs/default/usr/lib/pkgconfig']
c_args = ['-std=gnu99', '-D_GNU_SOURCE'][binaries]
c = 'arm-none-linux-gnueabi-gcc'
cpp = 'arm-none-linux-gnueabi-g++'
ar = 'arm-none-linux-gnueabi-ar'
strip = 'arm-none-linux-gnueabi-strip'
pkgconfig = 'pkg-config'[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'ARMv9'
endian = 'little'[build_machine]
system = 'linux'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
3、修改meson_options.txt中libmount选项为false,否则编译前需要先编译libmount。
路径:gst-build/subprojects/glib/meson_options.txt
option('libmount',type : 'boolean',value : false,description : 'build with libmount support')
4、在gst-build目录执行meson 命令:
meson --prefix=/home/zhy/code/rIoTboard/gstreamer --cross-file cross_file.txt build/
运行成功后出现如下信息:
5、编译
ninja -C build
编译成功后会有如下信息
6、将编译好的gstreamer安装到指定的pefix目录。
meson install -C build
参考
https://blog.csdn.net/m0_61442303/article/details/147063979
https://blog.csdn.net/qq_38694388/article/details/121888235