Documentation ¶
Overview ¶
Package gst manages GStreamer pipelines.
This implementation is heavily inspired by https://github.com/pion/rtwatch, which uses GStreamer and Pion WebRTC to stream a video file from disk. I doubt that I could have figured this out without that project as a reference.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline represents a GStreamer pipeline that can provide sample data to Go programs through appsink elements.
func NewPipeline ¶
NewPipeline creates a GStreamer pipeline based on the syntax used in the gst-launch-1.0 utility.
func (*Pipeline) Close ¶
Close stops this pipeline if it is started and releases any resources associated with it. It is invalid to call any other method of a pipeline after it has been closed.
func (*Pipeline) SetSink ¶
SetSink associates fn with a named appsink element in the pipeline, causing it to be continuously called with new samples while the pipeline is running.
SetSink must only be called while the pipeline is stopped, and may only be called up to once per appsink over the life of the pipeline. It will panic if name does not correspond to the name of a defined appsink, if fn is nil, or if SetSink has already been called once for the named appsink.