Skip to content

Latest commit

 

History

History
304 lines (218 loc) · 10.7 KB

File metadata and controls

304 lines (218 loc) · 10.7 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Added

  • SCTE-214 MPD extensions per ANSI/SCTE 214-1 2024: supplementalProfiles and supplementalCodecs attributes on RepresentationBaseType (available on AdaptationSet, Representation and SubRepresentation), and ContentIdentifier elements on DescriptorType for UPID-based asset identification in AssetIdentifier and SupplementalProperty. The Go identifiers carry an SCTE214 prefix (SCTE214SupplementalCodecs, SCTE214ContentIdentifiers, SCTE214ContentIdentifierType, ...) to keep the plain names free for future DASH MPD schema updates.
  • Exported constants for the SCTE-214 namespaces (SCTE214Namespace, SCTE214Namespace2021) and the descriptor scheme URIs defined by the specification (SCTE214SchemeId*).

0.16.0 - 2026-06-26

Added

  • WriteXML(elem any, w io.Writer, indent string, withHeader bool) exported function that streams the XML encoding of any element to w. (*MPD).Write now delegates to it.
  • (*Period).Write(w io.Writer, indent string) and (*Period).WriteToString(indent string) for serializing a single Period.
  • SCTE-35 splice information signalling on EventType per ANSI/SCTE 35 2023r2: new Signal (SCTE 214-1 wrapper) and SpliceInfoSection (direct-under-Event) fields, all six splice commands and six splice descriptors, plus Binary, Ext and anyAttribute extensibility.
  • SCTE-35 namespace pass-through: the URI seen on unmarshal (http://www.scte.org/schemas/35 or the legacy …/35/2016) is replayed verbatim on marshal.

0.15.1 - 2026-06-07

Changed

  • AlternativeMPDReplaceEventType.Clip is now a *bool (default true) so that clip="false" can be serialized. With a plain bool + omitempty the false value was dropped and conforming clients applied the schema default (true), i.e. the opposite of the intent.

Fixed

  • AlternativeMPDEventType.EarliestResolutionTimeOffset now renders in plain decimal notation instead of scientific notation (e.g. 5400000 rather than 5.4e+06) by using the FloatInf64 type.

0.15.0 - 2026-06-05

Added

  • ContentSteering element on MPD level (Ed. 6)
  • minBufferTime override attribute on Period (Ed. 6)
  • BaseURL element on EventStream (Ed. 6)
  • k attribute on MultipleSegmentBaseType (Ed. 6)

Changed

  • DASH schema and example MPDs aligned with MPEGGroup/DASHSchema 6th-Ed commit a855144 (2026-04-22)
  • SegmentSequenceProperties is now a sequence (maxOccurs=unbounded) on RepresentationBaseType
  • RequestParam moved on MPD/Period/AdaptationSet/Representation/EventStream to match the schema sequence
  • RunLengthType.r is now uint32 (was uint64) per Ed. 6 schema
  • Upgraded vendored xml/ package to the current head of golang/go PR #48641 (ydnar/go@a79fce77, rebased on Go master 2024-10-28). Brings in stdlib encoding/xml fixes since Go 1.17, including CVE-2022-30633 (unmarshal depth limit) and several panic fixes. The local customization that disables tab/ newline escaping in CharData byte content is preserved.

Performance

  • Major reduction in allocations and CPU on the XML marshal/unmarshal hot paths (#2–#12 in discovery/performance_plan.md). Includes a pooled *xml.Encoder (AcquireEncoder/ReleaseEncoder), an O(1) attribute lookup map on typeInfo, cached reflect.Type.Implements results, a per-Decoder name-intern map, and streaming (*MPD).Write.

Removed

  • EventRestrictionsType (its executeOnce/noJump/skipAfter attributes are now on AlternativeMPDEventType)
  • ServiceDescriptionId attribute on AlternativeMPDEventType
  • ServiceDescription element on EventStream
  • kL and sspL attributes (dropped in Ed. 6)
  • Pattern field on SegmentTemplateType (Pattern lives on SegmentTimeline)
  • Regex-based duration parser (xmlDurationRegex and helpers); replaced by a single-pass scanner with stricter validation and zero allocations.
  • Linear attribute-matching loop in xml/read.go; replaced by O(1) map lookup.
  • Repeated typ.Implements(...) calls in xml/marshal.go; replaced by a sync.Map-cached result per reflect.Type.
  • xml.MarshalIndent round-trip inside (*MPD).Write; replaced by direct streaming through a pooled encoder.

0.14.1 - 2026-02-06

Fixed

  • S.D omitempty since not allowed with S.P (Pattern)

0.14.0 - 2025-11-11

Changed

  • AddProfile now avoids duplicates

Added

  • RequestParam field in MPD and Period structs
  • UrlParameterNamespace2025 constant
  • Header field in ExtendedUrlInfoType
  • Profiles and new list type constant
  • DASH-IF Certurl element to ContentProtectionType (as a slice)
  • Test MPDs for EC-3 and MPEG-H
  • Makefile additions including pre-commit and codespell

0.13.0 - 2025-07-28

Changed

  • Updated golangci-lint and added Makefile
  • Duration is now printed with millisecond accuracy unless value less than one millisecond
  • PatchLocationType according to Ed. 6
  • Location according to Ed. 6
  • ImportedMpdType according to Ed. 6
  • PlaybackRestrictionsType updated skipAfter to Duration according to Ed. 6
  • Examples from latest DASHSchema content G.2, G.6, G.7 and G.9

Added

  • All elements according to DASH Ed. 6 contribution to latest Draft June 2025
  • AlternativeMPD element according to Ed. 6
  • ContentSteering according to Ed. 6
  • ClientDataReporting according to Ed. 6
  • SegmentSequenceProperties according to Ed. 6
  • RunLengthType according to Ed. 6
  • Pattern and PatternType according to Ed. 6
  • SupVideoInfoType according to Ed. 6 xsd
  • SegmentSequencePropertiesType according to Ed. 6
  • RequestParam according to Ed. 6
  • Example DASHSchema content G.23 to G.30.5 and K.6.4

0.12.0 - 2024-12-20

Added

  • Ed5Amd1 element <SelectionInfo> inside mixed XML type <Event>
  • UrlQueryInfo and ExtUrlQueryInfo from MPEG-DASH part 1 Annex I

Fixed

  • Updated the G16 example
  • Avoid escaping XML tab and newline in text to align with DASHSchema test content
  • Handle text inside <Event>element

Chore

  • Updated dependencies

0.11.1 - 2024-01-17

Fixed

  • Update the DASH-IF ClearKey definitions to follow DASH-IF IOP v5.0

0.11.0 - 2024-01-04

Added

  • GetContentProtections, GetMimeType, GetCodecs, and GetSegmentTemplate methods for AdaptationSet and Representation
  • ContentProtection elements and name spaces for Marlin DRM and DASH-IF ClearKey

Fixed

  • ContentProtection and other parts of RepresentationBaseType moved before other elements in AdaptationSet and Representation

0.10.0 - 2023-05-26

Changed

  • NewMPD function now also sets DASH namespace
  • mpd.Write now has two parameters to set indentation and an optional XML header
  • renamed constants StaticMpdType and DynamicMpdType to STATIC_TYPE and DYNAMIC_TYPE

Added

Lots of convenience functions to create MPDs

  • mpd.WriteToString function to return a string
  • constants for many common values like audio-channel-configuration
  • rep.SetSegmentBase method
  • NewBaseURL function for simple BaseURL cases
  • NewDescriptor function for creating a DescriptorType instance
  • NewRole function for creating a new DescriptorType for a role
  • listOfTypes.AddProfile method to add a profile
  • NewAdaptationSetWithParams function for generating AdaptationSet
  • NewRepresentationWithID function for generating a representation with a few parameters
  • NewAudioRepresentation function for audio representations
  • NewVideoRepresentation function for video representation
  • Seconds2DurPtrFloat64 to generate a pointer to duration specified as seconds using float64

0.9.1 - 2023-05-17

  • Same as 0.9.0, but new version number due to mistake in release process

0.9.0 - 2023-05-17

Added

  • Parents of AdaptationSets, Representations, and SubRepresentations
  • Methods AppendAdaptationSet to Period, and so on
  • New Clone methods

0.8.0 - 2023-04-10

Changed

  • PeriodType renamed Period
  • PeriodType is now PTRegular, PTEarlyAvaiable etc
  • GetRepInit changed to GetInit() method on Representation
  • GetRepMedia changed to GetMedia() method on Representation
  • NewMPD() now takes mpdType as argument

Added

  • New Duration method Seconds()
  • New DateTime method ConvertToSeconds()
  • New Period methods AbsoluteStart(), GetStart(), GetType(), GetIndex()
  • Parent/SetParent methods for Period, AdaptationSet, Representataion, and SubRepresentation
  • New Append methods the above that appends and sets parent
  • New type PeriodType
  • Declared errors: ErrPeriodNotFound and similar
  • New function MPDFromBytes() to unmarshal MPD

0.7.0 - 2023-03-24

Changed

  • ConvertToDateTime() crops fraction of second to milliseconds instead of full seconds

Fixed

  • Infinite value of availabilityTimeOffset is now marshalled/unmarshalled as "INF"

Added

  • ConvertToDateTimeMS is new function

0.6.1 - 2023-03-07

Changed

  • Updated dependencies

0.6.0 - 2023-03-03

API change

  • Changed composition of some MPD elements to not use pointers

Added

  • Functions to create new elements
  • Example code to generate new MPD from scratch
  • Added XMLNames to structure with unique names in MPD
  • Methods SetTimescale and GetTimescale for SegmentTemplate

0.5.0 - 2023-01-20

Added

  • First release with complete support of all XMLSchema elements
  • Tests with well-known MPDs
  • Tweaked XML library to support namespaces