hls

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientAbsoluteURL

func ClientAbsoluteURL(base *url.URL, relative string) (*url.URL, error)

func FetchMediaPlaylist added in v0.2.6

func FetchMediaPlaylist(httpClient *cnet.Client, rawURL string) (*playlist.Media, []byte, error)

func FetchPlaylist added in v0.2.6

func FetchPlaylist(httpClient *cnet.Client, rawURL string) (playlist.Playlist, []byte, error)

func FetchSegment added in v0.2.6

func FetchSegment(httpClient *cnet.Client, rawURL string) ([]byte, error)

func PickLeadingPlaylist added in v0.2.6

func PickLeadingPlaylist(variants []*playlist.MultivariantVariant) *playlist.MultivariantVariant

Types

type AfterFirstPlaylistDownloadFunc

type AfterFirstPlaylistDownloadFunc func(playlist.Playlist, []byte)

type ClientAfterDownloadSegmentFunc

type ClientAfterDownloadSegmentFunc func(*playlist.MediaSegment, []byte)

type Publisher

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

func NewPublisher

func NewPublisher(ctx context.Context, session logic.ICustomizePubSessionContext) *Publisher

func (*Publisher) Write

func (p *Publisher) Write(msg []byte) error

type PullSession

type PullSession struct {
	URI                        string
	AfterFirstPlaylistDownload AfterFirstPlaylistDownloadFunc
	AfterDownloadSegment       ClientAfterDownloadSegmentFunc
	// contains filtered or unexported fields
}

func NewPullSession

func NewPullSession(uri string, hc *cnet.Client, afterDownloadSegment ClientAfterDownloadSegmentFunc) *PullSession

func (*PullSession) Close

func (c *PullSession) Close()

Close closes all the Client resources.

func (*PullSession) SetParallel

func (c *PullSession) SetParallel(n int)

func (*PullSession) Start

func (c *PullSession) Start() error

func (*PullSession) Wait

func (c *PullSession) Wait() chan error

Wait waits for any error of the Client.

Jump to

Keyboard shortcuts

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