source

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpType added in v1.13.0

type OpType int

OpType represents operations that can be sent to a track worker.

const (
	OpSubscribe       OpType = iota // track subscribed, create writer
	OpUnsubscribe                   // track unsubscribed, start graceful cleanup
	OpFinished                      // StreamStopped, immediate cleanup
	OpPlaying                       // GStreamer pipeline is playing
	OpSetTimeProvider               // set time provider for PTS calculation
	OpClose                         // shutdown, drain and exit worker
)

func (OpType) String added in v1.13.0

func (o OpType) String() string

type Operation added in v1.13.0

type Operation struct {
	Type              OpType
	Track             *webrtc.TrackRemote
	Pub               *lksdk.RemoteTrackPublication
	RemoteParticipant *lksdk.RemoteParticipant
	Generation        uint64
	TimeProvider      gstreamer.TimeProvider
	ResultChan        chan<- subscriptionResult // for init coordination (nil after init)
}

Operation is a message sent to a track worker's operation channel.

type SDKSource

type SDKSource struct {
	*config.PipelineConfig
	// contains filtered or unexported fields
}

func NewSDKSource

func NewSDKSource(ctx context.Context, p *config.PipelineConfig, callbacks *gstreamer.Callbacks) (*SDKSource, error)

func (*SDKSource) Close

func (s *SDKSource) Close()

func (*SDKSource) CloseWriters added in v1.5.6

func (s *SDKSource) CloseWriters()

func (*SDKSource) EndRecording

func (s *SDKSource) EndRecording() <-chan struct{}

func (*SDKSource) GetEndedAt added in v1.7.8

func (s *SDKSource) GetEndedAt() int64

func (*SDKSource) GetStartedAt added in v1.7.8

func (s *SDKSource) GetStartedAt() int64

func (*SDKSource) Playing

func (s *SDKSource) Playing(trackID string)

func (*SDKSource) SetTimeProvider added in v1.11.0

func (s *SDKSource) SetTimeProvider(tp gstreamer.TimeProvider)

func (*SDKSource) StartRecording

func (s *SDKSource) StartRecording() <-chan struct{}

func (*SDKSource) StreamStopped added in v1.5.6

func (s *SDKSource) StreamStopped(elementName string)

type Source

type Source interface {
	StartRecording() <-chan struct{}
	EndRecording() <-chan struct{}
	GetStartedAt() int64
	GetEndedAt() int64
	Close()
}

func New added in v1.5.6

func New(ctx context.Context, p *config.PipelineConfig, callbacks *gstreamer.Callbacks) (Source, error)

type TimeAware added in v1.11.0

type TimeAware interface {
	SetTimeProvider(gstreamer.TimeProvider)
}

type TrackState added in v1.13.0

type TrackState int

TrackState represents the state of a track writer in the per-track worker state machine.

const (
	TrackStateIdle     TrackState = iota // no active writer, ready for subscription
	TrackStateActive                     // writer is active and processing samples
	TrackStateCleaning                   // writer is draining after unsubscribe
)

func (TrackState) String added in v1.13.0

func (s TrackState) String() string

type WebSource

type WebSource struct {
	// contains filtered or unexported fields
}

func NewWebSource

func NewWebSource(ctx context.Context, p *config.PipelineConfig) (*WebSource, error)

func (*WebSource) Close

func (s *WebSource) Close()

func (*WebSource) EndRecording

func (s *WebSource) EndRecording() <-chan struct{}

func (*WebSource) GetEndedAt added in v1.7.8

func (s *WebSource) GetEndedAt() int64

func (*WebSource) GetStartedAt added in v1.7.8

func (s *WebSource) GetStartedAt() int64

func (*WebSource) StartRecording

func (s *WebSource) StartRecording() <-chan struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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