Documentation ¶
Overview ¶
This example demonstrates a filesrc plugin implemented in Go.
Every element in a Gstreamer pipeline is provided by plugins. Some are builtin while others are provided by third-parties or distributed privately. The plugins are built around the GObject type system.
Go-gst offers loose bindings around the GObject type system to provide the necessary functionality to implement these plugins. The example in this code produces an element that can read from a file on the local system.
In order to build the plugin for use by GStreamer, you can do the following:
$ go generate $ go build -o libgstgofilesrc.so -buildmode c-shared .
+plugin:Name=gofilesrc +plugin:Description=File plugins written in go +plugin:Version=v0.0.1 +plugin:License=gst.LicenseLGPL +plugin:Source=go-gst +plugin:Package=examples +plugin:Origin=https://github.com/rdkbob/go-gst +plugin:ReleaseDate=2021-01-04
+element:Name=gofilesrc +element:Rank=gst.RankNone +element:Impl=FileSrc +element:Subclass=base.ExtendsBaseSrc +element:Interfaces=gst.InterfaceURIHandler