parse

package
v0.0.0-...-2456457 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerFormat

type ContainerFormat int
const (
	Ts ContainerFormat = iota
	Fmp4
)

type MasterPlaylist

type MasterPlaylist struct {
	Path           string
	Tags           []string
	MediaPlaylists []MediaPlaylist
}

type MediaPlaylist

type MediaPlaylist struct {
	Path                    string
	Tags                    []string
	Segments                []Segment
	TotalDurationMs         float64
	TotalDiscontinuityCount int
}

type Parser

type Parser struct {
	ReadFile ReadFile
}

func NewParser

func NewParser() Parser

func (*Parser) Parse

func (p *Parser) Parse(path string) (MasterPlaylist, error)

func (*Parser) ParseMasterPlaylist

func (p *Parser) ParseMasterPlaylist(path string) (MasterPlaylist, error)

func (*Parser) ParseMediaPlaylist

func (p *Parser) ParseMediaPlaylist(path string) (MediaPlaylist, error)

type ReadFile

type ReadFile func(path string) ([]byte, error)

type RequestType

type RequestType int
const (
	SegmentBySegment RequestType = iota
	ByteRange
)

type Segment

type Segment struct {
	Path                  string
	DurationMs            float64
	DiscontinuitySequence int
	FileExtension         string
	ContainerFormat       ContainerFormat
	RequestType           RequestType
}

Jump to

Keyboard shortcuts

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