parsers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioType

type AudioType string

AudioType is the audio codec we need in a given playlist

type Bitrate

type Bitrate struct {
	Max int `json:",omitempty"`
	Min int `json:",omitempty"`
}

Bitrate is a struct that carries Min and Max bitrate values

type CaptionType

type CaptionType string

CaptionType is an allowed caption format for the stream

type Codec

type Codec string

Codec represents the codec of the ContentType

type ContentType

type ContentType string

ContentType represents one stream type (e.g. video, audio, text)

type FPS

type FPS string

FPS represents the frames per second of a given video

type Language

type Language string

Language is the language we need in a given playlist

type MediaFilters

type MediaFilters struct {
	Videos       NestedFilters `json:",omitempty"`
	Audios       NestedFilters `json:",omitempty"`
	Captions     NestedFilters `json:",omitempty"`
	ContentTypes []ContentType `json:",omitempty"`
	Plugins      []string      `json:",omitempty"`
	Tags         *Tags         `json:",omitempty"`
	Trim         *Trim         `json:",omitempty"`
	Bitrate      *Bitrate      `json:",omitempty"`
	FrameRate    []FPS         `json:",omitempty"`
	Protocol     Protocol      `json:"protocol"`
}

MediaFilters is a struct that carry all the information passed via url

func URLParse

func URLParse(urlpath string) (string, *MediaFilters, error)

URLParse will generate a MediaFilters struct with all the filters that needs to be applied to the master manifest. It will also return the master manifest url without the filters.

func (*MediaFilters) SuppressAds

func (mf *MediaFilters) SuppressAds() bool

SuppressAds will evaluate whether the ad tag was set

func (*MediaFilters) SuppressIFrame

func (mf *MediaFilters) SuppressIFrame() bool

SuppressIFrame will evaluate whether the i-frame tag was set

type NestedFilters

type NestedFilters struct {
	Bitrate  *Bitrate   `json:",omitempty"`
	Codecs   []Codec    `json:",omitempty"`
	Language []Language `json:",omitempty"`
}

NestedFilters is a struct that holds values of filters that can be nested within certain Media Filters

type Protocol

type Protocol string

Protocol describe the valid protocols

const (

	// ProtocolHLS for manifest in hls
	ProtocolHLS Protocol = "hls"
	// ProtocolDASH for manifests in dash
	ProtocolDASH Protocol = "dash"
)

type Tags

type Tags struct {
	Ads    bool `json:",omitempty"`
	IFrame bool `json:",omitempty"`
}

Tags holds values of HLS tags that are to be suppressed from the manifest

type Trim

type Trim struct {
	Start int `json:",omitempty"`
	End   int `json:",omitempty"`
}

Trim is a struct that carries the start and end times to trim playlist

type VideoType

type VideoType string

VideoType is the video codec we need in a given playlist

Jump to

Keyboard shortcuts

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