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
b6036561
authored
Sep 22, 2020
by
ibaker
Committed by
Oliver Woodman
Oct 17, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Exclude PC devices from H.265 GTS tests
PiperOrigin-RevId: 333031399
parent
1b5d07c1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashStreamingTest.java
playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashStreamingTest.java
View file @
b6036561
...
@@ -18,6 +18,7 @@ package com.google.android.exoplayer2.playbacktests.gts;
...
@@ -18,6 +18,7 @@ package com.google.android.exoplayer2.playbacktests.gts;
import
static
com
.
google
.
android
.
exoplayer2
.
playbacktests
.
gts
.
GtsTestUtil
.
shouldSkipWidevineTest
;
import
static
com
.
google
.
android
.
exoplayer2
.
playbacktests
.
gts
.
GtsTestUtil
.
shouldSkipWidevineTest
;
import
static
com
.
google
.
common
.
truth
.
Truth
.
assertThat
;
import
static
com
.
google
.
common
.
truth
.
Truth
.
assertThat
;
import
android.content.pm.PackageManager
;
import
androidx.test.ext.junit.runners.AndroidJUnit4
;
import
androidx.test.ext.junit.runners.AndroidJUnit4
;
import
androidx.test.rule.ActivityTestRule
;
import
androidx.test.rule.ActivityTestRule
;
import
com.google.android.exoplayer2.ExoPlayer
;
import
com.google.android.exoplayer2.ExoPlayer
;
...
@@ -168,7 +169,7 @@ public final class DashStreamingTest {
...
@@ -168,7 +169,7 @@ public final class DashStreamingTest {
@Test
@Test
public
void
h265FixedV23
()
throws
Exception
{
public
void
h265FixedV23
()
throws
Exception
{
if
(
Util
.
SDK_INT
<
23
)
{
if
(
Util
.
SDK_INT
<
23
||
isPc
()
)
{
// Pass.
// Pass.
return
;
return
;
}
}
...
@@ -183,7 +184,7 @@ public final class DashStreamingTest {
...
@@ -183,7 +184,7 @@ public final class DashStreamingTest {
@Test
@Test
public
void
h265AdaptiveV24
()
throws
Exception
{
public
void
h265AdaptiveV24
()
throws
Exception
{
if
(
Util
.
SDK_INT
<
24
)
{
if
(
Util
.
SDK_INT
<
24
||
isPc
()
)
{
// Pass.
// Pass.
return
;
return
;
}
}
...
@@ -199,7 +200,7 @@ public final class DashStreamingTest {
...
@@ -199,7 +200,7 @@ public final class DashStreamingTest {
@Test
@Test
public
void
h265AdaptiveWithSeekingV24
()
throws
Exception
{
public
void
h265AdaptiveWithSeekingV24
()
throws
Exception
{
if
(
Util
.
SDK_INT
<
24
)
{
if
(
Util
.
SDK_INT
<
24
||
isPc
()
)
{
// Pass.
// Pass.
return
;
return
;
}
}
...
@@ -216,7 +217,7 @@ public final class DashStreamingTest {
...
@@ -216,7 +217,7 @@ public final class DashStreamingTest {
@Test
@Test
public
void
h265AdaptiveWithRendererDisablingV24
()
throws
Exception
{
public
void
h265AdaptiveWithRendererDisablingV24
()
throws
Exception
{
if
(
Util
.
SDK_INT
<
24
)
{
if
(
Util
.
SDK_INT
<
24
||
isPc
()
)
{
// Pass.
// Pass.
return
;
return
;
}
}
...
@@ -435,7 +436,7 @@ public final class DashStreamingTest {
...
@@ -435,7 +436,7 @@ public final class DashStreamingTest {
@Test
@Test
public
void
widevineH265FixedV23
()
throws
Exception
{
public
void
widevineH265FixedV23
()
throws
Exception
{
if
(
Util
.
SDK_INT
<
23
||
GtsTestUtil
.
shouldSkipWidevineTest
(
testRule
.
getActivity
()))
{
if
(
Util
.
SDK_INT
<
23
||
GtsTestUtil
.
shouldSkipWidevineTest
(
testRule
.
getActivity
())
||
isPc
()
)
{
// Pass.
// Pass.
return
;
return
;
}
}
...
@@ -452,7 +453,7 @@ public final class DashStreamingTest {
...
@@ -452,7 +453,7 @@ public final class DashStreamingTest {
@Test
@Test
public
void
widevineH265AdaptiveV24
()
throws
Exception
{
public
void
widevineH265AdaptiveV24
()
throws
Exception
{
if
(
Util
.
SDK_INT
<
24
||
GtsTestUtil
.
shouldSkipWidevineTest
(
testRule
.
getActivity
()))
{
if
(
Util
.
SDK_INT
<
24
||
GtsTestUtil
.
shouldSkipWidevineTest
(
testRule
.
getActivity
())
||
isPc
()
)
{
// Pass.
// Pass.
return
;
return
;
}
}
...
@@ -469,7 +470,7 @@ public final class DashStreamingTest {
...
@@ -469,7 +470,7 @@ public final class DashStreamingTest {
@Test
@Test
public
void
widevineH265AdaptiveWithSeekingV24
()
throws
Exception
{
public
void
widevineH265AdaptiveWithSeekingV24
()
throws
Exception
{
if
(
Util
.
SDK_INT
<
24
||
GtsTestUtil
.
shouldSkipWidevineTest
(
testRule
.
getActivity
()))
{
if
(
Util
.
SDK_INT
<
24
||
GtsTestUtil
.
shouldSkipWidevineTest
(
testRule
.
getActivity
())
||
isPc
()
)
{
// Pass.
// Pass.
return
;
return
;
}
}
...
@@ -487,7 +488,7 @@ public final class DashStreamingTest {
...
@@ -487,7 +488,7 @@ public final class DashStreamingTest {
@Test
@Test
public
void
widevineH265AdaptiveWithRendererDisablingV24
()
throws
Exception
{
public
void
widevineH265AdaptiveWithRendererDisablingV24
()
throws
Exception
{
if
(
Util
.
SDK_INT
<
24
||
GtsTestUtil
.
shouldSkipWidevineTest
(
testRule
.
getActivity
()))
{
if
(
Util
.
SDK_INT
<
24
||
GtsTestUtil
.
shouldSkipWidevineTest
(
testRule
.
getActivity
())
||
isPc
()
)
{
// Pass.
// Pass.
return
;
return
;
}
}
...
@@ -644,7 +645,7 @@ public final class DashStreamingTest {
...
@@ -644,7 +645,7 @@ public final class DashStreamingTest {
@Test
@Test
public
void
decoderInfoH265V24
()
throws
Exception
{
public
void
decoderInfoH265V24
()
throws
Exception
{
if
(
Util
.
SDK_INT
<
24
)
{
if
(
Util
.
SDK_INT
<
24
||
isPc
()
)
{
// Pass.
// Pass.
return
;
return
;
}
}
...
@@ -670,6 +671,11 @@ public final class DashStreamingTest {
...
@@ -670,6 +671,11 @@ public final class DashStreamingTest {
// Internal.
// Internal.
private
boolean
isPc
()
{
// See [internal b/162990153].
return
testRule
.
getActivity
().
getPackageManager
().
hasSystemFeature
(
PackageManager
.
FEATURE_PC
);
}
private
static
boolean
shouldSkipAdaptiveTest
(
String
mimeType
)
throws
DecoderQueryException
{
private
static
boolean
shouldSkipAdaptiveTest
(
String
mimeType
)
throws
DecoderQueryException
{
MediaCodecInfo
decoderInfo
=
MediaCodecInfo
decoderInfo
=
MediaCodecUtil
.
getDecoderInfo
(
mimeType
,
/* secure= */
false
,
/* tunneling= */
false
);
MediaCodecUtil
.
getDecoderInfo
(
mimeType
,
/* secure= */
false
,
/* tunneling= */
false
);
...
...
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