这篇文章主要介绍了Ubuntu下如何构建Ubuntu gstreamer开发环境,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
1,Ubuntu已经安装了Ubuntu gstreamer库,因此只需要再安装几个开发库即可,是
libstreamer0.10-0 libstreamer0.10-dev libstreamer0.10-0-dbg
在新立得里选中应用即可
2,测试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; }
3,Ubuntu gstreamer编译运行
gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10) hello.c -o hello ./hello
运行结果:This program is linked against GStreamer 0.10.22
感谢你能够认真阅读完这篇文章,希望小编分享的“Ubuntu下如何构建Ubuntu gstreamer开发环境”这篇文章对大家有帮助,同时也希望大家多多支持编程网,关注编程网行业资讯频道,更多相关知识等着你来学习!