mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Change Hls/DashDownloadTestData from interface to final class
PiperOrigin-RevId: 739206754
This commit is contained in:
parent
5f7066a9d9
commit
e01467eb5e
@ -19,12 +19,12 @@ import android.net.Uri;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
/** Data for DASH downloading tests. */
|
/** Data for DASH downloading tests. */
|
||||||
/* package */ interface DashDownloadTestData {
|
/* package */ final class DashDownloadTestData {
|
||||||
|
|
||||||
String TEST_ID = "test.mpd";
|
public static final String TEST_ID = "test.mpd";
|
||||||
Uri TEST_MPD_URI = Uri.parse(TEST_ID);
|
public static final Uri TEST_MPD_URI = Uri.parse(TEST_ID);
|
||||||
|
|
||||||
byte[] TEST_MPD =
|
public static final byte[] TEST_MPD =
|
||||||
("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||||
+ "<MPD xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" type=\"static\" "
|
+ "<MPD xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" type=\"static\" "
|
||||||
+ " mediaPresentationDuration=\"PT31S\">\n"
|
+ " mediaPresentationDuration=\"PT31S\">\n"
|
||||||
@ -88,7 +88,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
+ "</MPD>")
|
+ "</MPD>")
|
||||||
.getBytes(StandardCharsets.UTF_8);
|
.getBytes(StandardCharsets.UTF_8);
|
||||||
|
|
||||||
byte[] TEST_MPD_NO_INDEX =
|
public static final byte[] TEST_MPD_NO_INDEX =
|
||||||
("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||||
+ "<MPD xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" type=\"dynamic\">\n"
|
+ "<MPD xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" type=\"dynamic\">\n"
|
||||||
+ " <Period start=\"PT6462826.784S\" >\n"
|
+ " <Period start=\"PT6462826.784S\" >\n"
|
||||||
@ -100,4 +100,6 @@ import java.nio.charset.StandardCharsets;
|
|||||||
+ " </Period>\n"
|
+ " </Period>\n"
|
||||||
+ "</MPD>")
|
+ "</MPD>")
|
||||||
.getBytes(StandardCharsets.UTF_8);
|
.getBytes(StandardCharsets.UTF_8);
|
||||||
|
|
||||||
|
private DashDownloadTestData() {}
|
||||||
}
|
}
|
||||||
|
@ -18,24 +18,24 @@ package androidx.media3.exoplayer.hls.offline;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
/** Data for HLS downloading tests. */
|
/** Data for HLS downloading tests. */
|
||||||
/* package */ interface HlsDownloadTestData {
|
/* package */ final class HlsDownloadTestData {
|
||||||
|
|
||||||
String MULTIVARIANT_PLAYLIST_URI = "test.m3u8";
|
public static final String MULTIVARIANT_PLAYLIST_URI = "test.m3u8";
|
||||||
int MULTIVARIANT_MEDIA_PLAYLIST_1_INDEX = 0;
|
public static final int MULTIVARIANT_MEDIA_PLAYLIST_1_INDEX = 0;
|
||||||
int MULTIVARIANT_MEDIA_PLAYLIST_2_INDEX = 1;
|
public static final int MULTIVARIANT_MEDIA_PLAYLIST_2_INDEX = 1;
|
||||||
int MULTIVARIANT_MEDIA_PLAYLIST_3_INDEX = 2;
|
public static final int MULTIVARIANT_MEDIA_PLAYLIST_3_INDEX = 2;
|
||||||
int MULTIVARIANT_MEDIA_PLAYLIST_0_INDEX = 3;
|
public static final int MULTIVARIANT_MEDIA_PLAYLIST_0_INDEX = 3;
|
||||||
|
|
||||||
String MEDIA_PLAYLIST_0_DIR = "gear0/";
|
public static final String MEDIA_PLAYLIST_0_DIR = "gear0/";
|
||||||
String MEDIA_PLAYLIST_0_URI = MEDIA_PLAYLIST_0_DIR + "prog_index.m3u8";
|
public static final String MEDIA_PLAYLIST_0_URI = MEDIA_PLAYLIST_0_DIR + "prog_index.m3u8";
|
||||||
String MEDIA_PLAYLIST_1_DIR = "gear1/";
|
public static final String MEDIA_PLAYLIST_1_DIR = "gear1/";
|
||||||
String MEDIA_PLAYLIST_1_URI = MEDIA_PLAYLIST_1_DIR + "prog_index.m3u8";
|
public static final String MEDIA_PLAYLIST_1_URI = MEDIA_PLAYLIST_1_DIR + "prog_index.m3u8";
|
||||||
String MEDIA_PLAYLIST_2_DIR = "gear2/";
|
public static final String MEDIA_PLAYLIST_2_DIR = "gear2/";
|
||||||
String MEDIA_PLAYLIST_2_URI = MEDIA_PLAYLIST_2_DIR + "prog_index.m3u8";
|
public static final String MEDIA_PLAYLIST_2_URI = MEDIA_PLAYLIST_2_DIR + "prog_index.m3u8";
|
||||||
String MEDIA_PLAYLIST_3_DIR = "gear3/";
|
public static final String MEDIA_PLAYLIST_3_DIR = "gear3/";
|
||||||
String MEDIA_PLAYLIST_3_URI = MEDIA_PLAYLIST_3_DIR + "prog_index.m3u8";
|
public static final String MEDIA_PLAYLIST_3_URI = MEDIA_PLAYLIST_3_DIR + "prog_index.m3u8";
|
||||||
|
|
||||||
byte[] MULTIVARIANT_PLAYLIST_DATA =
|
public static final byte[] MULTIVARIANT_PLAYLIST_DATA =
|
||||||
("#EXTM3U\n"
|
("#EXTM3U\n"
|
||||||
+ "#EXT-X-STREAM-INF:BANDWIDTH=232370,CODECS=\"mp4a.40.2, avc1.4d4015\"\n"
|
+ "#EXT-X-STREAM-INF:BANDWIDTH=232370,CODECS=\"mp4a.40.2, avc1.4d4015\"\n"
|
||||||
+ MEDIA_PLAYLIST_1_URI
|
+ MEDIA_PLAYLIST_1_URI
|
||||||
@ -50,7 +50,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
+ MEDIA_PLAYLIST_0_URI)
|
+ MEDIA_PLAYLIST_0_URI)
|
||||||
.getBytes(StandardCharsets.UTF_8);
|
.getBytes(StandardCharsets.UTF_8);
|
||||||
|
|
||||||
byte[] MEDIA_PLAYLIST_DATA =
|
public static final byte[] MEDIA_PLAYLIST_DATA =
|
||||||
("#EXTM3U\n"
|
("#EXTM3U\n"
|
||||||
+ "#EXT-X-TARGETDURATION:10\n"
|
+ "#EXT-X-TARGETDURATION:10\n"
|
||||||
+ "#EXT-X-VERSION:3\n"
|
+ "#EXT-X-VERSION:3\n"
|
||||||
@ -65,9 +65,9 @@ import java.nio.charset.StandardCharsets;
|
|||||||
+ "#EXT-X-ENDLIST")
|
+ "#EXT-X-ENDLIST")
|
||||||
.getBytes(StandardCharsets.UTF_8);
|
.getBytes(StandardCharsets.UTF_8);
|
||||||
|
|
||||||
String ENC_MEDIA_PLAYLIST_URI = "enc_index.m3u8";
|
public static final String ENC_MEDIA_PLAYLIST_URI = "enc_index.m3u8";
|
||||||
|
|
||||||
byte[] ENC_MEDIA_PLAYLIST_DATA =
|
public static final byte[] ENC_MEDIA_PLAYLIST_DATA =
|
||||||
("#EXTM3U\n"
|
("#EXTM3U\n"
|
||||||
+ "#EXT-X-TARGETDURATION:10\n"
|
+ "#EXT-X-TARGETDURATION:10\n"
|
||||||
+ "#EXT-X-VERSION:3\n"
|
+ "#EXT-X-VERSION:3\n"
|
||||||
@ -83,4 +83,6 @@ import java.nio.charset.StandardCharsets;
|
|||||||
+ "fileSequence2.ts\n"
|
+ "fileSequence2.ts\n"
|
||||||
+ "#EXT-X-ENDLIST")
|
+ "#EXT-X-ENDLIST")
|
||||||
.getBytes(StandardCharsets.UTF_8);
|
.getBytes(StandardCharsets.UTF_8);
|
||||||
|
|
||||||
|
private HlsDownloadTestData() {}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user