【转】一步一步教你在Ubuntu12.04搭建gstreamer开发环境
原文网址:http://blog.csdn.net/xsl1990/article/details/8333062
闲得蛋疼 无聊寂寞冷 随便写写弄弄
看到网上蛮多搭建gstreamer开发环境
蛋疼的自己写个详细 记录一下 欢迎吐槽
有图有真相
1、打开Ubuntu Soft Center
2、打开libraries
3、输入gstreamer
4、
Ubuntu已经安装了gstreamer库,因此只需要再安装几个开发库即可,
找到下面的两个库文件并安装
libgstreamer0.10-dev
libgstreamer0.10-0-dbg
5、测试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;
- }
6、编译运行
以上代码我保存为2.c
gcc -Wall 2.c -o 2 $(pkg-config --cflags --libs gstreamer-0.10)
./2
7、运行结果
出现This program is linked against GStreamer 0.10.36
成功
Stay hungry, stay foolish!