GStreamer 1.0 Runtime environment variable settings

Source: Internet
Author: User

Plugin Search Path

When the GStreamer program runs, search for the plug-in in the following order:

    • PATH
    • gst_plugin_path_1_0 or gst_plugin_path
    • gst_plugin_system_path_1_0 or gst_plugin_system_path

Each environment variable contains a list of paths. If the gst_plugin_path_1_0 environment variable is set, the Gst_plugin_path is automatically invalidated. This facilitates the simultaneous installation of GStreamer-0.10 and GStreamer-1.0 in the system. Similarly, if gst_plugin_system_path_1_0 is set, it will replace Gst_plugin_system_path.

So since Gst_plugin_path and Gst_plugin_system_path both refer to the path of the plugin, why set two similar environment variables?

The answer is that GStreamer does not reload the search plugin, so we search for a plugin in Gst_plugin_path , and another version of the plugin is gst_plugin_system_ The PATH is searched, and the latter version is ignored. This allows us to overwrite the version of the system installation with our own version.

In this case, we should use Gst_plugin_system_path to refer to the GStreamer plugin path installed on the system and use the Gst_plugin_path Refers to our own development of plug-ins. However, in practice, it is not necessary to strictly define the nature of the plug-in path that these variables point to. I often add the system plug-in path to the path system variable. GStreamer can also find the system plugin.

It is also necessary to note that

    1. When both gst_plugin_system_path_1_0 and Gst_plugin_system_path are not defined, GStreamer automatically adds the following path to the Gst_plugin_system_path:

      • User Directory GStreamer plug-in path, typically $xdg_data_home/gstreamer-1.0/plugins, $xdg_data_home The default path is $ Home/.local/share

      • System plug-in directory, $prefix/libs/gstreamer-1.0

    2. If you need to avoid GStreamer automatic search for the above path, you can set Gst_plugin_system_path to empty!

Debug output

Set the gst_debug variable to control the output of the GStreamer runtime. Gst_debug can be set to the following format:

"Module Name 1: Level , module Name 2: Level , ..."

A wildcard "*" can be used in the module name, such as:

    • "*: 1": Indicates all module output levels 1
    • "Gst_element_:": Indicates that all modules starting with "gst_element_" Output Level 4
level name meaning
1 ERROR Logs all fatal errors
2 WARNING Logs all warnings
3 fixme Logs all fixme messages
4 INFO Logs all informational messages
5 D Ebug Logs all debug Messages
6 log Logs all LOG message s
7 trace Logs all TRACE messages
9 Memdump Logs All memory dump messages
    • Fixme: This type of message indicates that a piece of code executed has not been fully implemented or needs more attention.
    • INFO: Records occur only once, or are more important, or uncommon event messages.
    • DEBUG: Record event messages with a limited number of occurrences, such as Setup, teardown, parameter changes ...
    • LOG: Record recurring events, such as streaming ...
    • TRACE: Records recurring events, such as Ref/unref

If the gst_debug_file environment variable is set, all log information will be relocated to the file specified by the variable, otherwise all information is output to the standard error output (stderr).

Registry Cache

When the GStreamer program starts, it searches for the plug-in according to the specified path and stores the plugin's information in the file system (cache). The file path where the cache is stored is
$ xdg_cache_home/gstreamer-1.0/registry-$arch.bin,
When gst_registry_1_0 or gst_registryis set, the cache is saved to the specified path.

During the search for the plug-in, GStreamer compares the validity of the cache and decides whether to update the cache. If there are any changes, the new cache information is written to the file system at the end of the initialization function.

GStreamer 1.0 Runtime environment variable settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.