verification

package
v0.5.34 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAudioMismatch = Fatal{Retryable{errors.New("AudioMismatch")}}
View Source
var ErrMissingSource = errors.New("MissingSource")
View Source
var ErrPixelMismatch = Retryable{errors.New("PixelMismatch")}
View Source
var ErrPixelsAbsent = errors.New("PixelsAbsent")
View Source
var ErrTampered = Retryable{errors.New("Tampered")}
View Source
var ErrVerifierStatus = errors.New("VerifierStatus")
View Source
var ErrVideoUnavailable = errors.New("VideoUnavailable")
View Source
var VerifierPath string

VerifierPath is the local path to the verifier shared volume. Remove as soon as [1] is implemented. [1] https://github.com/livepeer/verification-classifier/issues/64

Functions

func IsFatal added in v0.5.5

func IsFatal(err error) bool

func IsRetryable

func IsRetryable(err error) bool

Types

type EpicClassifier

type EpicClassifier struct {
	Addr string
}

func (*EpicClassifier) Verify

func (e *EpicClassifier) Verify(params *Params) (*Results, error)

type Fatal added in v0.5.5

type Fatal struct {
	Retryable
}

type Params

type Params struct {
	// ManifestID should go away once we do direct push of video
	ManifestID core.ManifestID

	// Bytes of the source video segment
	Source *stream.HLSSegment

	// Rendition parameters to be checked
	Profiles []ffmpeg.VideoProfile

	// Information on the orchestrator that performed the transcoding
	Orchestrator *net.OrchestratorInfo

	// Transcoded result metadata
	Results *net.TranscodeData

	// Rendition locations; typically when the data is in object storage
	URIs []string

	// Cached data when local object storage is used
	Renditions [][]byte

	// External object storage used by broadcaster (can be defined per-stream)
	OS drivers.OSSession
}

type Policy

type Policy struct {

	// Verification function to run
	Verifier Verifier

	// Maximum number of retries until the policy chooses a winner
	Retries int

	// How often to invoke the verifier, on a per-segment basis
	SampleRate float64 // XXX for later

	// How many parallel transcodes to support
	Redundancy int // XXX for later
}

type Results

type Results struct {
	// Verifier specific score
	Score float64

	// Number of pixels decoded in this result
	Pixels []int64
}

type Retryable

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

Special error type indicating a retryable error Such errors typically mean re-trying the transcode might help (Non-retryable errors usually indicate unrecoverable system errors)

type SegmentVerifier

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

func NewSegmentVerifier

func NewSegmentVerifier(p *Policy) *SegmentVerifier

func (*SegmentVerifier) Verify

func (sv *SegmentVerifier) Verify(params *Params) (*Params, error)

type SegmentVerifierResults

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

type Verifier

type Verifier interface {
	Verify(params *Params) (*Results, error)
}

Jump to

Keyboard shortcuts

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