特别值得一提的是gstreamer有很多值得学习的地方,这里我们主要介绍Ubuntu gstreamer,包括介绍Ubuntu gstreamer编译运行等方面。
Ubuntu下构建Ubuntu gstreamer开发环境 。
Ubuntu已经安装了Ubuntu gstreamer库,因此只需要再安装几个开发库即可
libstreamer0.10-0libstreamer0.10-dev
libstreamer0.10-0-dbg
在新立得里选中应用即可
测试Ubuntu gstreamer开发库
#include <gst/gst.h>
int main (int argc,char *argv[])
{const gchar *nano_str;
guint major, minor, micro, nano;
gst_init (&argc, &argv);
gst_version (&major, &minor, µ, &nano);
if (nano == 1)
nano_str = "(CVS)";
else if (nano == 2)
nano_str = "(Prerelease)";
else
nano_str = "";
printf ("This program is linked against GStreamer %d.%d.%d %s\n",
major, minor, micro, nano_str);
return 0;}
Ubuntu gstreamer编译运行
gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10) hello.c -o hello
./hello
Ubuntu gstreamer运行结果:
This program is linked against GStreamer 0.10.22
【编辑推荐】