Documentation
¶
Overview ¶
Package dashcheck checks MPEG-DASH streams: the MPD, its segments, and for dynamic MPDs the timing against a synchronized wall clock.
All network access goes through a fetch.Fetcher and all time through a clock.Clock, so the same code runs natively and in the browser (wasm).
Index ¶
Constants ¶
View Source
const ( DefaultMaxSegments = 4 DefaultConcurrency = 4 DefaultLiveMargin = time.Second DefaultMPDUpdates = 1 )
Variables ¶
View Source
var ( RuleHTTPMPD = report.Register(report.Rule{ ID: "HTTP-MPD", Severity: report.Error, Desc: "The MPD must be fetchable", }) RuleHTTPInit = report.Register(report.Rule{ ID: "HTTP-INIT", Severity: report.Error, Desc: "The initialization segment must be fetchable", }) RuleHTTPSegment = report.Register(report.Rule{ ID: "HTTP-SEGMENT", Severity: report.Error, Desc: "Media segments must be fetchable while they are in the availability window", }) RuleHTTPRange = report.Register(report.Rule{ ID: "HTTP-RANGE", Severity: report.Warning, Desc: "HTTP servers should answer byte range requests with the requested range", SpecRef: "DASH-IF IOP v4.3 3.4.2", }) RuleHTTPIOPRange = report.Register(report.Rule{ ID: "HTTP-IOP-RANGE", Severity: report.Error, Desc: "HTTP servers must answer byte range requests for IOP on-demand Representations with the requested range", SpecRef: "DASH-IF IOP v4.3 3.4.2", }) RuleUnsupported = report.Register(report.Rule{ ID: "SEG-UNSUPPORTED", Severity: report.Info, Desc: "Segments in formats other than ISOBMFF are not checked", }) RuleSegmentSequences = report.Register(report.Rule{ ID: "ADDR-UNSUPPORTED", Severity: report.Info, Desc: "SegmentTimeline duration patterns (S@p, S@ssp) and URL parameters (Annex I) are not supported yet, so their segments are not checked", }) RuleSegmentList = report.Register(report.Rule{ ID: "ADDR-SEGMENTS", Severity: report.Error, Desc: "The segment list of a Representation must be derivable", }) )
View Source
var ( RuleNotStarted = report.Register(report.Rule{ ID: "LIVE-NOT-STARTED", Severity: report.Warning, Desc: "The presentation has not started yet, so no segments can be checked", }) RulePublishFuture = report.Register(report.Rule{ ID: "LIVE-PUBLISHTIME", Severity: report.Warning, Desc: "MPD@publishTime should not be in the future", }) RuleNoSegments = report.Register(report.Rule{ ID: "LIVE-NO-SEGMENTS", Severity: report.Error, Desc: "A live Representation must have segments in the availability window", SpecRef: refTimingModel + " 13.3", }) RuleStaleTimeline = report.Register(report.Rule{ ID: "LIVE-STALE", Severity: report.Error, Desc: "The MPD must describe segments up to the live edge", SpecRef: refTimingModel + " 9.2.2", }) RuleEarly = report.Register(report.Rule{ ID: "LIVE-EARLY", Severity: report.Warning, Desc: "Segments should not be available before their availability start time", SpecRef: refTimingModel + " 13.3", }) )
Functions ¶
Types ¶
type Options ¶
type Options struct {
Fetcher fetch.Fetcher
// Clock overrides clock synchronization. If nil, dynamic MPDs use a clock
// synced to their UTCTiming sources, and static MPDs the local clock.
Clock clock.Clock
// Reference is the reference clock URL (http-iso). Empty means
// clock.DefaultReference; "none" disables it.
Reference string
// MaxSegments is the number of media segments checked per Representation.
// Zero means DefaultMaxSegments; negative means all (static MPDs only).
MaxSegments int
// Concurrency is the number of Representations checked in parallel.
Concurrency int
// LiveMargin keeps live checks away from the edges of the availability
// window, to allow for clock inaccuracy. Zero means DefaultLiveMargin.
LiveMargin time.Duration
// MPDUpdates is the number of times a dynamic MPD is fetched again to
// check its updates. Zero means DefaultMPDUpdates; negative disables it.
MPDUpdates int
// Profiles chooses the profiles whose rules apply. The zero value is the
// profiles that the MPD signals in @profiles.
Profiles spec.Selection
// HLSInterop adds the checks of the DASH-HLS Interoperability
// Specification CTA-5005-B, which MPDs do not signal.
HLSInterop bool
// SequenceNumbers adds the check of a sequence number convention: one
// mfhd sequence_number per segment, increasing (SEG-SEQUENCE-NUMBER).
SequenceNumbers bool
// UpdateInterval is the time between MPD fetches. Zero means about one
// segment duration, between 2 and 10 seconds.
UpdateInterval time.Duration
// Progress, if set, receives progress updates. It may be called from several goroutines.
Progress func(Progress)
}
Options control a check.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package addressing turns an MPD into a list of Representations with their segment addresses and times.
|
Package addressing turns an MPD into a list of Representations with their segment addresses and times. |
|
Package clock provides a wall clock synchronized to the UTCTiming sources signaled in an MPD, the reference that players use.
|
Package clock provides a wall clock synchronized to the UTCTiming sources signaled in an MPD, the reference that players use. |
|
cmd
|
|
|
dashcheck
command
Command dashcheck checks an MPEG-DASH stream: the MPD, its segments and, for live streams, the timing against a synchronized clock.
|
Command dashcheck checks an MPEG-DASH stream: the MPD, its segments and, for live streams, the timing against a synchronized clock. |
|
dashcheck-wasm
command
Command dashcheck-wasm exposes dashcheck to JavaScript.
|
Command dashcheck-wasm exposes dashcheck to JavaScript. |
|
Package fetch abstracts HTTP access so that the checks run unchanged natively (net/http, local files) and in the browser (fetch API via wasm).
|
Package fetch abstracts HTTP access so that the checks run unchanged natively (net/http, local files) and in the browser (fetch API via wasm). |
|
coverage
Package coverage tracks which checks of the DASH-IF Conformance tool have been ported to dashcheck.
|
Package coverage tracks which checks of the DASH-IF Conformance tool have been ported to dashcheck. |
|
Package mpdcheck validates an MPD: XML well-formedness and schema, followed by semantic rules on the typed MPD model from dash-mpd.
|
Package mpdcheck validates an MPD: XML well-formedness and schema, followed by semantic rules on the typed MPD model from dash-mpd. |
|
Package report defines the findings produced by all checks.
|
Package report defines the findings produced by all checks. |
|
Package schema validates MPDs against the MPEG-DASH XML schema.
|
Package schema validates MPDs against the MPEG-DASH XML schema. |
|
Package segcheck checks initialization and media segments with mp4ff, and cross-checks them against the MPD.
|
Package segcheck checks initialization and media segments with mp4ff, and cross-checks them against the MPD. |
|
Package spec lists the profiles that turn on profile-specific rules, and lets the user choose which of them an MPD is checked against.
|
Package spec lists the profiles that turn on profile-specific rules, and lets the user choose which of them an MPD is checked against. |
Click to show internal directories.
Click to hide internal directories.