whip

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParamsUnavailable = psrpc.NewErrorf(psrpc.InvalidArgument, "codec parameters unavailable in sample")
)

Functions

func NewWHIPHandler

func NewWHIPHandler(webRTCConfig *rtcconfig.WebRTCConfig) *whipHandler

Types

type HealthHandlers added in v1.2.2

type HealthHandlers map[string]http.HandlerFunc

type RelayMediaSink

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

func NewRelayMediaSink

func NewRelayMediaSink(logger logger.Logger) *RelayMediaSink

func (*RelayMediaSink) Close

func (rs *RelayMediaSink) Close() error

func (*RelayMediaSink) PushSample

func (rs *RelayMediaSink) PushSample(s *media.Sample, ts time.Duration) error

func (*RelayMediaSink) SetWriter

func (rs *RelayMediaSink) SetWriter(w io.WriteCloser) error

type RelayWhipTrackHandler added in v1.4.0

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

func NewRelayWhipTrackHandler added in v1.4.0

func NewRelayWhipTrackHandler(
	logger logger.Logger,
	track *webrtc.TrackRemote,
	quality livekit.VideoQuality,
	sync *synchronizer.TrackSynchronizer,
	receiver *webrtc.RTPReceiver,
	writePLI func(ssrc webrtc.SSRC),
	onRTCP func(packet rtcp.Packet),
) (*RelayWhipTrackHandler, error)

func (*RelayWhipTrackHandler) Close added in v1.4.0

func (t *RelayWhipTrackHandler) Close()

func (*RelayWhipTrackHandler) SetMediaTrackStatsGatherer added in v1.4.0

func (t *RelayWhipTrackHandler) SetMediaTrackStatsGatherer(st *stats.LocalMediaStatsGatherer)

func (*RelayWhipTrackHandler) SetWriter added in v1.4.0

func (t *RelayWhipTrackHandler) SetWriter(w io.WriteCloser) error

func (*RelayWhipTrackHandler) Start added in v1.4.0

func (t *RelayWhipTrackHandler) Start(onDone func(err error)) (err error)

type SDKMediaSink

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

func NewSDKMediaSink

func NewSDKMediaSink(
	l logger.Logger,
	p *params.Params,
	sdkOutput *lksdk_output.LKSDKOutput,
	codecParameters webrtc.RTPCodecParameters,
	streamKind types.StreamKind,
	layers []livekit.VideoQuality,
) *SDKMediaSink

func (*SDKMediaSink) Close

func (sp *SDKMediaSink) Close() error

func (*SDKMediaSink) GetTrack added in v1.4.0

func (sp *SDKMediaSink) GetTrack(quality livekit.VideoQuality) *SDKMediaSinkTrack

type SDKMediaSinkTrack added in v1.3.0

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

func (*SDKMediaSinkTrack) Close added in v1.3.0

func (t *SDKMediaSinkTrack) Close() error

func (*SDKMediaSinkTrack) HandleRTCPPacket added in v1.4.0

func (t *SDKMediaSinkTrack) HandleRTCPPacket(pkt rtcp.Packet) error

func (*SDKMediaSinkTrack) PushRTCP added in v1.4.0

func (t *SDKMediaSinkTrack) PushRTCP(pkts []rtcp.Packet) error

func (*SDKMediaSinkTrack) PushRTP added in v1.4.0

func (t *SDKMediaSinkTrack) PushRTP(pkt *rtp.Packet) error

func (*SDKMediaSinkTrack) SetRTCPPacketSink added in v1.4.0

func (t *SDKMediaSinkTrack) SetRTCPPacketSink(handleRTCPPacket func(pkt rtcp.Packet))

func (*SDKMediaSinkTrack) SetStatsGatherer added in v1.3.0

func (t *SDKMediaSinkTrack) SetStatsGatherer(st *stats.LocalMediaStatsGatherer)

type SDKWhipTrackHandler added in v1.4.0

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

func NewSDKWhipTrackHandler added in v1.4.0

func NewSDKWhipTrackHandler(
	logger logger.Logger,
	track *webrtc.TrackRemote,
	quality livekit.VideoQuality,
	receiver *webrtc.RTPReceiver,
	writePLI func(ssrc webrtc.SSRC),
	sendRTCPUpStream func(pkt rtcp.Packet),
) (*SDKWhipTrackHandler, error)

func (*SDKWhipTrackHandler) Close added in v1.4.0

func (t *SDKWhipTrackHandler) Close()

func (*SDKWhipTrackHandler) SetMediaSink added in v1.4.0

func (t *SDKWhipTrackHandler) SetMediaSink(s *SDKMediaSinkTrack)

func (*SDKWhipTrackHandler) SetMediaTrackStatsGatherer added in v1.4.0

func (t *SDKWhipTrackHandler) SetMediaTrackStatsGatherer(st *stats.LocalMediaStatsGatherer)

func (*SDKWhipTrackHandler) Start added in v1.4.0

func (t *SDKWhipTrackHandler) Start(onDone func(err error)) (err error)

type WHIPRelayHandler

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

func NewWHIPRelayHandler

func NewWHIPRelayHandler(whipServer *WHIPServer) *WHIPRelayHandler

func (*WHIPRelayHandler) ServeHTTP

func (h *WHIPRelayHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type WHIPServer

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

func NewWHIPServer

func NewWHIPServer(rpcClient rpc.IngressHandlerClient) *WHIPServer

func (*WHIPServer) AssociateRelay

func (s *WHIPServer) AssociateRelay(resourceId string, kind types.StreamKind, token string, w io.WriteCloser) error

func (*WHIPServer) CloseHandler added in v1.4.0

func (s *WHIPServer) CloseHandler(resourceId string)

func (*WHIPServer) DissociateRelay added in v1.4.0

func (s *WHIPServer) DissociateRelay(resourceId string, kind types.StreamKind)

func (*WHIPServer) IsIdle

func (s *WHIPServer) IsIdle() bool

func (*WHIPServer) Start

func (s *WHIPServer) Start(
	conf *config.Config,
	onPublish func(streamKey, resourceId string, ihs rpc.IngressHandlerServerImpl) (*params.Params, func(mimeTypes map[types.StreamKind]string, err error) *stats.LocalMediaStatsGatherer, func(error), error),
	healthHandlers HealthHandlers,
) error

func (*WHIPServer) Stop

func (s *WHIPServer) Stop()

type WhipTrackDescription added in v1.4.0

type WhipTrackDescription struct {
	Kind    types.StreamKind
	Quality livekit.VideoQuality
}

type WhipTrackHandler added in v1.4.0

type WhipTrackHandler interface {
	Start(onDone func(err error)) (err error)
	Close()
	SetMediaTrackStatsGatherer(g *stats.LocalMediaStatsGatherer)
}

Jump to

Keyboard shortcuts

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