[gstreamer] initialization

Posted renhl

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[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
",
23           major, minor, micro, nano_str);
24 
25   printf("macro version: %d.%d.%d
", 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`

■ 运行结果

[email protected]:~/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);

 

以上是关于[gstreamer] initialization的主要内容,如果未能解决你的问题,请参考以下文章

关于gstreamer的问题

我是不是需要使用 Gstreamer 构建 OpenCV 才能在 OpenCV 中使用 Gstreamer

官方教程中的GStreamer示例不能使用GStreamer 1.14.1在Ubuntu 18.04上运行

gstreamer中的caps设置问题

gstreamer移植qnx:交叉编译gstreamer之 libgstreamer

GStreamer 与 FFmpeg