ratedetect

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

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

Detector tracks the frame rate of an incoming video stream

func (*Detector) Append

func (d *Detector) Append(t time.Duration) error

Append a video packet timestamp

func (*Detector) Rate

func (d *Detector) Rate() Rate

Rate returns estimated framerate of the stream

type Rate

type Rate struct {
	// Numerator of fractional rate
	Numerator int
	// Denominator of fractional rate. 1 if rate is integral, 0 if rate is floating-point
	Denominator int
	// Float value of rate
	Float float64
}

Rate of stream in frames per second

func (Rate) MarshalXMLAttr

func (r Rate) MarshalXMLAttr(name xml.Name) (attr xml.Attr, err error)

MarshalXMLAttr formats the frame rate as an integer, ratio or float for DASH manifests

Jump to

Keyboard shortcuts

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