gst

package
v0.0.0-...-6136325 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//VideoClockRate Default
	VideoClockRate = 90000
	//AudioClockRate Default
	AudioClockRate = 48000
	//PcmClockRate Default
	PcmClockRate = 8000
)

Variables

View Source
var Logger *logrus.Logger

Logger is the Gst Logger Instance

Functions

func StartMainLoop

func StartMainLoop()

StartMainLoop for GStreamer

Types

type Channel

type Channel struct {
	SourceID string
	Name     string
}

Channel in the Pipeline

func NewChannel

func NewChannel(id string, name string) *Channel

NewChannel create a new Channel in the Pipeline

type Pipeline

type Pipeline struct {
	Pipeline *C.GstElement
	// contains filtered or unexported fields
}

Pipeline is a wrapper for a GStreamer Pipeline

func CreateAudioMixerPipeline

func CreateAudioMixerPipeline(codecName string, channels []*Channel, cfg *config.Config) *Pipeline

CreateAudioMixerPipeline Creating a Pipeline for Composite Audio Mixing (n-1)

func CreatePipeline

func CreatePipeline(codecName string, pipelineStr string, clockRate float32) *Pipeline

CreatePipeline creates a GStreamer Pipeline

func CreateVideoMixerPipeline

func CreateVideoMixerPipeline(codecName string, channels []*Channel, cfg *config.Config) *Pipeline

CreateVideoMixerPipeline Creating a Pipeline for Composite Video Mixing

func (*Pipeline) AddOutputTrack

func (p *Pipeline) AddOutputTrack(newTrack *webrtc.Track)

AddOutputTrack to the Track Stream

func (*Pipeline) GetOutputTracks

func (p *Pipeline) GetOutputTracks() []*webrtc.Track

GetOutputTracks get the Tracks

func (*Pipeline) SettingOutputTracks

func (p *Pipeline) SettingOutputTracks(tracks []*webrtc.Track)

SettingOutputTracks set the Tracks

func (*Pipeline) Start

func (p *Pipeline) Start()

Start starts the GStreamer Pipeline

func (*Pipeline) Stop

func (p *Pipeline) Stop()

Stop stops the GStreamer Pipeline

func (*Pipeline) WriteSampleToInputSource

func (p *Pipeline) WriteSampleToInputSource(buffer []byte, sourceID string)

WriteSampleToInputSource writes a Buffer to a appsrc of the GStreamer Pipeline

func (*Pipeline) WriteSampleToOutputTrack

func (p *Pipeline) WriteSampleToOutputTrack(buffer []byte, samples uint32) error

WriteSampleToOutputTrack to the OutputTrack

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL