Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c0a81e11
authored
Oct 26, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Update Widevine test streams.
parent
c0f0cbcb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
48 deletions
demo/src/main/java/com/google/android/exoplayer/demo/PlayerActivity.java
demo/src/main/java/com/google/android/exoplayer/demo/SampleChooserActivity.java
demo/src/main/java/com/google/android/exoplayer/demo/Samples.java
demo/src/main/java/com/google/android/exoplayer/demo/WidevineTestMediaDrmCallback.java
demo/src/main/java/com/google/android/exoplayer/demo/PlayerActivity.java
View file @
c0a81e11
...
...
@@ -81,6 +81,7 @@ public class PlayerActivity extends Activity implements SurfaceHolder.Callback,
// For use within demo app code.
public
static
final
String
CONTENT_ID_EXTRA
=
"content_id"
;
public
static
final
String
CONTENT_TYPE_EXTRA
=
"content_type"
;
public
static
final
String
PROVIDER_EXTRA
=
"provider"
;
public
static
final
int
TYPE_DASH
=
0
;
public
static
final
int
TYPE_SS
=
1
;
public
static
final
int
TYPE_HLS
=
2
;
...
...
@@ -126,6 +127,7 @@ public class PlayerActivity extends Activity implements SurfaceHolder.Callback,
private
Uri
contentUri
;
private
int
contentType
;
private
String
contentId
;
private
String
provider
;
private
AudioCapabilitiesReceiver
audioCapabilitiesReceiver
;
...
...
@@ -202,6 +204,7 @@ public class PlayerActivity extends Activity implements SurfaceHolder.Callback,
contentType
=
intent
.
getIntExtra
(
CONTENT_TYPE_EXTRA
,
inferContentType
(
contentUri
,
intent
.
getStringExtra
(
CONTENT_EXT_EXTRA
)));
contentId
=
intent
.
getStringExtra
(
CONTENT_ID_EXTRA
);
provider
=
intent
.
getStringExtra
(
PROVIDER_EXTRA
);
configureSubtitleView
();
if
(
player
==
null
)
{
preparePlayer
(
true
);
...
...
@@ -261,7 +264,7 @@ public class PlayerActivity extends Activity implements SurfaceHolder.Callback,
new
SmoothStreamingTestMediaDrmCallback
());
case
TYPE_DASH:
return
new
DashRendererBuilder
(
this
,
userAgent
,
contentUri
.
toString
(),
new
WidevineTestMediaDrmCallback
(
contentId
));
new
WidevineTestMediaDrmCallback
(
contentId
,
provider
));
case
TYPE_HLS:
return
new
HlsRendererBuilder
(
this
,
userAgent
,
contentUri
.
toString
());
case
TYPE_OTHER:
...
...
demo/src/main/java/com/google/android/exoplayer/demo/SampleChooserActivity.java
View file @
c0a81e11
...
...
@@ -52,24 +52,34 @@ public class SampleChooserActivity extends Activity {
sampleAdapter
.
add
(
new
Header
(
"YouTube DASH"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
YOUTUBE_DASH_MP4
);
sampleAdapter
.
add
(
new
Header
(
"Widevine
GTS DASH
"
));
sampleAdapter
.
add
(
new
Header
(
"Widevine
DASH Policy Tests (GTS)
"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
WIDEVINE_GTS
);
sampleAdapter
.
add
(
new
Header
(
"SmoothStreaming"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
SMOOTHSTREAMING
);
sampleAdapter
.
add
(
new
Header
(
"HLS"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
HLS
);
sampleAdapter
.
add
(
new
Header
(
"Misc"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
MISC
);
// Add WebM samples if the device has a VP9 decoder.
sampleAdapter
.
add
(
new
Header
(
"Widevine DASH"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
WIDEVINE_DASH_MP4
);
try
{
if
(
MediaCodecUtil
.
getDecoderInfo
(
MimeTypes
.
VIDEO_VP9
,
false
)
!=
null
)
{
sampleAdapter
.
add
(
new
Header
(
"YouTube WebM DASH (Experimental)"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
YOUTUBE_DASH_WEBM
);
sampleAdapter
.
addAll
((
Object
[])
Samples
.
WIDEVINE_DASH_WEBM
);
}
}
catch
(
DecoderQueryException
e
)
{
Log
.
e
(
TAG
,
"Failed to query vp9 decoder"
,
e
);
}
sampleAdapter
.
add
(
new
Header
(
"Widevine DASH Policy Tests (GTS)"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
WIDEVINE_GTS
);
sampleAdapter
.
add
(
new
Header
(
"Widevine DASH"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
WIDEVINE_DASH_MP4
);
// try {
// if (MediaCodecUtil.getDecoderInfo(MimeTypes.VIDEO_VP9, false) != null) {
// sampleAdapter.addAll((Object[]) Samples.WIDEVINE_DASH_WEBM);
// }
// } catch (DecoderQueryException e) {
// Log.e(TAG, "Failed to query vp9 decoder", e);
// }
sampleAdapter
.
add
(
new
Header
(
"SmoothStreaming"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
SMOOTHSTREAMING
);
sampleAdapter
.
add
(
new
Header
(
"HLS"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
HLS
);
sampleAdapter
.
add
(
new
Header
(
"Misc"
));
sampleAdapter
.
addAll
((
Object
[])
Samples
.
MISC
);
sampleList
.
setAdapter
(
sampleAdapter
);
sampleList
.
setOnItemClickListener
(
new
OnItemClickListener
()
{
...
...
@@ -87,7 +97,8 @@ public class SampleChooserActivity extends Activity {
Intent
mpdIntent
=
new
Intent
(
this
,
PlayerActivity
.
class
)
.
setData
(
Uri
.
parse
(
sample
.
uri
))
.
putExtra
(
PlayerActivity
.
CONTENT_ID_EXTRA
,
sample
.
contentId
)
.
putExtra
(
PlayerActivity
.
CONTENT_TYPE_EXTRA
,
sample
.
type
);
.
putExtra
(
PlayerActivity
.
CONTENT_TYPE_EXTRA
,
sample
.
type
)
.
putExtra
(
PlayerActivity
.
PROVIDER_EXTRA
,
sample
.
provider
);
startActivity
(
mpdIntent
);
}
...
...
demo/src/main/java/com/google/android/exoplayer/demo/Samples.java
View file @
c0a81e11
...
...
@@ -26,16 +26,18 @@ import java.util.Locale;
public
final
String
name
;
public
final
String
contentId
;
public
final
String
provider
;
public
final
String
uri
;
public
final
int
type
;
public
Sample
(
String
name
,
String
uri
,
int
type
)
{
this
(
name
,
name
.
toLowerCase
(
Locale
.
US
).
replaceAll
(
"\\s"
,
""
),
uri
,
type
);
this
(
name
,
name
.
toLowerCase
(
Locale
.
US
).
replaceAll
(
"\\s"
,
""
),
""
,
uri
,
type
);
}
public
Sample
(
String
name
,
String
contentId
,
String
uri
,
int
type
)
{
public
Sample
(
String
name
,
String
contentId
,
String
provider
,
String
uri
,
int
type
)
{
this
.
name
=
name
;
this
.
contentId
=
contentId
;
this
.
provider
=
provider
;
this
.
uri
=
uri
;
this
.
type
=
type
;
}
...
...
@@ -77,37 +79,36 @@ import java.util.Locale;
PlayerActivity
.
TYPE_SS
),
};
private
static
final
String
WIDEVINE_GTS_MPD
=
"https://storage.googleapis.com/wvmedia/cenc/h264/tears.mpd"
;
public
static
final
Sample
[]
WIDEVINE_GTS
=
new
Sample
[]
{
new
Sample
(
"WV: HDCP not specified"
,
"d286538032258a1c"
,
"http://www.youtube.com/api/manifest/dash/id/d286538032258a1c/source/youtube?"
+
"as=fmp4_audio_cenc,fmp4_sd_hd_cenc&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0"
+
"&ipbits=0&expire=19000000000&signature=477CF7D478BE26C205045D507E9358F85F84C065."
+
"8971631EB657BC33EC2F48A2FF4211956760C3E9&key=ik0"
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: HDCP not required"
,
"48fcc369939ac96c"
,
"http://www.youtube.com/api/manifest/dash/id/48fcc369939ac96c/source/youtube?"
+
"as=fmp4_audio_cenc,fmp4_sd_hd_cenc&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0"
+
"&ipbits=0&expire=19000000000&signature=171DAE48D00B5BE7434BC1A9F84DAE0463C7EA7A."
+
"0925B4DBB5605BEE9F5D088C48F25F5108E96191&key=ik0"
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: HDCP required"
,
"e06c39f1151da3df"
,
"http://www.youtube.com/api/manifest/dash/id/e06c39f1151da3df/source/youtube?"
+
"as=fmp4_audio_cenc,fmp4_sd_hd_cenc&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0"
+
"&ipbits=0&expire=19000000000&signature=8D3B8AF4E3F72B7F127C8D0D39B7AFCF37B30519."
+
"A118BADEBF3582AD2CC257B0EE6E579C6955D8AA&key=ik0"
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: Secure video path required"
,
"0894c7c8719b28a0"
,
"http://www.youtube.com/api/manifest/dash/id/0894c7c8719b28a0/source/youtube?"
+
"as=fmp4_audio_cenc,fmp4_sd_hd_cenc&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0"
+
"&ipbits=0&expire=19000000000&signature=A41D835C7387885A4A820628F57E481E00095931."
+
"9D50DBEEB5E37344647EE11BDA129A7FCDE8B7B9&key=ik0"
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: HDCP + secure video path required"
,
"efd045b1eb61888a"
,
"http://www.youtube.com/api/manifest/dash/id/efd045b1eb61888a/source/youtube?"
+
"as=fmp4_audio_cenc,fmp4_sd_hd_cenc&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0"
+
"&ipbits=0&expire=19000000000&signature=A97C9032C9D0C74F1643DB17C178873887C229E4."
+
"0A657BF6F23C8BC1538F276137383478330B76DE&key=ik0"
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: 30s license duration (fails at ~30s)"
,
"f9a34cab7b05881a"
,
"http://www.youtube.com/api/manifest/dash/id/f9a34cab7b05881a/source/youtube?"
+
"as=fmp4_audio_cenc,fmp4_sd_hd_cenc&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0"
+
"&ipbits=0&expire=19000000000&signature=80648A12A7D5FC1FA02B52B4250E4EB74CF0C5FD."
+
"66A261130CA137AA5C541EA9CED2DBF240829EE6&key=ik0"
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: HDCP not specified"
,
"d286538032258a1c"
,
"widevine_test"
,
WIDEVINE_GTS_MPD
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: HDCP not required"
,
"48fcc369939ac96c"
,
"widevine_test"
,
WIDEVINE_GTS_MPD
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: HDCP required"
,
"e06c39f1151da3df"
,
"widevine_test"
,
WIDEVINE_GTS_MPD
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: Secure video path required"
,
"0894c7c8719b28a0"
,
"widevine_test"
,
WIDEVINE_GTS_MPD
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: HDCP + secure video path required"
,
"efd045b1eb61888a"
,
"widevine_test"
,
WIDEVINE_GTS_MPD
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: 30s license duration (fails at ~30s)"
,
"f9a34cab7b05881a"
,
"widevine_test"
,
WIDEVINE_GTS_MPD
,
PlayerActivity
.
TYPE_DASH
),
};
public
static
final
Sample
[]
WIDEVINE_DASH_MP4
=
new
Sample
[]
{
new
Sample
(
"WV: Clear (MP4,H264)"
,
"https://storage.googleapis.com/wvmedia/cenc/clear/h264/tears.mpd"
,
PlayerActivity
.
TYPE_DASH
),
new
Sample
(
"WV: Secure (MP4,H264)"
,
""
,
"widevine_test"
,
"https://storage.googleapis.com/wvmedia/cenc/h264/tears.mpd"
,
PlayerActivity
.
TYPE_DASH
),
};
public
static
final
Sample
[]
WIDEVINE_DASH_WEBM
=
new
Sample
[]
{
new
Sample
(
"WV: Secure (WebM,VP9)"
,
"01234567"
,
"widevine_test"
,
"https://storage.googleapis.com/wvmedia/cenc/vp9/sintel-multicodec-4k/sintel-vp9.mpd"
,
PlayerActivity
.
TYPE_DASH
),
};
public
static
final
Sample
[]
HLS
=
new
Sample
[]
{
...
...
demo/src/main/java/com/google/android/exoplayer/demo/WidevineTestMediaDrmCallback.java
View file @
c0a81e11
...
...
@@ -33,12 +33,13 @@ import java.util.UUID;
public
class
WidevineTestMediaDrmCallback
implements
MediaDrmCallback
{
private
static
final
String
WIDEVINE_GTS_DEFAULT_BASE_URI
=
"http
://wv-staging-proxy.appspot.com/proxy?provider=YouTube&video_id=
"
;
"http
s://proxy.uat.widevine.com/proxy
"
;
private
final
String
defaultUri
;
public
WidevineTestMediaDrmCallback
(
String
videoId
)
{
defaultUri
=
WIDEVINE_GTS_DEFAULT_BASE_URI
+
videoId
;
public
WidevineTestMediaDrmCallback
(
String
contentId
,
String
provider
)
{
String
params
=
"?video_id="
+
contentId
+
"&provider="
+
provider
;
defaultUri
=
WIDEVINE_GTS_DEFAULT_BASE_URI
+
params
;
}
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment