mediachunk

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

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

Chunk Chunk class

func New

func New(index uint64, options Options) Chunk

New Creates a chunk instance

func (*Chunk) AddData

func (c *Chunk) AddData(buf []byte) error

AddData Add data to chunk and flush it

func (*Chunk) Close

func (c *Chunk) Close(durationS float64)

Close Closes chunk

func (*Chunk) GetFilename

func (c *Chunk) GetFilename() string

GetFilename Returns the filename

func (*Chunk) GetIndex

func (c *Chunk) GetIndex() uint64

GetIndex Returns the index

func (*Chunk) InitializeChunk

func (c *Chunk) InitializeChunk() error

InitializeChunk Initializes chunk

func (*Chunk) IsEmpty

func (c *Chunk) IsEmpty() bool

IsEmpty Indicates if there are any bytes already saved in this chunk

type Options

type Options struct {
	Log                *logrus.Logger
	OutputType         OutputTypes
	LHLS               bool
	EstimatedDurationS float64
	FileNumberLength   int
	GhostPrefix        string
	FileExtension      string
	BasePath           string
	ChunkBaseFilename  string
	HTTPUploader       *httpuploader.HTTPUploader
	S3Uploader         *s3uploader.S3Uploader
}

Options Chunking options

type OutputTypes

type OutputTypes int

OutputTypes indicates the manifest type

const (
	// ChunkOutputModeNone No no write data
	ChunkOutputModeNone OutputTypes = iota

	// ChunkOutputModeFile Saves chunks to file
	ChunkOutputModeFile

	// ChunkOutputModeHTTPChunkedTransfer chunks to chunked streaming server
	ChunkOutputModeHTTPChunkedTransfer

	// ChunkOutputModeHTTPRegular chunks to chunked streaming server
	ChunkOutputModeHTTPRegular

	// ChunkOutputModeS3 chunks to S3
	ChunkOutputModeS3
)

Jump to

Keyboard shortcuts

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