GStreamer 1.0 Runtime environment variable settings __gstreamer

Source: Internet
Author: User
Tags gstreamer
Plug-in Search Path

When the GStreamer program is running, search for plug-ins 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. GST_PLUGIN_PATH_1_0 environment variable if set, the Gst_plugin_path automatically expires. This facilitates the system's simultaneous installation of GStreamer-0.10 and GStreamer-1.0. 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 all refer to the path of the plugin, why set two similar environment variables?

The answer is that GStreamer does not reload the search plug-in, so we search for a plugin in Gst_plugin_path , and another version of the plugin is in Gst_plugin_system_path the inside 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 way, we should use Gst_plugin_system_path to refer to the GStreamer plug-in path installed on the system, and use Gst_plugin_path to refer to our own developed plug-ins. In practice, however, there is no need to strictly define the nature of the plug-in path to which these variables are directed. I often add the system plug-in path to the path system variable. GStreamer can also find system plug-ins.

It is also necessary to note that the

When both gst_plugin_system_path_1_0 and Gst_plugin_system_path are not defined, GStreamer automatically adds the following paths to Gst_plugin_ System_path:

User Directory GStreamer plug-in path, usually $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

If you need to avoid GStreamer to automatically search the above path, you can set the Gst_plugin_system_path to null. 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 , ..."

You can use the wildcard "*" in the module name, such as: "*: 1": Indicates all module output Level 1 "gst_element_:4*": indicates that all module output levels beginning with "Gst_element_" are 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 DEBUG Logs all Debug messages
6 LOG Logs all log Messages
7 TRACE Logs All trace messages
9 Memdump Logs All memory Dump messages
Fixme: This type of message means that a piece of code that executes is not fully implemented or requires more attention. INFO: Records occur only once, or are more important, or uncommon event messages. DEBUG: Record event messages that occur in a limited number of times, 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 is relocated to the file specified by the variable, otherwise all information is exported to the standard error output (stderr). Registry Cache

When the GStreamer program starts, it searches for plug-ins according to the specified path and stores the plug-in information in the file system (cache). The file path that holds the cache 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 Plug-ins, GStreamer compares the validity of the cache and decides whether to update the cache. If there are any changes, the new cached information is written to the file system at the end of the initialization function.

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.