Skip to content

Commit

Permalink
fix: update DASH-IF CPP to ECCP following DASH-IF IOP 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Jan 17, 2024
1 parent babcb74 commit 0a47d1a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
23 changes: 12 additions & 11 deletions mpd/mpd.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,10 @@ type ContentProtectionType struct {
Pssh *PsshType `xml:"urn:mpeg:cenc:2013 cenc:pssh,omitempty"`
// MSPro is Microsoft PlayReady provisioning data with namespace "urn:microsoft:playready and "prefix "mspr".
MSPro *MSProType `xml:"urn:microsoft:playready mspr:pro,omitempty"`
// ClearKey is DASH-IF clear key
ClearKey *ClearKeyType `xml:"http://dashif.org/guidelines/clearKey ck:Laurl,omitempty"`
// LaURL is DASH-IF License Acquisition URL.
LaURL *LaURL `xml:"https://dashif.org/ dashif:laurl,omitempty"`
// LaURL is DASH-IF License Acquisition URL according to DASH-IF IOp v5.0.
LaURL *LaURLType `xml:"https://dashif.org/CPS dashif:Laurl,omitempty"`
// AuthzURL is DASH-IF clear key authorization URL according to DASH-IF IOp v5.0.
AuthzURL *AuthzURLType `xml:"https://dashif.org/CPS dashif:Authzurl,omitempty"`
// MarlinContentIds is Marlin Content Ids containing one or more MarlineContentId elements.
MarlinContentIds *MarlinContentIds `xml:"urn:marlin:mas:1-0:services:schemas:mpd mas:MarlinContentIds,omitempty"`
DescriptorType
Expand All @@ -537,15 +537,16 @@ type MSProType struct {
Value string `xml:",chardata"`
}

// ClearKeyType is DASH-IF clear key type
type ClearKeyType struct {
LicType string `xml:"Lic_type,attr"`
Value string `xml:",chardata"`
// LaURLType is License Acquisition URL according to DASH-IF IOP v5.0.
type LaURLType struct {
LicenseType string `xml:"licenseType,attr,omitempty"`
Value AnyURI `xml:",chardata"`
}

// LaURL is License Acquisition URL.
type LaURL struct {
Value string `xml:",chardata"`
// AuthzURLType is DASH-IF Authzurl according to DASH-IF IOp v5.0.
type AuthzURLType struct {
AuthzType string `xml:"authzType,attr,omitempty"`
Value AnyURI `xml:",chardata"`
}

// MarlinContentIds is Marlin Content Ids containing one or more MarlineContentId elements.
Expand Down
8 changes: 4 additions & 4 deletions mpd/testdata/livesim/multi-drm.mpd
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" ?>
<MPD xmlns:cenc="urn:mpeg:cenc:2013" xmlns:ck="http://dashif.org/guidelines/clearKey" xmlns:dashif="https://dashif.org/" xmlns:mas="urn:marlin:mas:1-0:services:schemas:mpd" xmlns:mspr="urn:microsoft:playready" xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" minBufferTime="PT1.92S" mediaPresentationDuration="PT5S" type="static">
<MPD xmlns:cenc="urn:mpeg:cenc:2013" xmlns:dashif="https://dashif.org/CPS" xmlns:mas="urn:marlin:mas:1-0:services:schemas:mpd" xmlns:mspr="urn:microsoft:playready" xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" minBufferTime="PT1.92S" mediaPresentationDuration="PT5S" type="static">
<Period>
<AdaptationSet mimeType="video/mp4" segmentAlignment="true" startWithSAP="1" maxWidth="640" maxHeight="360">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="121a0fca-0f1b-475b-8910-297fa8e0a07e"/>
<!-- Clear Key -->
<!-- DASH-IF Enhanced Clear Key Content Protection (ECCP) -->
<ContentProtection schemeIdUri="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e" value="ClearKey1.0">
<ck:Laurl Lic_type="EME-1.0">http://clearkey.source.org</ck:Laurl>
<dashif:laurl>http://clearkey.source.org</dashif:laurl>
<dashif:Laurl licenseType="EME-1.0">https://clearkey.source.org</dashif:Laurl>
<dashif:Authzurl authzType="complex">https://authentication.source.org</dashif:Authzurl>
</ContentProtection>
<!-- Marlin -->
<ContentProtection schemeIdUri="urn:uuid:5E629AF5-38DA-4063-8977-97FFBD9902D4">
Expand Down

0 comments on commit 0a47d1a

Please sign in to comment.