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 Lint issues #58

Merged
merged 1 commit into from
Mar 4, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions mpegdash/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ def write(self, xmlnode):
write_attr_value(xmlnode, "cenc:default_KID", self.cenc_default_kid)
write_child_node(xmlnode, "cenc:pssh", self.pssh)


class ContentComponent(XMLNode):
def __init__(self):
self.id = None # xs:unsigendInt
Expand Down
12 changes: 9 additions & 3 deletions tests/test_xmltompd.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,16 @@ def test_xml2mpd_parse_vector_type_attributes(self):

def test_xml2mpd_from_file_with_content_protection(self):
mpd = MPEGDASHParser.parse('./tests/mpd-samples/with_content_protection.mpd')
self.assertEqual("6c28b624-5854-5b8c-8033-9d61ac0c039c", mpd.periods[0].adaptation_sets[0].content_protections[0].cenc_default_kid)
self.assertEqual("urn:mpeg:dash:mp4protection:2011", mpd.periods[0].adaptation_sets[0].content_protections[0].scheme_id_uri)
self.assertEqual(
"6c28b624-5854-5b8c-8033-9d61ac0c039c",
mpd.periods[0].adaptation_sets[0].content_protections[0].cenc_default_kid
)
self.assertEqual(
"urn:mpeg:dash:mp4protection:2011",
mpd.periods[0].adaptation_sets[0].content_protections[0].scheme_id_uri
)
self.assertTrue(mpd.periods[0].adaptation_sets[0].content_protections[1].pssh[0].pssh is not None)

def assert_mpd(self, mpd):
self.assertTrue(mpd is not None)
self.assertTrue(len(mpd.periods) > 0)
Expand Down