Documentation
¶
Index ¶
- func BuildAudioRate(name string, tolerance time.Duration) (*gst.Element, error)
- func BuildQueue(name string, latency time.Duration, leaky bool) (*gst.Element, error)
- type Bin
- func (b *Bin) AddElement(e *gst.Element) error
- func (b *Bin) AddElements(elements ...*gst.Element) error
- func (b *Bin) AddOnEOSReceived(f func()) error
- func (b *Bin) AddSinkBin(sink *Bin) error
- func (b *Bin) AddSourceBin(src *Bin) error
- func (b *Bin) GetName() string
- func (b *Bin) NewBin(name string) *Bin
- func (b *Bin) RemoveSinkBin(name string) error
- func (b *Bin) RemoveSourceBin(name string) error
- func (b *Bin) SetEOSFunc(f func() bool)
- func (b *Bin) SetGetSinkPad(f func(sinkName string) *gst.Pad)
- func (b *Bin) SetGetSrcPad(f func(srcName string) *gst.Pad)
- func (b *Bin) SetLinkFunc(f func([]*gst.Element) error)
- func (b *Bin) SetShouldLink(f func(string) bool)
- func (b *Bin) SetState(state gst.State) error
- type Callbacks
- func (c *Callbacks) AddOnStop(f func() error)
- func (c *Callbacks) AddOnTrackAdded(f func(*config.TrackSource))
- func (c *Callbacks) AddOnTrackMuted(f func(string))
- func (c *Callbacks) AddOnTrackRemoved(f func(string))
- func (c *Callbacks) AddOnTrackUnmuted(f func(string))
- func (c *Callbacks) OnDebugDotRequest(reason string)
- func (c *Callbacks) OnEOSSent()
- func (c *Callbacks) OnError(err error)
- func (c *Callbacks) OnPipelinePaused()
- func (c *Callbacks) OnStop() error
- func (c *Callbacks) OnTrackAdded(ts *config.TrackSource)
- func (c *Callbacks) OnTrackMuted(trackID string)
- func (c *Callbacks) OnTrackRemoved(trackID string)
- func (c *Callbacks) OnTrackUnmuted(trackID string)
- func (c *Callbacks) PipelinePaused() <-chan struct{}
- func (c *Callbacks) SetOnDebugDotRequest(f func(string))
- func (c *Callbacks) SetOnEOSSent(f func())
- func (c *Callbacks) SetOnError(f func(error))
- type Pipeline
- func (p *Pipeline) AddElement(e *gst.Element) error
- func (p *Pipeline) AddElements(elements ...*gst.Element) error
- func (p *Pipeline) AddSinkBin(sink *Bin) error
- func (p *Pipeline) AddSourceBin(src *Bin) error
- func (p *Pipeline) DebugBinToDotData(details gst.DebugGraphDetails) string
- func (p *Pipeline) Link() error
- func (p *Pipeline) PlayheadPosition() (time.Duration, bool)
- func (p *Pipeline) Run() error
- func (p *Pipeline) RunningTime() (time.Duration, bool)
- func (p *Pipeline) SendEOS()
- func (p *Pipeline) SetState(state gst.State) error
- func (p *Pipeline) SetWatch(watch func(msg *gst.Message) bool)
- func (p *Pipeline) Stop()
- type State
- type StateManager
- func (s *StateManager) GetState() State
- func (s *StateManager) GetStateLocked() State
- func (s *StateManager) LockState()
- func (s *StateManager) LockStateShared()
- func (s *StateManager) UnlockState()
- func (s *StateManager) UnlockStateShared()
- func (s *StateManager) UpgradeState(state State) (State, bool)
- type TimeProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAudioRate ¶ added in v1.11.0
Types ¶
type Bin ¶
type Bin struct {
*Callbacks
*StateManager
// contains filtered or unexported fields
}
Bins are designed to hold a single stream, with any number of sources and sinks
func (*Bin) AddElement ¶
Elements will be linked in the order they are added
func (*Bin) AddElements ¶
Elements will be linked in the order they are added
func (*Bin) AddOnEOSReceived ¶ added in v1.9.1
AddOnEOSReceived adds a callback to be called when EOS is received on every pad of the last element in the bin
func (*Bin) AddSinkBin ¶
Add src as a sink of b. This should only be called once for each sink bin
func (*Bin) AddSourceBin ¶
Add src as a source of b. This should only be called once for each source bin
func (*Bin) RemoveSinkBin ¶
func (*Bin) RemoveSourceBin ¶
func (*Bin) SetEOSFunc ¶
Set a custom EOS function (used for appsrc, input-selector). If it returns true, EOS will also be sent to src bins
func (*Bin) SetGetSinkPad ¶
Set a custom linking function which returns a pad for the named sink bin
func (*Bin) SetGetSrcPad ¶
Set a custom linking function which returns a pad for the named src bin
func (*Bin) SetLinkFunc ¶
Set a custom linking function for this bin's elements (used when you need to modify chain functions)
func (*Bin) SetShouldLink ¶ added in v1.8.3
type Callbacks ¶
type Callbacks struct {
GstReady chan struct{}
BuildReady chan struct{}
// contains filtered or unexported fields
}
func (*Callbacks) AddOnTrackAdded ¶
func (c *Callbacks) AddOnTrackAdded(f func(*config.TrackSource))
func (*Callbacks) AddOnTrackMuted ¶
func (*Callbacks) AddOnTrackRemoved ¶
func (*Callbacks) AddOnTrackUnmuted ¶
func (*Callbacks) OnDebugDotRequest ¶ added in v1.12.0
func (*Callbacks) OnPipelinePaused ¶ added in v1.12.0
func (c *Callbacks) OnPipelinePaused()
func (*Callbacks) OnTrackAdded ¶
func (c *Callbacks) OnTrackAdded(ts *config.TrackSource)
func (*Callbacks) OnTrackMuted ¶
func (*Callbacks) OnTrackRemoved ¶
func (*Callbacks) OnTrackUnmuted ¶
func (*Callbacks) PipelinePaused ¶ added in v1.12.0
func (c *Callbacks) PipelinePaused() <-chan struct{}
func (*Callbacks) SetOnDebugDotRequest ¶ added in v1.12.0
func (*Callbacks) SetOnEOSSent ¶ added in v1.8.6
func (c *Callbacks) SetOnEOSSent(f func())
func (*Callbacks) SetOnError ¶
type Pipeline ¶
type Pipeline struct {
*Bin
// contains filtered or unexported fields
}
func NewPipeline ¶
func (*Pipeline) AddSinkBin ¶
func (*Pipeline) AddSourceBin ¶
func (*Pipeline) DebugBinToDotData ¶
func (p *Pipeline) DebugBinToDotData(details gst.DebugGraphDetails) string
func (*Pipeline) PlayheadPosition ¶ added in v1.11.0
PlayheadPosition returns the playhead position of the gst pipeline It is equivalent to the last timestamp seen by a sink element
func (*Pipeline) RunningTime ¶ added in v1.11.0
RunningTime returns the running time of the gst pipeline
type StateManager ¶
type StateManager struct {
// contains filtered or unexported fields
}
func (*StateManager) GetState ¶
func (s *StateManager) GetState() State
func (*StateManager) GetStateLocked ¶
func (s *StateManager) GetStateLocked() State
func (*StateManager) LockState ¶
func (s *StateManager) LockState()
func (*StateManager) LockStateShared ¶
func (s *StateManager) LockStateShared()
func (*StateManager) UnlockState ¶
func (s *StateManager) UnlockState()
func (*StateManager) UnlockStateShared ¶
func (s *StateManager) UnlockStateShared()
func (*StateManager) UpgradeState ¶
func (s *StateManager) UpgradeState(state State) (State, bool)
type TimeProvider ¶ added in v1.11.0
type TimeProvider interface {
RunningTime() (time.Duration, bool)
PlayheadPosition() (time.Duration, bool)
}
TimeProvider supplies the running time and playhead position of a pipeline.
func NopTimeProvider ¶ added in v1.11.0
func NopTimeProvider() TimeProvider
NopTimeProvider returns a TimeProvider that always reports unavailable times.