utils

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeregisterIngressRpcHandlers added in v1.5.0

func DeregisterIngressRpcHandlers(server rpc.IngressHandlerServer, info *livekit.IngressInfo)

func DeserializeMediaForRelay

func DeserializeMediaForRelay(r io.Reader) ([]byte, time.Duration, error)

func RegisterIngressRpcHandlers added in v1.5.0

func RegisterIngressRpcHandlers(server rpc.IngressHandlerServer, info *livekit.IngressInfo) error

func SerializeMediaForRelay

func SerializeMediaForRelay(w io.Writer, data []byte, ts time.Duration) error

Types

type BlockingQueue added in v1.5.0

type BlockingQueue[T any] struct {
	// contains filtered or unexported fields
}

func NewBlockingQueue added in v1.5.0

func NewBlockingQueue[T any](capacity int) *BlockingQueue[T]

func (*BlockingQueue[T]) Close added in v1.5.0

func (b *BlockingQueue[T]) Close()

func (*BlockingQueue[T]) PopFront added in v1.5.0

func (b *BlockingQueue[T]) PopFront() (T, error)

func (*BlockingQueue[T]) PushBack added in v1.5.0

func (b *BlockingQueue[T]) PushBack(item T)

func (*BlockingQueue[T]) QueueLength added in v1.5.0

func (b *BlockingQueue[T]) QueueLength() int

type HandlerLogger added in v1.6.0

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

HandlerLogger routes the handler process output line by line. A line split across Write calls is held until its newline arrives or Close is called.

func NewHandlerLogger added in v1.5.0

func NewHandlerLogger(resourceID, ingressID string) *HandlerLogger

func NewHandlerLoggerWithSink added in v1.6.0

func NewHandlerLoggerWithSink(resourceID, ingressID string, sink func(line []byte)) *HandlerLogger

NewHandlerLoggerWithSink sends the handler's own structured lines to sink. A nil sink writes them to stdout. line is only valid until sink returns.

func (*HandlerLogger) Close added in v1.6.0

func (h *HandlerLogger) Close() error

Close processes any trailing line that has no newline.

func (*HandlerLogger) Write added in v1.6.0

func (h *HandlerLogger) Write(p []byte) (int, error)

type OutputSynchronizer added in v1.2.0

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

func NewOutputSynchronizer added in v1.2.0

func NewOutputSynchronizer() *OutputSynchronizer

func (*OutputSynchronizer) AddTrack added in v1.2.0

func (*OutputSynchronizer) ScheduleEvent added in v1.5.0

func (os *OutputSynchronizer) ScheduleEvent(ctx context.Context, pts time.Duration, event func()) error

ScheduleEvent TODO adjust timer deadline when zeroTime is adjusted

type PrerollBuffer

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

func NewPrerollBuffer

func NewPrerollBuffer(onBufferReset func() error) *PrerollBuffer

func (*PrerollBuffer) Close

func (pb *PrerollBuffer) Close() error

func (*PrerollBuffer) SetWriter

func (pb *PrerollBuffer) SetWriter(w io.WriteCloser) error

func (*PrerollBuffer) Write

func (pb *PrerollBuffer) Write(p []byte) (int, error)

type StateNotifier added in v1.5.0

type StateNotifier interface {
	// IngressCreated announces a URL pull session whose ingress was just
	// created with its first state, as that state's update would.
	IngressCreated(ctx context.Context, projectID string, info *livekit.IngressInfo) error

	UpdateIngressState(ctx context.Context, projectID string, info *livekit.IngressInfo) error

	// SessionStarted reports that a session is running. It does not mark the
	// first the notifier hears of one: a session is announced by IngressCreated
	// or its first state update, which carry ENDPOINT_BUFFERING and are sent
	// before this call on every path. What this marks is the point from which the session
	// is live, so anything an implementation meters belongs between here and
	// SessionEnded rather than from whenever an update first arrived.
	SessionStarted(ctx context.Context, projectID string, info *livekit.IngressInfo)

	// SessionEnded reports that a session is over and that nothing more will be
	// reported for it. It is called wherever a session stops running, whether
	// it ended, failed to start, or had its handler killed, so an
	// implementation can release whatever it holds without waiting for a
	// terminal update that may never arrive.
	SessionEnded(ctx context.Context, resourceID string)
}

func NewHandlerStateNotifier added in v1.5.0

func NewHandlerStateNotifier(ipcClient ipc.IngressServiceClient) StateNotifier

func NewNoopStateNotifier added in v1.5.0

func NewNoopStateNotifier() StateNotifier

func NewServiceStateNotifier added in v1.5.0

func NewServiceStateNotifier(psrpcClient rpc.IOInfoClient) StateNotifier

type TrackOutputSynchronizer added in v1.2.0

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

func (*TrackOutputSynchronizer) Close added in v1.2.0

func (ost *TrackOutputSynchronizer) Close()

func (*TrackOutputSynchronizer) WaitForMediaTime added in v1.2.0

func (ost *TrackOutputSynchronizer) WaitForMediaTime(pts time.Duration, playingTooSlow bool) (bool, error)

Jump to

Keyboard shortcuts

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