Rename packages for HLS module

PiperOrigin-RevId: 382508442
This commit is contained in:
christosts 2021-07-01 14:09:19 +01:00 committed by kim-vde
parent 124a6aea50
commit db454973f2
15 changed files with 34 additions and 6 deletions

View File

@ -18,9 +18,9 @@ instances and pass them directly to the player. For advanced download use cases,
## Links ## ## Links ##
* [Developer Guide][]. * [Developer Guide][].
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.source.hls.*` * [Javadoc][]: Classes matching `com.google.android.exoplayer2.source.hls.*` belong to
belong to this module. this module.
[Developer Guide]: https://exoplayer.dev/hls.html [Developer Guide]: https://exoplayer.dev/hls.html
[Javadoc]: https://exoplayer.dev/doc/reference/index.html [Javadoc]: https://exoplayer.dev/doc/reference/index.html

View File

@ -29,9 +29,11 @@ import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException; import javax.crypto.NoSuchPaddingException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Test for {@link Aes128DataSource}. */ /** Test for {@link Aes128DataSource}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class Aes128DataSourceTest { public class Aes128DataSourceTest {
@Test @Test

View File

@ -40,9 +40,11 @@ import java.util.Map;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for {@link DefaultExtractorsFactory}. */ /** Unit test for {@link DefaultExtractorsFactory}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class DefaultHlsExtractorFactoryTest { public class DefaultHlsExtractorFactoryTest {
private static final Uri URI_WITH_JPEG_EXTENSION = Uri.parse("http://path/filename.jpg"); private static final Uri URI_WITH_JPEG_EXTENSION = Uri.parse("http://path/filename.jpg");

View File

@ -27,9 +27,11 @@ import com.google.android.exoplayer2.source.MediaSource;
import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.MimeTypes;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for creating HLS media sources with the {@link DefaultMediaSourceFactory}. */ /** Unit test for creating HLS media sources with the {@link DefaultMediaSourceFactory}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class DefaultMediaSourceFactoryTest { public class DefaultMediaSourceFactoryTest {
private static final String URI_MEDIA = "http://exoplayer.dev/video"; private static final String URI_MEDIA = "http://exoplayer.dev/video";

View File

@ -23,9 +23,11 @@ import android.net.Uri;
import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Tests for {@link FullSegmentEncryptionKeyCache}. */ /** Tests for {@link FullSegmentEncryptionKeyCache}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class FullSegmentEncryptionKeyCacheTest { public class FullSegmentEncryptionKeyCacheTest {
private final Uri firstUri = Uri.parse("https://www.google.com"); private final Uri firstUri = Uri.parse("https://www.google.com");

View File

@ -44,9 +44,11 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for {@link HlsMediaPeriod}. */ /** Unit test for {@link HlsMediaPeriod}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public final class HlsMediaPeriodTest { public final class HlsMediaPeriodTest {
@Test @Test

View File

@ -32,9 +32,11 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for {@link HlsChunkSource.HlsMediaPlaylistSegmentIterator}. */ /** Unit test for {@link HlsChunkSource.HlsMediaPlaylistSegmentIterator}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class HlsMediaPlaylistSegmentIteratorTest { public class HlsMediaPlaylistSegmentIteratorTest {
public static final String LOW_LATENCY_SEGMENTS_AND_PARTS = public static final String LOW_LATENCY_SEGMENTS_AND_PARTS =

View File

@ -43,9 +43,11 @@ import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for {@link HlsMediaSource}. */ /** Unit test for {@link HlsMediaSource}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class HlsMediaSourceTest { public class HlsMediaSourceTest {
// Tests backwards compatibility // Tests backwards compatibility

View File

@ -22,9 +22,11 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.android.exoplayer2.source.hls.HlsTrackMetadataEntry.VariantInfo; import com.google.android.exoplayer2.source.hls.HlsTrackMetadataEntry.VariantInfo;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Test for {@link HlsTrackMetadataEntry}. */ /** Test for {@link HlsTrackMetadataEntry}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class HlsTrackMetadataEntryTest { public class HlsTrackMetadataEntryTest {
@Test @Test

View File

@ -29,9 +29,11 @@ import java.io.EOFException;
import java.io.IOException; import java.io.IOException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Tests for {@link WebvttExtractor}. */ /** Tests for {@link WebvttExtractor}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class WebvttExtractorTest { public class WebvttExtractorTest {
@Test @Test

View File

@ -24,9 +24,11 @@ import com.google.android.exoplayer2.testutil.FakeDataSource;
import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.MimeTypes;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test to verify creation of a HLS {@link DownloadHelper}. */ /** Unit test to verify creation of a HLS {@link DownloadHelper}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public final class DownloadHelperTest { public final class DownloadHelperTest {
@Test @Test

View File

@ -44,7 +44,7 @@ import com.google.android.exoplayer2.offline.Downloader;
import com.google.android.exoplayer2.offline.DownloaderFactory; import com.google.android.exoplayer2.offline.DownloaderFactory;
import com.google.android.exoplayer2.offline.StreamKey; import com.google.android.exoplayer2.offline.StreamKey;
import com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist; import com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist;
import com.google.android.exoplayer2.testutil.CacheAsserts.RequestSet; import com.google.android.exoplayer2.testutil.CacheAsserts;
import com.google.android.exoplayer2.testutil.FakeDataSet; import com.google.android.exoplayer2.testutil.FakeDataSet;
import com.google.android.exoplayer2.testutil.FakeDataSource; import com.google.android.exoplayer2.testutil.FakeDataSource;
import com.google.android.exoplayer2.testutil.TestUtil; import com.google.android.exoplayer2.testutil.TestUtil;
@ -64,9 +64,11 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.mockito.Mockito; import org.mockito.Mockito;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit tests for {@link HlsDownloader}. */ /** Unit tests for {@link HlsDownloader}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class HlsDownloaderTest { public class HlsDownloaderTest {
private SimpleCache cache; private SimpleCache cache;
@ -136,7 +138,7 @@ public class HlsDownloaderTest {
assertCachedData( assertCachedData(
cache, cache,
new RequestSet(fakeDataSet) new CacheAsserts.RequestSet(fakeDataSet)
.subset( .subset(
MASTER_PLAYLIST_URI, MASTER_PLAYLIST_URI,
MEDIA_PLAYLIST_1_URI, MEDIA_PLAYLIST_1_URI,
@ -194,7 +196,7 @@ public class HlsDownloaderTest {
assertCachedData( assertCachedData(
cache, cache,
new RequestSet(fakeDataSet) new CacheAsserts.RequestSet(fakeDataSet)
.subset( .subset(
MEDIA_PLAYLIST_1_URI, MEDIA_PLAYLIST_1_URI,
MEDIA_PLAYLIST_1_DIR + "fileSequence0.ts", MEDIA_PLAYLIST_1_DIR + "fileSequence0.ts",

View File

@ -39,9 +39,11 @@ import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for {@link DefaultHlsPlaylistTracker}. */ /** Unit test for {@link DefaultHlsPlaylistTracker}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class DefaultHlsPlaylistTrackerTest { public class DefaultHlsPlaylistTrackerTest {
private static final String SAMPLE_M3U8_LIVE_MASTER = "media/m3u8/live_low_latency_master"; private static final String SAMPLE_M3U8_LIVE_MASTER = "media/m3u8/live_low_latency_master";

View File

@ -35,9 +35,11 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Test for {@link HlsMasterPlaylist}. */ /** Test for {@link HlsMasterPlaylist}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class HlsMasterPlaylistParserTest { public class HlsMasterPlaylistParserTest {
private static final String PLAYLIST_URI = "https://example.com/test.m3u8"; private static final String PLAYLIST_URI = "https://example.com/test.m3u8";

View File

@ -36,9 +36,11 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Test for {@link HlsMediaPlaylistParserTest}. */ /** Test for {@link HlsMediaPlaylistParserTest}. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class HlsMediaPlaylistParserTest { public class HlsMediaPlaylistParserTest {
@Test @Test