GStreamerInit

GStreamerInit is a singleton object responsible for initializing the GStreamer library.

This object ensures that the GStreamer library is initialized only once during the application's execution. The initialization process configures the library with the base version and a specific application name.

It guarantees that GStreamer is properly prepared before any media-related operations, particularly with components such as media players.

Features:

  • Tracks the initialization state to prevent duplicate initializations.

  • Configures GStreamer with a specified version and application identifier.

  • Allows the user to set custom paths to the GStreamer libraries for Windows and macOS.

Functions

Link copied to clipboard
fun init()

Initializes GStreamer if it hasn't been initialized already.

Link copied to clipboard
fun setGStreamerPathMac(path: String)

Allows the user to set a custom path for GStreamer on macOS.

Link copied to clipboard
fun setGStreamerPathWindows(path: String)

Allows the user to set a custom path for GStreamer on Windows.