Move classes that don't belong in testutils out of testutils
PiperOrigin-RevId: 278401000
This commit is contained in:
parent
d587def451
commit
9842ea7f22
@ -22,7 +22,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.extractor.ExtractorInput;
|
||||
import com.google.android.exoplayer2.testutil.FakeExtractorInput;
|
||||
import com.google.android.exoplayer2.testutil.OggTestData;
|
||||
import com.google.android.exoplayer2.testutil.TestUtil;
|
||||
import com.google.android.exoplayer2.util.ParsableByteArray;
|
||||
import java.io.EOFException;
|
||||
|
@ -21,7 +21,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.google.android.exoplayer2.testutil.ExtractorAsserts;
|
||||
import com.google.android.exoplayer2.testutil.ExtractorAsserts.ExtractorFactory;
|
||||
import com.google.android.exoplayer2.testutil.FakeExtractorInput;
|
||||
import com.google.android.exoplayer2.testutil.OggTestData;
|
||||
import com.google.android.exoplayer2.testutil.TestUtil;
|
||||
import java.io.IOException;
|
||||
import org.junit.Test;
|
||||
|
@ -20,7 +20,6 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.google.android.exoplayer2.testutil.FakeExtractorInput;
|
||||
import com.google.android.exoplayer2.testutil.OggTestData;
|
||||
import com.google.android.exoplayer2.testutil.TestUtil;
|
||||
import com.google.android.exoplayer2.util.ParsableByteArray;
|
||||
import java.io.IOException;
|
||||
|
@ -20,7 +20,6 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.google.android.exoplayer2.testutil.FakeExtractorInput;
|
||||
import com.google.android.exoplayer2.testutil.FakeExtractorInput.SimulatedIOException;
|
||||
import com.google.android.exoplayer2.testutil.OggTestData;
|
||||
import com.google.android.exoplayer2.testutil.TestUtil;
|
||||
import java.io.IOException;
|
||||
import org.junit.Test;
|
||||
|
@ -13,10 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.android.exoplayer2.testutil;
|
||||
package com.google.android.exoplayer2.extractor.ogg;
|
||||
|
||||
import com.google.android.exoplayer2.testutil.FakeExtractorInput;
|
||||
import com.google.android.exoplayer2.testutil.TestUtil;
|
||||
|
||||
/** Provides ogg/vorbis test data in bytes for unit tests. */
|
||||
public final class OggTestData {
|
||||
/* package */ final class OggTestData {
|
||||
|
||||
public static FakeExtractorInput createInput(byte[] data, boolean simulateUnknownLength) {
|
||||
return new FakeExtractorInput.Builder()
|
@ -17,7 +17,6 @@ package com.google.android.exoplayer2.extractor.ogg;
|
||||
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import com.google.android.exoplayer2.testutil.OggTestData;
|
||||
import com.google.android.exoplayer2.testutil.TestUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
@ -24,7 +24,6 @@ import com.google.android.exoplayer2.extractor.ExtractorInput;
|
||||
import com.google.android.exoplayer2.extractor.ogg.VorbisReader.VorbisSetup;
|
||||
import com.google.android.exoplayer2.testutil.FakeExtractorInput;
|
||||
import com.google.android.exoplayer2.testutil.FakeExtractorInput.SimulatedIOException;
|
||||
import com.google.android.exoplayer2.testutil.OggTestData;
|
||||
import com.google.android.exoplayer2.util.ParsableByteArray;
|
||||
import java.io.IOException;
|
||||
import org.junit.Test;
|
||||
|
@ -22,7 +22,6 @@ import static org.junit.Assert.fail;
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.google.android.exoplayer2.ParserException;
|
||||
import com.google.android.exoplayer2.testutil.OggTestData;
|
||||
import com.google.android.exoplayer2.util.ParsableByteArray;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
@ -17,10 +17,8 @@ package com.google.android.exoplayer2.playbacktests.gts;
|
||||
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
|
||||
/**
|
||||
* Test data for DASH tests.
|
||||
*/
|
||||
public final class DashTestData {
|
||||
/** Test data for DASH tests. */
|
||||
/* package */ final class DashTestData {
|
||||
|
||||
private static final String BASE_URL =
|
||||
"https://storage.googleapis.com/exoplayer-test-media-1/gen-4/";
|
||||
|
@ -40,12 +40,10 @@ import com.google.android.exoplayer2.source.TrackGroup;
|
||||
import com.google.android.exoplayer2.source.TrackGroupArray;
|
||||
import com.google.android.exoplayer2.source.dash.DashMediaSource;
|
||||
import com.google.android.exoplayer2.testutil.ActionSchedule;
|
||||
import com.google.android.exoplayer2.testutil.DebugRenderersFactory;
|
||||
import com.google.android.exoplayer2.testutil.DecoderCountersUtil;
|
||||
import com.google.android.exoplayer2.testutil.ExoHostedTest;
|
||||
import com.google.android.exoplayer2.testutil.HostActivity;
|
||||
import com.google.android.exoplayer2.testutil.HostActivity.HostedTest;
|
||||
import com.google.android.exoplayer2.testutil.MetricsLogger;
|
||||
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
||||
import com.google.android.exoplayer2.trackselection.MappingTrackSelector;
|
||||
import com.google.android.exoplayer2.trackselection.RandomTrackSelection;
|
||||
@ -62,7 +60,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/** {@link DashHostedTest} builder. */
|
||||
public final class DashTestRunner {
|
||||
/* package */ final class DashTestRunner {
|
||||
|
||||
static final int VIDEO_RENDERER_INDEX = 0;
|
||||
static final int AUDIO_RENDERER_INDEX = 1;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.android.exoplayer2.testutil;
|
||||
package com.google.android.exoplayer2.playbacktests.gts;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
@ -41,7 +41,7 @@ import java.util.ArrayList;
|
||||
* video buffer timestamp assertions, and modifies the default value for {@link
|
||||
* #setAllowedVideoJoiningTimeMs(long)} to be {@code 0}.
|
||||
*/
|
||||
public class DebugRenderersFactory extends DefaultRenderersFactory {
|
||||
/* package */ final class DebugRenderersFactory extends DefaultRenderersFactory {
|
||||
|
||||
public DebugRenderersFactory(Context context) {
|
||||
super(context);
|
@ -25,7 +25,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.google.android.exoplayer2.mediacodec.MediaCodecInfo;
|
||||
import com.google.android.exoplayer2.mediacodec.MediaCodecUtil;
|
||||
import com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException;
|
||||
import com.google.android.exoplayer2.testutil.MetricsLogger;
|
||||
import com.google.android.exoplayer2.util.MimeTypes;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
import java.util.Arrays;
|
||||
|
@ -13,14 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.android.exoplayer2.testutil;
|
||||
package com.google.android.exoplayer2.playbacktests.gts;
|
||||
|
||||
import com.google.android.exoplayer2.util.Log;
|
||||
|
||||
/**
|
||||
* Implementation of {@link MetricsLogger} that prints the metrics to logcat.
|
||||
*/
|
||||
public final class LogcatMetricsLogger implements MetricsLogger {
|
||||
/** Implementation of {@link MetricsLogger} that prints the metrics to logcat. */
|
||||
/* package */ final class LogcatMetricsLogger implements MetricsLogger {
|
||||
|
||||
private final String tag;
|
||||
|
||||
@ -33,11 +31,6 @@ public final class LogcatMetricsLogger implements MetricsLogger {
|
||||
Log.d(tag, key + ": " + value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logMetric(String key, double value) {
|
||||
Log.d(tag, key + ": " + value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logMetric(String key, String value) {
|
||||
Log.d(tag, key + ": " + value);
|
@ -13,12 +13,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.android.exoplayer2.testutil;
|
||||
package com.google.android.exoplayer2.playbacktests.gts;
|
||||
|
||||
/**
|
||||
* Metric Logging interface for ExoPlayer playback tests.
|
||||
*/
|
||||
public interface MetricsLogger {
|
||||
/** Metric logging interface for playback tests. */
|
||||
/* package */ interface MetricsLogger {
|
||||
|
||||
String KEY_FRAMES_DROPPED_COUNT = "frames_dropped_count";
|
||||
String KEY_FRAMES_RENDERED_COUNT = "frames_rendered_count";
|
||||
@ -35,14 +33,6 @@ public interface MetricsLogger {
|
||||
*/
|
||||
void logMetric(String key, int value);
|
||||
|
||||
/**
|
||||
* Logs a double metric provided from a test.
|
||||
*
|
||||
* @param key The key of the metric to be logged.
|
||||
* @param value The value of the metric to be logged.
|
||||
*/
|
||||
void logMetric(String key, double value);
|
||||
|
||||
/**
|
||||
* Logs a string metric provided from a test.
|
||||
*
|
Loading…
x
Reference in New Issue
Block a user