[gstreamer] initialization

■ Simple initialization

test.c

 1 #include <stdio.h>
 2 #include <gst/gst.h>
 3 
 4 int
 5 main (int   argc,
 6       char *argv[])
 7 {
 8   const gchar *nano_str;
 9   guint major, minor, micro, nano;
10 
11   gst_init (&argc, &argv);
12 
13   gst_version (&major, &minor, &micro, &nano);
14 
15   if (nano == 1)
16     nano_str = "(CVS)";
17   else if (nano == 2)
18     nano_str = "(Prerelease)";
19   else
20     nano_str = "";
21 
22   printf ("This program is linked against GStreamer %d.%d.%d %s\n",
23           major, minor, micro, nano_str);
24 
25   printf("macro version: %d.%d.%d\n", GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO);
26   return 0;
27 }

■ 编译

gcc test.c -o test `pkg-config --cflags --libs gstreamer-1.0`

■ 运行结果

renhl@renhl:~/share/1/initialization$ ./test
This program is linked against GStreamer 1.8.3
macro version: 1.8.3

 

■ gst log

GST_DEBUG_FILE=1.log GST_DEBUG=7 ./test

 

EMEDITOR 去除1.log中不能显示的字符

1 document.selection.Replace("\\x1b\\[[^ ]*ERROR","ERROR",eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp,eeExFindSeparateCRLF);
2 document.selection.Replace("\\x1b\\[[^ ]*WARNING","WARNING",eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp,eeExFindSeparateCRLF);
3 document.selection.Replace("\\x1b\\[[^ ]*FIXME","FIXME",eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp,eeExFindSeparateCRLF);
4 document.selection.Replace("\\x1b\\[[^ ]*INFO","INFO",eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp,eeExFindSeparateCRLF);
5 document.selection.Replace("\\x1b\\[[^ ]*DEBUG","DEBUG",eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp,eeExFindSeparateCRLF);
6 document.selection.Replace("\\x1b\\[[^ ]*LOG","LOG",eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp,eeExFindSeparateCRLF);
7 document.selection.Replace("\\x1b\\[[^ ]*TRACE","TRACE",eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp,eeExFindSeparateCRLF);
8 document.selection.Replace("\\x1b\\[[^ ]*MEMDUMP","MEMDUMP",eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp,eeExFindSeparateCRLF);
9 document.selection.Replace("\\x1b[^ ]*","",eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp,eeExFindSeparateCRLF);

 

上一篇:python – 如何使用gstreamer录制实时视频而不丢帧?


下一篇:渗透常用命令记录