Skip to content
Open
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
13 changes: 9 additions & 4 deletions mpd_inspector/parser/mpd_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class PSSH(Tag):

@cached_property
def pssh(self):
return self.element.attrib.get("pssh")
return self.element.text.strip()


class ContentProtection(Tag):
Expand All @@ -101,7 +101,7 @@ def __init__(self, element):
self.tag_map = {
"default_key_id": "default_KId",
"ns2_key_id": "ns2:default_KID",
"cenc_default_kid": "cenc:default_KID",
"cenc_default_kid": "{urn:mpeg:cenc:2013}default_KID",
}

@cached_property
Expand All @@ -126,11 +126,16 @@ def ns2_key_id(self):

@cached_property
def cenc_default_kid(self):
return self.element.attrib.get("cenc:default_KID")
return self.element.attrib.get("{urn:mpeg:cenc:2013}default_KID")

@cached_property
def pssh(self):
return PSSH(self.element.attrib.get("cenc:pssh"))
return [
PSSH(member)
for member in self.element.xpath(
LOOKUP_STR_FORMAT.format(target="pssh")
)
]


class RepresentationBase(Tag): # pylint: disable=too-many-public-methods
Expand Down