mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Exclude PC devices from H.265 GTS tests
PiperOrigin-RevId: 333031399
This commit is contained in:
parent
1b5d07c105
commit
b6036561c2
1 changed files with 15 additions and 9 deletions
|
|
@ -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.common.truth.Truth.assertThat;
|
||||
|
||||
import android.content.pm.PackageManager;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.rule.ActivityTestRule;
|
||||
import com.google.android.exoplayer2.ExoPlayer;
|
||||
|
|
@ -168,7 +169,7 @@ public final class DashStreamingTest {
|
|||
|
||||
@Test
|
||||
public void h265FixedV23() throws Exception {
|
||||
if (Util.SDK_INT < 23) {
|
||||
if (Util.SDK_INT < 23 || isPc()) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
|
|
@ -183,7 +184,7 @@ public final class DashStreamingTest {
|
|||
|
||||
@Test
|
||||
public void h265AdaptiveV24() throws Exception {
|
||||
if (Util.SDK_INT < 24) {
|
||||
if (Util.SDK_INT < 24 || isPc()) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
|
|
@ -199,7 +200,7 @@ public final class DashStreamingTest {
|
|||
|
||||
@Test
|
||||
public void h265AdaptiveWithSeekingV24() throws Exception {
|
||||
if (Util.SDK_INT < 24) {
|
||||
if (Util.SDK_INT < 24 || isPc()) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
|
|
@ -216,7 +217,7 @@ public final class DashStreamingTest {
|
|||
|
||||
@Test
|
||||
public void h265AdaptiveWithRendererDisablingV24() throws Exception {
|
||||
if (Util.SDK_INT < 24) {
|
||||
if (Util.SDK_INT < 24 || isPc()) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
|
|
@ -435,7 +436,7 @@ public final class DashStreamingTest {
|
|||
|
||||
@Test
|
||||
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.
|
||||
return;
|
||||
}
|
||||
|
|
@ -452,7 +453,7 @@ public final class DashStreamingTest {
|
|||
|
||||
@Test
|
||||
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.
|
||||
return;
|
||||
}
|
||||
|
|
@ -469,7 +470,7 @@ public final class DashStreamingTest {
|
|||
|
||||
@Test
|
||||
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.
|
||||
return;
|
||||
}
|
||||
|
|
@ -487,7 +488,7 @@ public final class DashStreamingTest {
|
|||
|
||||
@Test
|
||||
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.
|
||||
return;
|
||||
}
|
||||
|
|
@ -644,7 +645,7 @@ public final class DashStreamingTest {
|
|||
|
||||
@Test
|
||||
public void decoderInfoH265V24() throws Exception {
|
||||
if (Util.SDK_INT < 24) {
|
||||
if (Util.SDK_INT < 24 || isPc()) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
|
|
@ -670,6 +671,11 @@ public final class DashStreamingTest {
|
|||
|
||||
// Internal.
|
||||
|
||||
private boolean isPc() {
|
||||
// See [internal b/162990153].
|
||||
return testRule.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_PC);
|
||||
}
|
||||
|
||||
private static boolean shouldSkipAdaptiveTest(String mimeType) throws DecoderQueryException {
|
||||
MediaCodecInfo decoderInfo =
|
||||
MediaCodecUtil.getDecoderInfo(mimeType, /* secure= */ false, /* tunneling= */ false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue