manifestgenerator

package
v0.0.0-...-9d6490e Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//GhostPrefixDefault ghost chunk prefix
	GhostPrefixDefault = ".growing_"

	//ChunkFileNumberLength chunk filenumber length
	ChunkFileNumberLength = 5

	//ChunkFileExtensionDefault default chunk extension
	ChunkFileExtensionDefault = ".ts"

	//ChunkInitFileName Init chunk filename
	ChunkInitFileName = "init"
)
View Source
const (
	// PatTable PAT
	PatTable = iota

	// PmtTable PAT
	PmtTable
)
View Source
const (
	// InitNotIni no PAT / PMT saved
	InitNotIni = iota

	// InitsavedPAT PAT saved, needs PMT too
	InitsavedPAT

	// InitsavedPMT PMT and PAT saved
	InitsavedPMT
)
View Source
const (
	// ChunkLengthToleranceS Tolerance calculating chunk length
	ChunkLengthToleranceS = 0.25
)
View Source
const HlsDefaultVersion int = 3

HlsDefaultVersion to use

Variables

View Source
var Version = "1.1.0"

Version Indicates the package version

Functions

This section is empty.

Types

type ChunkInitTypes

type ChunkInitTypes int

ChunkInitTypes types indicates where to put the init data (PAT and PMT)

const (
	// ChunkNoIni Necessary if you choose manual PIDs selection
	ChunkNoIni ChunkInitTypes = iota

	//ChunkInit Creates the init segment
	ChunkInit

	//ChunkInitStart Adds PAT and PAT at each chunk start (CC will be broken)
	ChunkInitStart
)

type ManifestGenerator

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

ManifestGenerator Creates the manifest and chunks the media

func New

func New(
	log *logrus.Logger,
	chunkOutputType mediachunk.OutputTypes,
	manifestOutputType hls.OutputTypes,
	baseOutPath string,
	chunkBaseFilename string,
	chunkListFilename string,
	targetSegmentDurS float64,
	chunkInitType ChunkInitTypes,
	autoPIDs bool,
	videoPID int,
	audioPID int,
	manifestType hls.ManifestTypes,
	liveWindowSize int,
	lhlsAdvancedChunks int,
	httpUploader *httpuploader.HTTPUploader,
	s3Uploader *s3uploader.S3Uploader,
) ManifestGenerator

New Creates a chunklistgenerator instance

func (*ManifestGenerator) AddData

func (mg *ManifestGenerator) AddData(buf []byte)

AddData current chunk

func (*ManifestGenerator) Close

func (mg *ManifestGenerator) Close()

Close Closes manigest processing saving last data and last chunk

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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