1,Ubuntu已经安装了gstreamer库,因此只需要再安装几个开发库即可,是
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->
libstreamer0.
10
-
0
libstreamer0. 10 - dev
libstreamer0. 10 - 0 - dbg
libstreamer0. 10 - dev
libstreamer0. 10 - 0 - dbg
在新立得里选中应用即可
2,测试gstreamer开发库
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->
#include
<
gst
/
gst.h
>
int main( int argc, char * argv[])
{
const gchar * nano_str;
guintmajor,minor,micro,nano;
gst_init( & argc, & argv);
gst_version( & major, & minor, & micro, & nano);
if (nano == 1 )
nano_str = " (CVS) " ;
else if (nano == 2 )
nano_str = " (Prerelease) " ;
else
nano_str = "" ;
printf( " ThisprogramislinkedagainstGStreamer%d.%d.%d%s/n " ,
major,minor,micro,nano_str);
return 0 ;
}
int main( int argc, char * argv[])
{
const gchar * nano_str;
guintmajor,minor,micro,nano;
gst_init( & argc, & argv);
gst_version( & major, & minor, & micro, & nano);
if (nano == 1 )
nano_str = " (CVS) " ;
else if (nano == 2 )
nano_str = " (Prerelease) " ;
else
nano_str = "" ;
printf( " ThisprogramislinkedagainstGStreamer%d.%d.%d%s/n " ,
major,minor,micro,nano_str);
return 0 ;
}
3,编译运行
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->
gcc
-
Wall$(pkg
-
config
--
cflags
--
libsgstreamer
-
0.10
)hello.c
-
ohello
. / hello
. / hello
运行结果:
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->
Thisprogram
is
linkedagainstGStreamer
0.10
.
22