现在的位置: 首页 > 综合 > 正文

Gstreamer 测试代码

2013年05月25日 ⁄ 综合 ⁄ 共 734字 ⁄ 字号 评论关闭
  1. #include <gst/gst.h> 
  2. int main (int    argc,char *argv[]) 
  3.     const gchar *nano_str; 
  4.      guint major, minor, micro, nano; 
  5.      gst_init (&argc, &argv); 
  6.      gst_version (&major, &minor, &micro, &nano); 
  7.     if (nano == 1) 
  8.          nano_str = "(CVS)"
  9.     else if (nano == 2) 
  10.          nano_str = "(Prerelease)"
  11.     else 
  12.          nano_str = ""
  13.      printf ("This program is linked against GStreamer %d.%d.%d %s\n"
  14.            major, minor, micro, nano_str); 
  15.     return 0; 
  16. }

root@hello-desktop:~/src/GSTtest# gedit test.c
root@hello-desktop:~/src/GSTtest# ls
test.c
root@hello-desktop:~/src/GSTtest# gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10) test.c -o test
root@hello-desktop:~/src/GSTtest# ./test
This program is linked against GStreamer 0.10.28

抱歉!评论已关闭.