add different streams to dummy objects

This commit is contained in:
Felix 2017-04-21 20:58:45 +02:00
parent 10908f2636
commit ba06bbc783
2 changed files with 32 additions and 1 deletions

View file

@ -125,7 +125,11 @@ public class Stream implements Parcelable {
dummy.setTranslated(false);
dummy.setVideoSize(new int[]{1, 1});
dummy.setUrls(new HashMap<>());
dummy.getUrls().put("hls",StreamUrl.getDummyObject());
dummy.getUrls().put("hls",StreamUrl.getDummyObject("hls"));
dummy.getUrls().put("dizzy",StreamUrl.getDummyObject("dizzy"));
dummy.getUrls().put("webm,vp8",StreamUrl.getDummyObject("webm,vp8"));
dummy.getUrls().put("mp4,h265",StreamUrl.getDummyObject("mp4,h265"));
dummy.getUrls().put("4x3",StreamUrl.getDummyObject("4x3"));
dummy.setType("dummy");
return dummy;
}

View file

@ -77,6 +77,33 @@ public class StreamUrl implements Parcelable {
dest.writeString(url);
}
public static StreamUrl getDummyObject(String codec){
StreamUrl dummy = getDummyObject();
switch (codec){
case "webm,vp8":
dummy.setUrl("https://storage.googleapis.com/wvmedia/clear/vp9/tears/tears.mpd");
dummy.setDisplay("webm,vp8");
break;
case "mp4,h265":
dummy.setUrl("https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears_hd.mpd");
dummy.setDisplay("mp4,h265");
break;
case "hls":
dummy.setUrl("https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8");
dummy.setDisplay("hls");
break;
case "4x3":
dummy.setUrl("https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8");
dummy.setDisplay("4x3");
break;
case "dizzy":
dummy.setUrl("http://html5demos.com/assets/dizzy.mp4");
dummy.setDisplay("dizzy");
break;
}
return dummy;
}
public static StreamUrl getDummyObject(){
StreamUrl dummy = new StreamUrl();
dummy.setUrl("https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8");