mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Load demo app samples from json.
Also handle .exolist.json links. This lets you put a list of samples somewhere (e.g. on the web). Clicking it opens the app and displays the samples it defines. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=123198928
This commit is contained in:
parent
b6755c145e
commit
c0cad7f396
@ -38,6 +38,18 @@
|
|||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW"/>
|
||||||
|
<category android:name="android.intent.category.DEFAULT"/>
|
||||||
|
<category android:name="android.intent.category.BROWSABLE"/>
|
||||||
|
<data android:scheme="http"/>
|
||||||
|
<data android:scheme="https"/>
|
||||||
|
<data android:scheme="content"/>
|
||||||
|
<data android:scheme="asset"/>
|
||||||
|
<data android:scheme="file"/>
|
||||||
|
<data android:host="*"/>
|
||||||
|
<data android:pathPattern=".*\\.exolist\\.json"/>
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name="com.google.android.exoplayer.demo.PlayerActivity"
|
<activity android:name="com.google.android.exoplayer.demo.PlayerActivity"
|
||||||
|
380
demo/src/main/assets/sample_media.exolist.json
Normal file
380
demo/src/main/assets/sample_media.exolist.json
Normal file
@ -0,0 +1,380 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "YouTube DASH",
|
||||||
|
"samples": [
|
||||||
|
{
|
||||||
|
"name": "Google Glass (MP4,H264)",
|
||||||
|
"uri": "http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Google Play (MP4,H264)",
|
||||||
|
"uri": "http://www.youtube.com/api/manifest/dash/id/3aa39fa2cc27967f/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=A2716F75795F5D2AF0E88962FFCD10DB79384F29.84308FF04844498CE6FBCE4731507882B8307798&key=ik0",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Google Glass (WebM,VP9)",
|
||||||
|
"uri": "http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,webm2_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=249B04F79E984D7F86B4D8DB48AE6FAF41C17AB3.7B9F0EC0505E1566E59B8E488E9419F253DDF413&key=ik0",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Google Play (WebM,VP9)",
|
||||||
|
"uri": "http://www.youtube.com/api/manifest/dash/id/3aa39fa2cc27967f/source/youtube?as=fmp4_audio_clear,webm2_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=B1C2A74783AC1CC4865EB312D7DD2D48230CC9FD.BD153B9882175F1F94BFE5141A5482313EA38E8D&key=ik0",
|
||||||
|
"type": "dash"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Widevine DASH Policy Tests (GTS)",
|
||||||
|
"samples": [
|
||||||
|
{
|
||||||
|
"name": "WV: HDCP not specified",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:d286538032258a1c:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: HDCP not required",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:48fcc369939ac96c:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: HDCP required",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:e06c39f1151da3df:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure video path required (MP4,H264)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:0894c7c8719b28a0:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure video path required (WebM,VP9)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/vp9/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:0894c7c8719b28a0:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure video path required (MP4,H265)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:0894c7c8719b28a0:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: HDCP + secure video path required",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:efd045b1eb61888a:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: 30s license duration (fails at ~30s)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:f9a34cab7b05881a:widevine_test"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Widevine HDCP Capabilities Tests",
|
||||||
|
"samples": [
|
||||||
|
{
|
||||||
|
"name": "WV: HDCP: None (not required)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:HDCP_None:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: HDCP: 1.0 required",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:HDCP_V1:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: HDCP: 2.0 required",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:HDCP_V2:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: HDCP: 2.1 required",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:HDCP_V2_1:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: HDCP: 2.2 required",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:HDCP_V2_2:widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: HDCP: No digital output",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine:HDCP_NO_DIGTAL_OUTPUT:widevine_test"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Widevine DASH: MP4,H264",
|
||||||
|
"samples": [
|
||||||
|
{
|
||||||
|
"name": "WV: Clear SD & HD (MP4,H264)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/h264/tears/tears.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Clear SD (MP4,H264)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/h264/tears/tears_sd.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Clear HD (MP4,H264)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/h264/tears/tears_hd.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Clear UHD (MP4,H264)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/h264/tears/tears_uhd.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure SD & HD (MP4,H264)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure SD (MP4,H264)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_sd.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure HD (MP4,H264)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_hd.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure UHD (MP4,H264)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_uhd.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Widevine DASH: WebM,VP9",
|
||||||
|
"samples": [
|
||||||
|
{
|
||||||
|
"name": "WV: Clear SD & HD (WebM,VP9)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/vp9/tears/tears.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Clear SD (WebM,VP9)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/vp9/tears/tears_sd.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Clear HD (WebM,VP9)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/vp9/tears/tears_hd.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Clear UHD (WebM,VP9)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/vp9/tears/tears_uhd.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure SD & HD (WebM,VP9)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/vp9/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure SD (WebM,VP9)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/vp9/tears/tears_sd.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure HD (WebM,VP9)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/vp9/tears/tears_hd.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure UHD (WebM,VP9)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/vp9/tears/tears_uhd.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Widevine DASH: MP4,H265",
|
||||||
|
"samples": [
|
||||||
|
{
|
||||||
|
"name": "WV: Clear SD & HD (MP4,H265)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Clear SD (MP4,H265)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears_sd.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Clear HD (MP4,H265)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears_hd.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Clear UHD (MP4,H265)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears_uhd.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure SD & HD (MP4,H265)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure SD (MP4,H265)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears_sd.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure HD (MP4,H265)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears_hd.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WV: Secure UHD (MP4,H265)",
|
||||||
|
"uri": "https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears_uhd.mpd",
|
||||||
|
"type": "dash",
|
||||||
|
"drm": "widevine::widevine_test"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SmoothStreaming",
|
||||||
|
"samples": [
|
||||||
|
{
|
||||||
|
"name": "Super speed",
|
||||||
|
"uri": "http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism",
|
||||||
|
"type": "smoothstreaming"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Super speed (PlayReady)",
|
||||||
|
"uri": "http://playready.directtaps.net/smoothstreaming/SSWSS720H264PR/SuperSpeedway_720.ism",
|
||||||
|
"type": "smoothstreaming",
|
||||||
|
"drm": "playready::"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "HLS",
|
||||||
|
"samples": [
|
||||||
|
{
|
||||||
|
"name": "Apple master playlist",
|
||||||
|
"uri": "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8",
|
||||||
|
"type": "hls"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Apple master playlist advanced",
|
||||||
|
"uri": "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8",
|
||||||
|
"type": "hls"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Apple TS media playlist",
|
||||||
|
"uri": "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear1/prog_index.m3u8",
|
||||||
|
"type": "hls"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Apple AAC media playlist",
|
||||||
|
"uri": "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear0/prog_index.m3u8",
|
||||||
|
"type": "hls"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Apple ID3 metadata",
|
||||||
|
"uri": "http://devimages.apple.com/samplecode/adDemo/ad.m3u8",
|
||||||
|
"type": "hls"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Misc",
|
||||||
|
"samples": [
|
||||||
|
{
|
||||||
|
"name": "Dizzy",
|
||||||
|
"uri": "http://html5demos.com/assets/dizzy.mp4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Apple AAC 10s",
|
||||||
|
"uri": "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear0/fileSequence0.aac"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Apple TS 10s",
|
||||||
|
"uri": "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear1/fileSequence0.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Android screens (Matroska)",
|
||||||
|
"uri": "http://storage.googleapis.com/exoplayer-test-media-1/mkv/android-screens-lavf-56.36.100-aac-avc-main-1280x720.mkv"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Big Buck Bunny (MP4 Video)",
|
||||||
|
"uri": "http://redirector.c.youtube.com/videoplayback?id=604ed5ce52eda7ee&itag=22&source=youtube&sparams=ip,ipbits,expire,source,id&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=513F28C7FDCBEC60A66C86C9A393556C99DC47FB.04C88036EEE12565A1ED864A875A58F15D8B5300&key=ik0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Screens 360P (WebM,VP9,No Audio)",
|
||||||
|
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-vp9-360.webm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Screens 480p (FMP4,H264,No Audio)",
|
||||||
|
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-avc-baseline-480.mp4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Screens 1080p (FMP4,H264, No Audio)",
|
||||||
|
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-137.mp4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Screens (FMP4,AAC Audio)",
|
||||||
|
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/audio-141.mp4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Google Play (MP3 Audio)",
|
||||||
|
"uri": "http://storage.googleapis.com/exoplayer-test-media-0/play.mp3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Google Play (Ogg/Vorbis Audio)",
|
||||||
|
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/ogg/play.ogg"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Google Glass (WebM Video with Vorbis Audio)",
|
||||||
|
"uri": "http://demos.webmproject.org/exoplayer/glass_vp9_vorbis.webm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Google Glass (VP9 in MP4/ISO-BMFF)",
|
||||||
|
"uri": "http://demos.webmproject.org/exoplayer/glass.mp4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Google Glass DASH - VP9 and Opus",
|
||||||
|
"uri": "http://demos.webmproject.org/dash/201410/vp9_glass/manifest_vp9_opus.mpd",
|
||||||
|
"type": "dash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Big Buck Bunny (FLV Video)",
|
||||||
|
"uri": "http://vod.leasewebcdn.com/bbb.flv?ri=1024&rs=150&start=0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
@ -29,7 +29,6 @@ import com.google.android.exoplayer.SampleSource;
|
|||||||
import com.google.android.exoplayer.SimpleExoPlayer;
|
import com.google.android.exoplayer.SimpleExoPlayer;
|
||||||
import com.google.android.exoplayer.TrackGroupArray;
|
import com.google.android.exoplayer.TrackGroupArray;
|
||||||
import com.google.android.exoplayer.dash.DashSampleSource;
|
import com.google.android.exoplayer.dash.DashSampleSource;
|
||||||
import com.google.android.exoplayer.demo.ui.TrackSelectionHelper;
|
|
||||||
import com.google.android.exoplayer.drm.DrmSessionManager;
|
import com.google.android.exoplayer.drm.DrmSessionManager;
|
||||||
import com.google.android.exoplayer.drm.StreamingDrmSessionManager;
|
import com.google.android.exoplayer.drm.StreamingDrmSessionManager;
|
||||||
import com.google.android.exoplayer.drm.UnsupportedDrmException;
|
import com.google.android.exoplayer.drm.UnsupportedDrmException;
|
||||||
|
@ -15,13 +15,22 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer.demo;
|
package com.google.android.exoplayer.demo;
|
||||||
|
|
||||||
import com.google.android.exoplayer.demo.Samples.Sample;
|
import com.google.android.exoplayer.C;
|
||||||
|
import com.google.android.exoplayer.ParserException;
|
||||||
|
import com.google.android.exoplayer.upstream.DataSource;
|
||||||
|
import com.google.android.exoplayer.upstream.DataSourceInputStream;
|
||||||
|
import com.google.android.exoplayer.upstream.DataSpec;
|
||||||
|
import com.google.android.exoplayer.upstream.DefaultDataSource;
|
||||||
|
import com.google.android.exoplayer.util.Util;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.util.JsonReader;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -29,63 +38,52 @@ import android.widget.BaseExpandableListAdapter;
|
|||||||
import android.widget.ExpandableListView;
|
import android.widget.ExpandableListView;
|
||||||
import android.widget.ExpandableListView.OnChildClickListener;
|
import android.widget.ExpandableListView.OnChildClickListener;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An activity for selecting from a number of samples.
|
* An activity for selecting from a list of samples.
|
||||||
*/
|
*/
|
||||||
public class SampleChooserActivity extends Activity {
|
public class SampleChooserActivity extends Activity {
|
||||||
|
|
||||||
|
private static final String TAG = "SampleChooserActivity";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.sample_chooser_activity);
|
setContentView(R.layout.sample_chooser_activity);
|
||||||
final List<SampleGroup> sampleGroups = new ArrayList<>();
|
Intent intent = getIntent();
|
||||||
SampleGroup group = new SampleGroup("YouTube DASH");
|
String dataUri = intent.getDataString();
|
||||||
group.addAll(Samples.YOUTUBE_DASH_MP4);
|
String[] uris;
|
||||||
group.addAll(Samples.YOUTUBE_DASH_WEBM);
|
if (dataUri != null) {
|
||||||
sampleGroups.add(group);
|
uris = new String[] {dataUri};
|
||||||
group = new SampleGroup("Widevine DASH Policy Tests (GTS)");
|
} else {
|
||||||
group.addAll(Samples.WIDEVINE_GTS);
|
uris = new String[] {
|
||||||
sampleGroups.add(group);
|
"asset:///sample_media.exolist.json",
|
||||||
group = new SampleGroup("Widevine HDCP Capabilities Tests");
|
};
|
||||||
group.addAll(Samples.WIDEVINE_HDCP);
|
}
|
||||||
sampleGroups.add(group);
|
SampleListLoader loaderTask = new SampleListLoader();
|
||||||
group = new SampleGroup("Widevine DASH: MP4,H264");
|
loaderTask.execute(uris);
|
||||||
group.addAll(Samples.WIDEVINE_H264_MP4_CLEAR);
|
}
|
||||||
group.addAll(Samples.WIDEVINE_H264_MP4_SECURE);
|
|
||||||
sampleGroups.add(group);
|
|
||||||
group = new SampleGroup("Widevine DASH: WebM,VP9");
|
|
||||||
group.addAll(Samples.WIDEVINE_VP9_WEBM_CLEAR);
|
|
||||||
group.addAll(Samples.WIDEVINE_VP9_WEBM_SECURE);
|
|
||||||
sampleGroups.add(group);
|
|
||||||
group = new SampleGroup("Widevine DASH: MP4,H265");
|
|
||||||
group.addAll(Samples.WIDEVINE_H265_MP4_CLEAR);
|
|
||||||
group.addAll(Samples.WIDEVINE_H265_MP4_SECURE);
|
|
||||||
sampleGroups.add(group);
|
|
||||||
group = new SampleGroup("SmoothStreaming");
|
|
||||||
group.addAll(Samples.SMOOTHSTREAMING);
|
|
||||||
sampleGroups.add(group);
|
|
||||||
group = new SampleGroup("HLS");
|
|
||||||
group.addAll(Samples.HLS);
|
|
||||||
sampleGroups.add(group);
|
|
||||||
group = new SampleGroup("Misc");
|
|
||||||
group.addAll(Samples.MISC);
|
|
||||||
sampleGroups.add(group);
|
|
||||||
group = new SampleGroup("Extensions");
|
|
||||||
group.addAll(Samples.EXTENSION);
|
|
||||||
sampleGroups.add(group);
|
|
||||||
|
|
||||||
|
private void onSampleGroups(final List<SampleGroup> groups, boolean sawError) {
|
||||||
|
if (sawError) {
|
||||||
|
Toast.makeText(getApplicationContext(), R.string.sample_list_load_error, Toast.LENGTH_LONG)
|
||||||
|
.show();
|
||||||
|
}
|
||||||
ExpandableListView sampleList = (ExpandableListView) findViewById(R.id.sample_list);
|
ExpandableListView sampleList = (ExpandableListView) findViewById(R.id.sample_list);
|
||||||
sampleList.setAdapter(new SampleAdapter(this, sampleGroups));
|
sampleList.setAdapter(new SampleAdapter(this, groups));
|
||||||
sampleList.setOnChildClickListener(new OnChildClickListener() {
|
sampleList.setOnChildClickListener(new OnChildClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onChildClick(ExpandableListView parent, View view, int groupPosition,
|
public boolean onChildClick(ExpandableListView parent, View view, int groupPosition,
|
||||||
int childPosition, long id) {
|
int childPosition, long id) {
|
||||||
onSampleSelected(sampleGroups.get(groupPosition).samples.get(childPosition));
|
onSampleSelected(groups.get(groupPosition).samples.get(childPosition));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -102,6 +100,150 @@ public class SampleChooserActivity extends Activity {
|
|||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private final class SampleListLoader extends AsyncTask<String, Void, List<SampleGroup>> {
|
||||||
|
|
||||||
|
private boolean sawError;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<SampleGroup> doInBackground(String... uris) {
|
||||||
|
List<SampleGroup> result = new ArrayList<>();
|
||||||
|
Context context = getApplicationContext();
|
||||||
|
String userAgent = Util.getUserAgent(context, "ExoPlayerDemo");
|
||||||
|
DataSource dataSource = new DefaultDataSource(context, null, userAgent, false);
|
||||||
|
for (String uri : uris) {
|
||||||
|
DataSpec dataSpec = new DataSpec(Uri.parse(uri));
|
||||||
|
InputStream inputStream = new DataSourceInputStream(dataSource, dataSpec);
|
||||||
|
try {
|
||||||
|
readSampleGroups(new JsonReader(new InputStreamReader(inputStream, "UTF-8")), result);
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log.e(TAG, "Error loading sample list: " + uri, e);
|
||||||
|
sawError = true;
|
||||||
|
} finally {
|
||||||
|
Util.closeQuietly(dataSource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPostExecute(List<SampleGroup> result) {
|
||||||
|
onSampleGroups(result, sawError);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void readSampleGroups(JsonReader reader, List<SampleGroup> groups) throws IOException {
|
||||||
|
reader.beginArray();
|
||||||
|
while (reader.hasNext()) {
|
||||||
|
readSampleGroup(reader, groups);
|
||||||
|
}
|
||||||
|
reader.endArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void readSampleGroup(JsonReader reader, List<SampleGroup> groups) throws IOException {
|
||||||
|
String groupName = "";
|
||||||
|
ArrayList<Sample> samples = new ArrayList<>();
|
||||||
|
|
||||||
|
reader.beginObject();
|
||||||
|
while (reader.hasNext()) {
|
||||||
|
switch (reader.nextName()) {
|
||||||
|
case "name":
|
||||||
|
groupName = reader.nextString();
|
||||||
|
break;
|
||||||
|
case "samples":
|
||||||
|
reader.beginArray();
|
||||||
|
while (reader.hasNext()) {
|
||||||
|
samples.add(readSample(reader));
|
||||||
|
}
|
||||||
|
reader.endArray();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reader.endObject();
|
||||||
|
|
||||||
|
SampleGroup group = getGroup(groupName, groups);
|
||||||
|
group.samples.addAll(samples);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Sample readSample(JsonReader reader) throws IOException {
|
||||||
|
String sampleName = null;
|
||||||
|
String uri = null;
|
||||||
|
int type = Util.TYPE_OTHER;
|
||||||
|
UUID drmUuid = null;
|
||||||
|
String drmContentId = null;
|
||||||
|
String drmProvider = null;
|
||||||
|
boolean useExtensionDecoders = false;
|
||||||
|
|
||||||
|
reader.beginObject();
|
||||||
|
while (reader.hasNext()) {
|
||||||
|
switch (reader.nextName()) {
|
||||||
|
case "name":
|
||||||
|
sampleName = reader.nextString();
|
||||||
|
break;
|
||||||
|
case "uri":
|
||||||
|
uri = reader.nextString();
|
||||||
|
break;
|
||||||
|
case "type":
|
||||||
|
type = getType(reader.nextString());
|
||||||
|
break;
|
||||||
|
case "drm":
|
||||||
|
String[] drmComponents = reader.nextString().split(":", -1);
|
||||||
|
drmUuid = getDrmUuid(drmComponents[0]);
|
||||||
|
drmContentId = drmComponents[1];
|
||||||
|
drmProvider = drmComponents[2];
|
||||||
|
break;
|
||||||
|
case "use_extension_decoders":
|
||||||
|
useExtensionDecoders = reader.nextBoolean();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reader.endObject();
|
||||||
|
|
||||||
|
if (sampleName == null || uri == null) {
|
||||||
|
throw new ParserException("Invalid sample (name or uri missing)");
|
||||||
|
}
|
||||||
|
return new Sample(sampleName, uri, type, drmUuid, drmContentId, drmProvider,
|
||||||
|
useExtensionDecoders);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SampleGroup getGroup(String groupName, List<SampleGroup> groups) {
|
||||||
|
for (int i = 0; i < groups.size(); i++) {
|
||||||
|
if (Util.areEqual(groupName, groups.get(i).title)) {
|
||||||
|
return groups.get(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SampleGroup group = new SampleGroup(groupName);
|
||||||
|
groups.add(group);
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
private UUID getDrmUuid(String typeString) throws ParserException {
|
||||||
|
switch (typeString.toLowerCase()) {
|
||||||
|
case "widevine":
|
||||||
|
return C.WIDEVINE_UUID;
|
||||||
|
case "playready":
|
||||||
|
return C.PLAYREADY_UUID;
|
||||||
|
default:
|
||||||
|
throw new ParserException("Unsupported drm type: " + typeString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getType(String typeString) {
|
||||||
|
if (typeString == null) {
|
||||||
|
return Util.TYPE_OTHER;
|
||||||
|
}
|
||||||
|
switch (typeString.toLowerCase()) {
|
||||||
|
case "dash":
|
||||||
|
return Util.TYPE_DASH;
|
||||||
|
case "smoothstreaming":
|
||||||
|
return Util.TYPE_SS;
|
||||||
|
case "hls":
|
||||||
|
return Util.TYPE_HLS;
|
||||||
|
default:
|
||||||
|
return Util.TYPE_OTHER;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static final class SampleAdapter extends BaseExpandableListAdapter {
|
private static final class SampleAdapter extends BaseExpandableListAdapter {
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
@ -188,8 +330,27 @@ public class SampleChooserActivity extends Activity {
|
|||||||
this.samples = new ArrayList<>();
|
this.samples = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAll(Sample[] samples) {
|
}
|
||||||
Collections.addAll(this.samples, samples);
|
|
||||||
|
private static class Sample {
|
||||||
|
|
||||||
|
public final String name;
|
||||||
|
public final String uri;
|
||||||
|
public final int type;
|
||||||
|
public final UUID drmSchemeUuid;
|
||||||
|
public final String drmContentId;
|
||||||
|
public final String drmProvider;
|
||||||
|
public final boolean useExtensionDecoders;
|
||||||
|
|
||||||
|
public Sample(String name, String uri, int type, UUID drmSchemeUuid, String drmContentId,
|
||||||
|
String drmProvider, boolean useExtensionDecoders) {
|
||||||
|
this.name = name;
|
||||||
|
this.uri = uri;
|
||||||
|
this.type = type;
|
||||||
|
this.drmSchemeUuid = drmSchemeUuid;
|
||||||
|
this.drmContentId = drmContentId;
|
||||||
|
this.drmProvider = drmProvider;
|
||||||
|
this.useExtensionDecoders = useExtensionDecoders;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,297 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2014 The Android Open Source Project
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package com.google.android.exoplayer.demo;
|
|
||||||
|
|
||||||
import com.google.android.exoplayer.C;
|
|
||||||
import com.google.android.exoplayer.util.Util;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Holds statically defined sample definitions.
|
|
||||||
*/
|
|
||||||
/* package */ final class Samples {
|
|
||||||
|
|
||||||
public static class Sample {
|
|
||||||
|
|
||||||
public final String name;
|
|
||||||
public final String uri;
|
|
||||||
public final int type;
|
|
||||||
public final UUID drmSchemeUuid;
|
|
||||||
public final String drmContentId;
|
|
||||||
public final String drmProvider;
|
|
||||||
public final boolean useExtensionDecoders;
|
|
||||||
|
|
||||||
public static Sample newSample(String name, String uri, int type) {
|
|
||||||
return new Sample(name, uri, type, null, null, null, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Sample newExtensionSample(String name, String uri, int type) {
|
|
||||||
return new Sample(name, uri, type, null, null, null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Sample newDrmProtectedSample(String name, String uri, int type, UUID drmScheme,
|
|
||||||
String drmContentId, String drmProvider) {
|
|
||||||
return new Sample(name, uri, type, drmScheme, drmContentId, drmProvider, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Sample(String name, String uri, int type, UUID drmSchemeUuid, String drmContentId,
|
|
||||||
String drmProvider, boolean useExtensionDecoders) {
|
|
||||||
this.name = name;
|
|
||||||
this.uri = uri;
|
|
||||||
this.type = type;
|
|
||||||
this.drmSchemeUuid = drmSchemeUuid;
|
|
||||||
this.drmContentId = drmContentId;
|
|
||||||
this.drmProvider = drmProvider;
|
|
||||||
this.useExtensionDecoders = useExtensionDecoders;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final Sample[] YOUTUBE_DASH_MP4 = new Sample[] {
|
|
||||||
Sample.newSample("Google Glass (MP4,H264)",
|
|
||||||
"http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?"
|
|
||||||
+ "as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&"
|
|
||||||
+ "ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7."
|
|
||||||
+ "8506521BFC350652163895D4C26DEE124209AA9E&key=ik0", Util.TYPE_DASH),
|
|
||||||
Sample.newSample("Google Play (MP4,H264)",
|
|
||||||
"http://www.youtube.com/api/manifest/dash/id/3aa39fa2cc27967f/source/youtube?"
|
|
||||||
+ "as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&"
|
|
||||||
+ "ipbits=0&expire=19000000000&signature=A2716F75795F5D2AF0E88962FFCD10DB79384F29."
|
|
||||||
+ "84308FF04844498CE6FBCE4731507882B8307798&key=ik0", Util.TYPE_DASH),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] YOUTUBE_DASH_WEBM = new Sample[] {
|
|
||||||
Sample.newSample("Google Glass (WebM,VP9)",
|
|
||||||
"http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?"
|
|
||||||
+ "as=fmp4_audio_clear,webm2_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&"
|
|
||||||
+ "ipbits=0&expire=19000000000&signature=249B04F79E984D7F86B4D8DB48AE6FAF41C17AB3."
|
|
||||||
+ "7B9F0EC0505E1566E59B8E488E9419F253DDF413&key=ik0", Util.TYPE_DASH),
|
|
||||||
Sample.newSample("Google Play (WebM,VP9)",
|
|
||||||
"http://www.youtube.com/api/manifest/dash/id/3aa39fa2cc27967f/source/youtube?"
|
|
||||||
+ "as=fmp4_audio_clear,webm2_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&"
|
|
||||||
+ "ipbits=0&expire=19000000000&signature=B1C2A74783AC1CC4865EB312D7DD2D48230CC9FD."
|
|
||||||
+ "BD153B9882175F1F94BFE5141A5482313EA38E8D&key=ik0", Util.TYPE_DASH),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] SMOOTHSTREAMING = new Sample[] {
|
|
||||||
Sample.newSample("Super speed",
|
|
||||||
"http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism",
|
|
||||||
Util.TYPE_SS),
|
|
||||||
Sample.newDrmProtectedSample("Super speed (PlayReady)",
|
|
||||||
"http://playready.directtaps.net/smoothstreaming/SSWSS720H264PR/SuperSpeedway_720.ism",
|
|
||||||
Util.TYPE_SS, C.PLAYREADY_UUID, null, null),
|
|
||||||
};
|
|
||||||
|
|
||||||
private static final String WIDEVINE_GTS_H264_MPD =
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd";
|
|
||||||
private static final String WIDEVINE_GTS_VP9_MPD =
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/vp9/tears/tears.mpd";
|
|
||||||
private static final String WIDEVINE_GTS_H265_MPD =
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears.mpd";
|
|
||||||
public static final Sample[] WIDEVINE_GTS = new Sample[] {
|
|
||||||
Sample.newDrmProtectedSample("WV: HDCP not specified", WIDEVINE_GTS_H264_MPD, Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "d286538032258a1c", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: HDCP not required", WIDEVINE_GTS_H264_MPD, Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "48fcc369939ac96c", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: HDCP required", WIDEVINE_GTS_H264_MPD, Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "e06c39f1151da3df", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure video path required (MP4,H264)", WIDEVINE_GTS_H264_MPD,
|
|
||||||
Util.TYPE_DASH, C.WIDEVINE_UUID, "0894c7c8719b28a0", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure video path required (WebM,VP9)", WIDEVINE_GTS_VP9_MPD,
|
|
||||||
Util.TYPE_DASH, C.WIDEVINE_UUID, "0894c7c8719b28a0", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure video path required (MP4,H265)", WIDEVINE_GTS_H265_MPD,
|
|
||||||
Util.TYPE_DASH, C.WIDEVINE_UUID, "0894c7c8719b28a0", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: HDCP + secure video path required", WIDEVINE_GTS_H264_MPD,
|
|
||||||
Util.TYPE_DASH, C.WIDEVINE_UUID, "efd045b1eb61888a", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: 30s license duration (fails at ~30s)", WIDEVINE_GTS_H264_MPD,
|
|
||||||
Util.TYPE_DASH, C.WIDEVINE_UUID, "f9a34cab7b05881a", "widevine_test"),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] WIDEVINE_HDCP = new Sample[] {
|
|
||||||
Sample.newDrmProtectedSample("WV: HDCP: None (not required)", WIDEVINE_GTS_H264_MPD,
|
|
||||||
Util.TYPE_DASH, C.WIDEVINE_UUID, "HDCP_None", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: HDCP: 1.0 required", WIDEVINE_GTS_H264_MPD, Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "HDCP_V1", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: HDCP: 2.0 required", WIDEVINE_GTS_H264_MPD, Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "HDCP_V2", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: HDCP: 2.1 required", WIDEVINE_GTS_H264_MPD, Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "HDCP_V2_1", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: HDCP: 2.2 required", WIDEVINE_GTS_H264_MPD, Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "HDCP_V2_2", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: HDCP: No digital output", WIDEVINE_GTS_H264_MPD,
|
|
||||||
Util.TYPE_DASH, C.WIDEVINE_UUID, "HDCP_NO_DIGTAL_OUTPUT", "widevine_test"),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] WIDEVINE_H264_MP4_CLEAR = new Sample[] {
|
|
||||||
Sample.newSample("WV: Clear SD & HD (MP4,H264)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/h264/tears/tears.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newSample("WV: Clear SD (MP4,H264)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/h264/tears/tears_sd.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newSample("WV: Clear HD (MP4,H264)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/h264/tears/tears_hd.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newSample("WV: Clear UHD (MP4,H264)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/h264/tears/tears_uhd.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] WIDEVINE_H264_MP4_SECURE = new Sample[] {
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure SD & HD (MP4,H264)", WIDEVINE_GTS_H264_MPD,
|
|
||||||
Util.TYPE_DASH, C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure SD (MP4,H264)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_sd.mpd", Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure HD (MP4,H264)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_hd.mpd", Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure UHD (MP4,H264)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_uhd.mpd", Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] WIDEVINE_VP9_WEBM_CLEAR = new Sample[] {
|
|
||||||
Sample.newSample("WV: Clear SD & HD (WebM,VP9)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/vp9/tears/tears.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newSample("WV: Clear SD (WebM,VP9)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/vp9/tears/tears_sd.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newSample("WV: Clear HD (WebM,VP9)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/vp9/tears/tears_hd.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newSample("WV: Clear UHD (WebM,VP9)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/vp9/tears/tears_uhd.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] WIDEVINE_VP9_WEBM_SECURE = new Sample[] {
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure SD & HD (WebM,VP9)", WIDEVINE_GTS_VP9_MPD,
|
|
||||||
Util.TYPE_DASH, C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure SD (WebM,VP9)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/vp9/tears/tears_sd.mpd", Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure HD (WebM,VP9)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/vp9/tears/tears_hd.mpd", Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure UHD (WebM,VP9)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/vp9/tears/tears_uhd.mpd", Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] WIDEVINE_H265_MP4_CLEAR = new Sample[] {
|
|
||||||
Sample.newSample("WV: Clear SD & HD (MP4,H265)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newSample("WV: Clear SD (MP4,H265)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears_sd.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newSample("WV: Clear HD (MP4,H265)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears_hd.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newSample("WV: Clear UHD (MP4,H265)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears_uhd.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] WIDEVINE_H265_MP4_SECURE = new Sample[] {
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure SD & HD (MP4,H265)", WIDEVINE_GTS_H265_MPD,
|
|
||||||
Util.TYPE_DASH, C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure SD (MP4,H265)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears_sd.mpd", Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure HD (MP4,H265)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears_hd.mpd", Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
Sample.newDrmProtectedSample("WV: Secure UHD (MP4,H265)",
|
|
||||||
"https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears_uhd.mpd", Util.TYPE_DASH,
|
|
||||||
C.WIDEVINE_UUID, "", "widevine_test"),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] HLS = new Sample[] {
|
|
||||||
Sample.newSample("Apple master playlist",
|
|
||||||
"https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/"
|
|
||||||
+ "bipbop_4x3_variant.m3u8", Util.TYPE_HLS),
|
|
||||||
Sample.newSample("Apple master playlist advanced",
|
|
||||||
"https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/"
|
|
||||||
+ "bipbop_16x9_variant.m3u8", Util.TYPE_HLS),
|
|
||||||
Sample.newSample("Apple TS media playlist",
|
|
||||||
"https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear1/"
|
|
||||||
+ "prog_index.m3u8", Util.TYPE_HLS),
|
|
||||||
Sample.newSample("Apple AAC media playlist",
|
|
||||||
"https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear0/"
|
|
||||||
+ "prog_index.m3u8", Util.TYPE_HLS),
|
|
||||||
Sample.newSample("Apple ID3 metadata", "http://devimages.apple.com/samplecode/adDemo/ad.m3u8",
|
|
||||||
Util.TYPE_HLS),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] MISC = new Sample[] {
|
|
||||||
Sample.newSample("Dizzy", "http://html5demos.com/assets/dizzy.mp4", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Apple AAC 10s", "https://devimages.apple.com.edgekey.net/"
|
|
||||||
+ "streaming/examples/bipbop_4x3/gear0/fileSequence0.aac", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Apple TS 10s", "https://devimages.apple.com.edgekey.net/streaming/examples/"
|
|
||||||
+ "bipbop_4x3/gear1/fileSequence0.ts", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Android screens (Matroska)", "http://storage.googleapis.com/exoplayer-test-me"
|
|
||||||
+ "dia-1/mkv/android-screens-lavf-56.36.100-aac-avc-main-1280x720.mkv", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Big Buck Bunny (MP4 Video)",
|
|
||||||
"http://redirector.c.youtube.com/videoplayback?id=604ed5ce52eda7ee&itag=22&source=youtube&"
|
|
||||||
+ "sparams=ip,ipbits,expire,source,id&ip=0.0.0.0&ipbits=0&expire=19000000000&signature="
|
|
||||||
+ "513F28C7FDCBEC60A66C86C9A393556C99DC47FB.04C88036EEE12565A1ED864A875A58F15D8B5300"
|
|
||||||
+ "&key=ik0", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Screens 360P (WebM,VP9,No Audio)",
|
|
||||||
"https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segmen"
|
|
||||||
+ "t/video-vp9-360.webm", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Screens 480p (FMP4,H264,No Audio)",
|
|
||||||
"https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segmen"
|
|
||||||
+ "t/video-avc-baseline-480.mp4", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Screens 1080p (FMP4,H264, No Audio)",
|
|
||||||
"https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segmen"
|
|
||||||
+ "t/video-137.mp4", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Screens (FMP4,AAC Audio)",
|
|
||||||
"https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segmen"
|
|
||||||
+ "t/audio-141.mp4", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Google Play (MP3 Audio)",
|
|
||||||
"http://storage.googleapis.com/exoplayer-test-media-0/play.mp3", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Google Play (Ogg/Vorbis Audio)",
|
|
||||||
"https://storage.googleapis.com/exoplayer-test-media-1/ogg/play.ogg", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Google Glass (WebM Video with Vorbis Audio)",
|
|
||||||
"http://demos.webmproject.org/exoplayer/glass_vp9_vorbis.webm", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Google Glass (VP9 in MP4/ISO-BMFF)",
|
|
||||||
"http://demos.webmproject.org/exoplayer/glass.mp4", Util.TYPE_OTHER),
|
|
||||||
Sample.newSample("Google Glass DASH - VP9 and Opus",
|
|
||||||
"http://demos.webmproject.org/dash/201410/vp9_glass/manifest_vp9_opus.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newSample("Big Buck Bunny (FLV Video)",
|
|
||||||
"http://vod.leasewebcdn.com/bbb.flv?ri=1024&rs=150&start=0", Util.TYPE_OTHER),
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Sample[] EXTENSION = new Sample[] {
|
|
||||||
Sample.newExtensionSample("Google Glass DASH - VP9 Only",
|
|
||||||
"http://demos.webmproject.org/dash/201410/vp9_glass/manifest_vp9.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newExtensionSample("Google Glass DASH - VP9 and Vorbis",
|
|
||||||
"http://demos.webmproject.org/dash/201410/vp9_glass/manifest_vp9_vorbis.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
Sample.newExtensionSample("Google Glass DASH - VP9 and Opus",
|
|
||||||
"http://demos.webmproject.org/dash/201410/vp9_glass/manifest_vp9_opus.mpd",
|
|
||||||
Util.TYPE_DASH),
|
|
||||||
};
|
|
||||||
|
|
||||||
private Samples() {}
|
|
||||||
|
|
||||||
}
|
|
@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer.demo.ui;
|
package com.google.android.exoplayer.demo;
|
||||||
|
|
||||||
import com.google.android.exoplayer.DefaultTrackSelector;
|
import com.google.android.exoplayer.DefaultTrackSelector;
|
||||||
import com.google.android.exoplayer.DefaultTrackSelector.TrackInfo;
|
import com.google.android.exoplayer.DefaultTrackSelector.TrackInfo;
|
||||||
@ -22,7 +22,6 @@ import com.google.android.exoplayer.TrackGroup;
|
|||||||
import com.google.android.exoplayer.TrackGroupArray;
|
import com.google.android.exoplayer.TrackGroupArray;
|
||||||
import com.google.android.exoplayer.TrackRenderer;
|
import com.google.android.exoplayer.TrackRenderer;
|
||||||
import com.google.android.exoplayer.TrackSelection;
|
import com.google.android.exoplayer.TrackSelection;
|
||||||
import com.google.android.exoplayer.demo.R;
|
|
||||||
import com.google.android.exoplayer.util.MimeTypes;
|
import com.google.android.exoplayer.util.MimeTypes;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
@ -49,4 +49,6 @@
|
|||||||
|
|
||||||
<string name="storage_permission_denied">Permission to access storage was denied</string>
|
<string name="storage_permission_denied">Permission to access storage was denied</string>
|
||||||
|
|
||||||
|
<string name="sample_list_load_error">One or more sample lists failed to load</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user