GStreamer应用开发手册
Foreword 前言
安装GStreamer
在linux系统上安装
教程
基础教程
基础教程 1:世界你好!
基础教程 2:GStreamer 概念
基础教程 3:动态管道
Plugin 写作指南
导言
序言
基础
编写插件
构建模板
-
+
首页
在linux系统上安装
## Prerequisites 先决条件 GStreamer is included in all Linux distributions. We recommend using the latest version of a fast moving distribution such as Fedora, Ubuntu (non-LTS), Debian sid or OpenSuse to get a recent GStreamer release. 所有 Linux 发行版都包含 GStreamer。我们建议使用最新版本的快速发行版,如 Fedora、Ubuntu(非 LTS)、Debian sid 或 OpenSuse,以获得最新的 GStreamer 版本。 All the commands given in this section are intended to be typed in from a terminal. 本节给出的所有命令均可从终端输入。 ***Warning:*** *Make sure you have superuser (root) access rights to install GStreamer. 确保拥有超级用户(root)访问权限才能安装 GStreamer。* ## Install GStreamer on Fedora 在 Fedora 上安装 GStreamer Run the following command: 运行以下命令 ``` dnf install gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-doc gstreamer1-plugins-base-devel gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras ``` ## Install GStreamer on Ubuntu or Debian 在 Ubuntu 或 Debian 上安装 GStreamer Run the following command: 运行以下命令 ``` apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio ``` ## Building applications using GStreamer 使用 GStreamer 构建应用程序 The only other “development environment” that is required is the gcc compiler and a text editor. In order to compile code that requires GStreamer and uses the GStreamer core library, remember to add this string to your gcc command: 唯一需要的其他 "开发环境 "是 gcc 编译器和文本编辑器。为了编译需要 GStreamer 和使用 GStreamer 核心库的代码,请记住在 gcc 命令中添加此字符串: ``` pkg-config --cflags --libs gstreamer-1.0 ``` If you're using other GStreamer libraries, e.g. the video library, you have to add additional packages after gstreamer-1.0 in the above string (gstreamer-video-1.0 for the video library, for example). 如果使用其他 GStreamer 库,例如视频库,则必须在上述字符串中的 gstreamer-1.0 之后添加其他软件包(例如视频库的 gstreamer-video-1.0)。 If your application is built with the help of libtool, e.g. when using automake/autoconf as a build system, you have to run the configure script from inside the gst-sdk-shell environment. 如果您的应用程序是在 libtool 的帮助下构建的,例如使用automake/autoconf 作为构建系统时,您必须在 gst-sdk-shell 环境中运行 configure 脚本。 ### Getting the tutorial's source code 获取教程的源代码 The source code for the tutorials can be copied and pasted from the tutorial pages into a text file, but, for convenience, it is also available in a GIT repository in the subprojects/gst-docs/examples/tutorials subdirectory. 教程的源代码可以从教程页面复制并粘贴到文本文件中,但为了方便起见,也可以从 subprojects/gst-docs/examples/tutorials 子目录下的 GIT 代码库中获取。 The GIT repository can be cloned with: 克隆 GIT 仓库时可以使用 ``` git clone https://gitlab.freedesktop.org/gstreamer/gstreamer ``` ### Building the tutorials 建立教程 ``` gcc basic-tutorial-1.c -o basic-tutorial-1 `pkg-config --cflags --libs gstreamer-1.0` ``` Using the file name of the tutorial you are interested in (basic-tutorial-1 in this example). 使用您感兴趣的教程的文件名(本例中为 basic-tutorial-1)。 ***Warning:*** *Depending on the GStreamer libraries you need to use, you will have to add more packages to the pkg-config command, besides gstreamer-1.0 At the bottom of each tutorial's source code you will find the command for that specific tutorial, including the required libraries, in the required order. When developing your own applications, the GStreamer documentation will tell you what library a function belongs to. 根据您需要使用的 GStreamer 库,除了 gstreamer-1.0 命令外,您还需要在 pkg-config 命令中添加更多软件包。在每个教程的源代码底部,您都可以找到该教程的命令,包括所需的库,并按照规定的顺序排列。* ### Running the tutorials 运行教程 To run the tutorials, simply execute the desired tutorial: 要运行教程,只需执行所需的教程即可: ``` ./basic-tutorial-1 ```
admin
2024年4月21日 15:32
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
分享
链接
类型
密码
更新密码