Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update DASH-IF CPP to ECCP following DASH-IF IOP 5.0 #26

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading