如何查看gstreamer调试输出?

viv*_*k.m 18 gstreamer

如何查看GST_CAT_INFO,GST_DEBUG等函数的输出?我是否需要使用调试级别集自行编译gstreamer,或者可以在应用程序级别完成?

elm*_*rco 27

可以使用GST_DEBUG环境变量在stderr中打印调试消息(如果gstreamer已使用--enable-gst-debug编译,这是默认设置).

例如:GST_DEBUG=audiotestsrc:5 gst-launch audiotestsrc ! fakesink将记录audiotestsrc元素中的所有内容(5).

您可以使用在运行时更改程序调试输出 setenv("GST_DEBUG","cat:level...", 1)

有时阅读GStreamer调试可能很乏味.您可以试试gst-debug-viewer.

您可以阅读文档以获取其他详细信息.


use*_*ser 8

当前文档位于此处。我认为一些有趣的摘录:

通配符'*'也可用。例如,GST_DEBUG=2,audio*:5将对所有以单词 开头的类别使用调试级别 5 audio,对所有其他类别使用调试级别 2。

用于gst-launch-1.0 --gst-debug-help获取所有已注册类别的列表。

GStreamer 具有输出图形文件的能力。例子。

调试级别是:

| # | Name    | Description                                                    |
|---|---------|----------------------------------------------------------------|
| 0 | none    | No debug information is output.                                |
| 1 | ERROR   | Logs all fatal errors. These are errors that do not allow the  |
|   |         | core or elements to perform the requested action. The          |
|   |         | application can still recover if programmed to handle the      |
|   |         | conditions that triggered the error.                           |
| 2 | WARNING | Logs all warnings. Typically these are non-fatal, but          |
|   |         | user-visible problems are expected to happen.                  |
| 3 | FIXME   | Logs all "fixme" messages. Those typically that a codepath that|
|   |         | is known to be incomplete has been triggered. It may work in   |
|   |         | most cases, but may cause problems in specific instances.      |
| 4 | INFO    | Logs all informational messages. These are typically used for  |
|   |         | events in the system that only happen once, or are important   |
|   |         | and rare enough to be logged at this level.                    |
| 5 | DEBUG   | Logs all debug messages. These are general debug messages for  |
|   |         | events that happen only a limited number of times during an    |
|   |         | object's lifetime; these include setup, teardown, change of    |
|   |         | parameters, etc.                                               |
| 6 | LOG     | Logs all log messages. These are messages for events that      |
|   |         | happen repeatedly during an object's lifetime; these include   |
|   |         | streaming and steady-state conditions. This is used for log    |
|   |         | messages that happen on every buffer in an element for example.|
| 7 | TRACE   | Logs all trace messages. Those are message that happen very    |
|   |         | very often. This is for example is each time the reference     |
|   |         | count of a GstMiniObject, such as a GstBuffer or GstEvent, is  |
|   |         | modified.                                                      |
| 8 | MEMDUMP | Logs all memory dump messages. This is the heaviest logging and|
|   |         | may include dumping the content of blocks of memory.           |
+------------------------------------------------------------------------------+
Run Code Online (Sandbox Code Playgroud)


tbl*_*her 5

要显示所有类别的调试信息,请使用类似的内容

export GST_DEBUG="*:6"

在运行命令之前.

  • 在所有级别上,您都可以直接购买GST_DEBUG =“ 6” (2认同)