Skip to content
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
14 changes: 7 additions & 7 deletions tests/DASH-IF-manifests.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
{"url":"https://media.axprod.net/TestVectors/v7-MultiDRM-MultiKey-MultiPeriod/Manifest_ClearKey.mpd"},
{"url":"https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/Manifest_AudioOnly_ClearKey.mpd"},
{"url":"https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/Manifest_1080p_ClearKey.mpd"},
{"url":"https://raw.githubusercontent.com/Dash-Industry-Forum/SAND-Test-Vectors/master/mpd/dash-if/WSSReporting-OK-MultiRes.mpd"},
{"url":"https://raw.githubusercontent.com/Dash-Industry-Forum/SAND-Test-Vectors/master/mpd/dash-if/HTTPSReporting-Conf-OK-MultiRes.mpd"},
{"url":"https://raw.githubusercontent.com/Dash-Industry-Forum/SAND-Test-Vectors/master/mpd/dash-if/WSSReporting-OK-MultiRes.mpd", "status":"fails"},
{"url":"https://raw.githubusercontent.com/Dash-Industry-Forum/SAND-Test-Vectors/master/mpd/dash-if/HTTPSReporting-Conf-OK-MultiRes.mpd", "status":"fails"},
{"url":"https://dash.akamaized.net/dash264/TestCasesNegative/2/1.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestCasesNegative/2/2.mpd"},
{"url":"https://media.axprod.net/TestVectors/v9-MultiFormat/Clear/Manifest_1080p.mpd"},
Expand Down Expand Up @@ -132,8 +132,8 @@
{"dead-url-405":"https://livesim.dashif.org/livesim-dev/periods_60/xlink_30/insertad_1/testpic_2s/Manifest.mpd"},
{"url":"https://livesim.dashif.org/livesim/chunkdur_1/ato_7/testpic4_8s/Manifest300.mpd"},
{"url":"https://livesim.dashif.org/livesim/chunkdur_1/ato_7/testpic4_8s/Manifest.mpd"},
{"url":"https://raw.githubusercontent.com/Dash-Industry-Forum/SAND-Test-Vectors/master/mpd/dash-if/HTTPSReporting-OK-MultiRes.mpd"},
{"url":"https://raw.githubusercontent.com/Dash-Industry-Forum/SAND-Test-Vectors/master/mpd/dash-if/WSSReporting-OK-MultiRes.mpd"},
{"url":"https://raw.githubusercontent.com/Dash-Industry-Forum/SAND-Test-Vectors/master/mpd/dash-if/HTTPSReporting-OK-MultiRes.mpd", "status" : "fails"},
{"url":"https://raw.githubusercontent.com/Dash-Industry-Forum/SAND-Test-Vectors/master/mpd/dash-if/WSSReporting-OK-MultiRes.mpd", "status" : "fails"},
{"dead-url-404":"https://livesim.dashif.org/livesim/periods_60/mpdcallback_30/testpic_2s/Manifest.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestCasesMCA/fraunhofer/MPEGH_Stereo_lc_mha1/1/Sintel/sintel_audio_video_mpegh_mha1_stereo_sidx.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestCasesMCA/dolby/1/1/ChID_voices_51_256_ddp.mpd"},
Expand Down Expand Up @@ -249,7 +249,7 @@
{"url":"https://livesim.dashif.org/livesim/testpic_2s/Manifest.mpd#t=posix:now"},
{"url":"https://dash.akamaized.net/dash264/TestCasesIOP33/MPDChaining/regular_chain/1/manifest_regular_MPDChaining_live.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestCasesIOP33/MPDChaining/regular_chain/2/manifest_regular_MPDChaining_OnDemand.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestCasesIOP33/resolveToZero/1/manifest.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestCasesIOP33/resolveToZero/1/manifest.mpd", "status" :"fails"},
{"url":"https://dash.akamaized.net/dash264/TestCases/4b/qualcomm/3/Solekai.mpd"},
{"url":"https://media.axprod.net/TestVectors/v7-Clear/Manifest_1080p.mpd"},
{"url":"https://media.axprod.net/TestVectors/v7-Clear/Manifest.mpd"},
Expand All @@ -262,7 +262,7 @@
{"url":"https://dash.akamaized.net/dash264/TestCasesHD/1c/qualcomm/1/MultiRate.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestCasesHD/MultiPeriod_OnDemand/ThreePeriods/ThreePeriod_OnDemand2.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestCasesHD/MultiPeriod_OnDemand/ThreePeriods/ThreePeriod_OnDemand_presentationDur.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestCasesHD/MultiPeriod_OnDemand/ThreePeriods/ThreePeriod_OnDemand_presentationDur_AudioTrim.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestCasesHD/MultiPeriod_OnDemand/ThreePeriods/ThreePeriod_OnDemand_presentationDur_AudioTrim.mpd", "status":"fails"},
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/CMS/Axinom-CMS_AVC_MultiRes_MultiRate_25fps.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/CMS/Axinom-CMS_AVC_MultiRes_MultiRate_2997fps.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/CMS/Axinom-CMS_HEVC_MultiRes_MultiRate_25fps.mpd"},
Expand All @@ -271,7 +271,7 @@
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/CMS/Axinom-CMS_MultiCodec_MultiRes_MultiRate_2997fps.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/DRM/Axinom-DRM-in-disconnected-environments_AVC_MultiRes_MultiRate_25fps.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/DRM/Axinom-DRM-in-disconnected-environments_AVC_MultiRes_MultiRate_2997fps.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/DRM/Axinom-DRM-in-disconnected-environments_HEVC_MultiRes_MultiRate_25fps.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/DRM/Axinom-DRM-in-disconnected-environments_HEVC_MultiRes_MultiRate_25fps.mpd", "status":"fails"},
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/DRM/Axinom-DRM-in-disconnected-environments_HEVC_MultiRes_MultiRate_2997fps.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/DRM/Axinom-DRM-in-disconnected-environments_MultiCodec_MultiRes_MultiRate_25fps.mpd"},
{"url":"https://dash.akamaized.net/dash264/TestAdvertising/DRM/Axinom-DRM-in-disconnected-environments_MultiCodec_MultiRes_MultiRate_2997fps.mpd"},
Expand Down
10 changes: 1 addition & 9 deletions tests/regression-test-DASHIF-db.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,7 @@

DASHIF_dataset_url = "https://raw.githubusercontent.com/Dash-Industry-Forum/Test-Assets-Dataset-Public/master/dataset/data/testvector.json"

class PrefixResolver(etree.Resolver):
# https://lxml.de/resolvers.html
def __init__(self, prefix):
self.prefix = prefix.lower()

def resolve(self, url, pubid, context):
if url.lower().startswith(self.prefix):
res=requests.get(url, allow_redirects=True)
return self.resolve_string(res.text, context)
from resolver import PrefixResolver

class TestManifests(unittest.TestCase):
def setUp(self):
Expand Down
14 changes: 4 additions & 10 deletions tests/regression-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,13 @@

from lxml import etree

from resolver import PrefixResolver

DVBManifestsFile="DVB-manifests.json"
HbbTVManifestsFile="HbbTV-manifests.json"
MPEGCMAFManifestsFile="MPEG-CMAF-manifests.json"
DASHIFManifestsFile="DASH-IF-manifests.json"

class PrefixResolver(etree.Resolver):
# https://lxml.de/resolvers.html
def __init__(self, prefix):
self.prefix = prefix.lower()

def resolve(self, url, pubid, context):
if url.lower().startswith(self.prefix):
res=requests.get(url, allow_redirects=True)
return self.resolve_string(res.text, context)

class TestManifests(unittest.TestCase):
def setUp(self):
self.log = logging.getLogger('MDP_tests')
Expand All @@ -43,6 +35,8 @@ def setUp(self):
self.mpd_schema = etree.XMLSchema(etree.parse(schema_file, self.xsdParser))
# is_python3 = sys.version_info.major == 3
self.xmlParser=etree.XMLParser(load_dtd=True, no_network=False, huge_tree=True, resolve_entities=True)
self.xmlParser.resolvers.add(PrefixResolver("https"))
self.xmlParser.resolvers.add(PrefixResolver("http"))

def check_a_manifest(self, mpdURL, source):
with self.subTest(msg=mpdURL):
Expand Down
12 changes: 12 additions & 0 deletions tests/resolver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import requests
from lxml import etree

class PrefixResolver(etree.Resolver):
# https://lxml.de/resolvers.html
def __init__(self, prefix):
self.prefix = prefix.lower()

def resolve(self, url, pubid, context):
if url.lower().startswith(self.prefix):
res=requests.get(url, allow_redirects=True)
return self.resolve_string(res.text, context)