id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
133447770_94
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testArrayBinarySearchCeil() {\n long[] values = new long[0];\n assertThat(binarySearchCeil(values, 0, false, false)).isEqualTo(0);\n assertThat(binarySearchCeil(values, 0, false, true)).isEqualTo(-1);\n\n values = new long[] {1, 3, 5};\n assertThat(binarySearchCeil(value...
{ "fields": [ { "declarator": "SDK_INT = Build.VERSION.SDK_INT", "modifier": "public static final", "original_string": "public static final int SDK_INT = Build.VERSION.SDK_INT;", "type": "int", "var_name": "SDK_INT" }, { "declarator": "DEVICE = Build.DEVICE", "mod...
{ "body": "public static int binarySearchCeil(\n int[] array, int value, boolean inclusive, boolean stayInBounds) {\n int index = Arrays.binarySearch(array, value);\n if (index < 0) {\n index = ~index;\n } else {\n while (++index < array.length && array[index] == value) {}\n if (inclusive...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_393
{ "fields": [ { "declarator": "tempFile", "modifier": "private", "original_string": "private File tempFile;", "type": "File", "var_name": "tempFile" }, { "declarator": "expectedAction1", "modifier": "private", "original_string": "private DownloadRequest expe...
{ "body": "@Test\n public void testLoadOneAction() throws Exception {\n ActionFile actionFile = getActionFile(\"offline/action_file_one_action.exi\");\n DownloadRequest[] actions = actionFile.load();\n assertThat(actions).hasLength(1);\n assertThat(actions[0]).isEqualTo(expectedAction1);\n }", "class_...
{ "fields": [ { "declarator": "VERSION = 0", "modifier": "private static final", "original_string": "private static final int VERSION = 0;", "type": "int", "var_name": "VERSION" }, { "declarator": "atomicFile", "modifier": "private final", "original_string":...
{ "body": "public DownloadRequest[] load() throws IOException {\n if (!exists()) {\n return new DownloadRequest[0];\n }\n InputStream inputStream = null;\n try {\n inputStream = atomicFile.openRead();\n DataInputStream dataInputStream = new DataInputStream(inputStream);\n int version =...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_95
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testListBinarySearchCeil() {\n List<Integer> values = new ArrayList<>();\n assertThat(binarySearchCeil(values, 0, false, false)).isEqualTo(0);\n assertThat(binarySearchCeil(values, 0, false, true)).isEqualTo(-1);\n\n values.add(1);\n values.add(3);\n values.add(5);\n ...
{ "fields": [ { "declarator": "SDK_INT = Build.VERSION.SDK_INT", "modifier": "public static final", "original_string": "public static final int SDK_INT = Build.VERSION.SDK_INT;", "type": "int", "var_name": "SDK_INT" }, { "declarator": "DEVICE = Build.DEVICE", "mod...
{ "body": "public static int binarySearchCeil(\n int[] array, int value, boolean inclusive, boolean stayInBounds) {\n int index = Arrays.binarySearch(array, value);\n if (index < 0) {\n index = ~index;\n } else {\n while (++index < array.length && array[index] == value) {}\n if (inclusive...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_392
{ "fields": [ { "declarator": "tempFile", "modifier": "private", "original_string": "private File tempFile;", "type": "File", "var_name": "tempFile" }, { "declarator": "expectedAction1", "modifier": "private", "original_string": "private DownloadRequest expe...
{ "body": "@Test\n public void testLoadZeroActions() throws Exception {\n ActionFile actionFile = getActionFile(\"offline/action_file_zero_actions.exi\");\n DownloadRequest[] actions = actionFile.load();\n assertThat(actions).isNotNull();\n assertThat(actions).hasLength(0);\n }", "class_method_signatu...
{ "fields": [ { "declarator": "VERSION = 0", "modifier": "private static final", "original_string": "private static final int VERSION = 0;", "type": "int", "var_name": "VERSION" }, { "declarator": "atomicFile", "modifier": "private final", "original_string":...
{ "body": "public DownloadRequest[] load() throws IOException {\n if (!exists()) {\n return new DownloadRequest[0];\n }\n InputStream inputStream = null;\n try {\n inputStream = atomicFile.openRead();\n DataInputStream dataInputStream = new DataInputStream(inputStream);\n int version =...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_404
{ "fields": [ { "declarator": "ASSERT_TRUE_TIMEOUT = 10000", "modifier": "private static final", "original_string": "private static final int ASSERT_TRUE_TIMEOUT = 10000;", "type": "int", "var_name": "ASSERT_TRUE_TIMEOUT" }, { "declarator": "ASSERT_FALSE_TIME = 1000", ...
{ "body": "@Test\n public void mergeRequest_removing_becomesRestarting() {\n DownloadRequest downloadRequest = createDownloadRequest();\n DownloadBuilder downloadBuilder =\n new DownloadBuilder(downloadRequest).setState(Download.STATE_REMOVING);\n Download download = downloadBuilder.build();\n\n D...
{ "fields": [ { "declarator": "DEFAULT_MAX_PARALLEL_DOWNLOADS = 3", "modifier": "public static final", "original_string": "public static final int DEFAULT_MAX_PARALLEL_DOWNLOADS = 3;", "type": "int", "var_name": "DEFAULT_MAX_PARALLEL_DOWNLOADS" }, { "declarator": "DEFAU...
{ "body": "static Download mergeRequest(\n Download download, DownloadRequest request, int stopReason, long nowMs) {\n @Download.State int state = download.state;\n // Treat the merge as creating a new download if we're currently removing the existing one, or\n // if the existing download is in a termin...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_453
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void\n getAverageBitrate_chunksExceedingMaxDuration_returnsAverageChunkBitrateUpToMaxDuration() {\n long[] chunkTimeBoundariesSec = {0, 5, 15, 45, 50};\n long[] chunkLengths = {10, 20, 30, 100};\n FakeMediaChunkIterator iterator =\n new FakeMediaChunkIterator(chunkTimeB...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "public static int getAverageBitrate(MediaChunkIterator iterator, long maxDurationUs) {\n long totalDurationUs = 0;\n long totalLength = 0;\n while (iterator.next()) {\n long chunkLength = iterator.getDataSpec().length;\n if (chunkLength == C.LENGTH_UNSET) {\n break;\n }\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_146
{ "fields": [ { "declarator": "TEST_DATA =\n new byte[] {0x0F, (byte) 0xFF, (byte) 0x42, (byte) 0x0F, 0x00, 0x00, 0x00, 0x00}", "modifier": "private static final", "original_string": "private static final byte[] TEST_DATA =\n new byte[] {0x0F, (byte) 0xFF, (byte) 0x42, (byte) 0x0F, 0x0...
{ "body": "@Test\n public void testReadFourLinesWithLfFollowedByCr() {\n byte[] bytes = new byte[] {\n 'f', 'o', 'o', '\\n', '\\r', '\\r', 'b', 'a', 'r', '\\r', '\\n'\n };\n ParsableByteArray parser = new ParsableByteArray(bytes);\n assertThat(parser.readLine()).isEqualTo(\"foo\");\n assertThat(p...
{ "fields": [ { "declarator": "data", "modifier": "public", "original_string": "public byte[] data;", "type": "byte[]", "var_name": "data" }, { "declarator": "position", "modifier": "private", "original_string": "private int position;", "type": "int", ...
{ "body": "public @Nullable String readLine() {\n if (bytesLeft() == 0) {\n return null;\n }\n int lineLimit = position;\n while (lineLimit < limit && !Util.isLinebreak(data[lineLimit])) {\n lineLimit++;\n }\n if (lineLimit - position >= 3 && data[position] == (byte) 0xEF\n && data[...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_279
{ "fields": [ { "declarator": "KEY_1 = \"key1\"", "modifier": "private static final", "original_string": "private static final String KEY_1 = \"key1\";", "type": "String", "var_name": "KEY_1" }, { "declarator": "KEY_2 = \"key2\"", "modifier": "private static final...
{ "body": "@Test\n public void testMultipleSimpleCacheWithSameCacheDirDoesNotThrowsExceptionAfterRelease()\n throws Exception {\n SimpleCache simpleCache = new SimpleCache(cacheDir, new NoOpCacheEvictor());\n simpleCache.release();\n\n new SimpleCache(cacheDir, new NoOpCacheEvictor());\n }", "class_...
{ "fields": [ { "declarator": "TAG = \"SimpleCache\"", "modifier": "private static final", "original_string": "private static final String TAG = \"SimpleCache\";", "type": "String", "var_name": "TAG" }, { "declarator": "SUBDIRECTORY_COUNT = 10", "modifier": "priva...
{ "body": "@Override\n public synchronized void release() {\n if (released) {\n return;\n }\n listeners.clear();\n removeStaleSpans();\n try {\n contentIndex.store();\n } catch (IOException e) {\n Log.e(TAG, \"Storing index file failed\", e);\n } finally {\n unlockFolder(cach...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_296
{ "fields": [ { "declarator": "SIMULATED_TRANSFER_COUNT = 100", "modifier": "private static final", "original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;", "type": "int", "var_name": "SIMULATED_TRANSFER_COUNT" }, { "declarator": "FAST_COUNTRY_ISO ...
{ "body": "@Test\n public void defaultInitialBitrateEstimate_for4G_isGreaterThanEstimateFor2G() {\n setActiveNetworkInfo(networkInfo4g);\n DefaultBandwidthMeter bandwidthMeter4g =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext()).build();\n long initialEstimate4g = band...
{ "fields": [ { "declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()", "modifier": "public static final", "original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG...
{ "body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }", "class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()", "constructor": false, "full_signature": "@Override public synchronized long getBitrateEstimate()", "identifier": "getBitrateEstima...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_445
{ "fields": [ { "declarator": "DATA_1 = new SchemeData(WIDEVINE_UUID, VIDEO_MP4,\n TestUtil.buildTestData(128, 1 /* data seed */))", "modifier": "private static final", "original_string": "private static final SchemeData DATA_1 = new SchemeData(WIDEVINE_UUID, VIDEO_MP4,\n TestUtil.buil...
{ "body": "@Test\n @SuppressWarnings(\"deprecation\")\n public void testGetByUuid() {\n // Basic matching.\n DrmInitData testInitData = new DrmInitData(DATA_1, DATA_2);\n assertThat(testInitData.get(WIDEVINE_UUID)).isEqualTo(DATA_1);\n assertThat(testInitData.get(PLAYREADY_UUID)).isEqualTo(DATA_2);\n ...
{ "fields": [ { "declarator": "schemeDatas", "modifier": "private final", "original_string": "private final SchemeData[] schemeDatas;", "type": "SchemeData[]", "var_name": "schemeDatas" }, { "declarator": "hashCode", "modifier": "private", "original_string":...
{ "body": "@Deprecated\n public @Nullable SchemeData get(UUID uuid) {\n for (SchemeData schemeData : schemeDatas) {\n if (schemeData.matches(uuid)) {\n return schemeData;\n }\n }\n return null;\n }", "class_method_signature": "DrmInitData.get(UUID uuid)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_3
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/extractor/ogg/VorbisUtilTest.java", "identifier": "VorbisUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReadVorbisModes() throws ParserException {\n byte[] data = OggTestData.getSetupHeaderData();\n ParsableByteArray headerData = new ParsableByteArray(data, data.length);\n VorbisUtil.Mode[] modes = VorbisUtil.readVorbisModes(headerData, 2);\n\n assertThat(modes).hasLength...
{ "fields": [ { "declarator": "TAG = \"VorbisUtil\"", "modifier": "private static final", "original_string": "private static final String TAG = \"VorbisUtil\";", "type": "String", "var_name": "TAG" } ], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/ext...
{ "body": "public static Mode[] readVorbisModes(ParsableByteArray headerData, int channels)\n throws ParserException {\n\n verifyVorbisHeaderCapturePattern(0x05, headerData, false);\n\n int numberOfBooks = headerData.readUnsignedByte() + 1;\n\n VorbisBitArray bitArray = new VorbisBitArray(headerData.da...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_500
{ "fields": [ { "declarator": "ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_AUDIO)", "modifier": "private static final", "original_string": "private static final RendererCapabilities ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n ...
{ "body": "@Test\n public void testSelectTracksWithMultipleVideoTracks() throws Exception {\n TrackGroupArray trackGroups = singleTrackGroup(buildVideoFormat(\"0\"), buildVideoFormat(\"1\"));\n TrackSelectorResult result =\n trackSelector.selectTracks(\n new RendererCapabilities[] {VIDEO_CAPA...
{ "fields": [ { "declarator": "FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f", "modifier": "private static final", "original_string": "private static final float FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f;", "type": "float", "var_name": "FRACTION_TO_CONSIDER_FULLSCREEN" }, { "de...
{ "body": "@Override\n protected final Pair<@NullableType RendererConfiguration[], @NullableType TrackSelection[]>\n selectTracks(\n MappedTrackInfo mappedTrackInfo,\n int[][][] rendererFormatSupports,\n int[] rendererMixedMimeTypeAdaptationSupports)\n throws ExoPlaybackExcep...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_384
{ "fields": [ { "declarator": "ALLOCATION_SIZE = 16", "modifier": "private static final", "original_string": "private static final int ALLOCATION_SIZE = 16;", "type": "int", "var_name": "ALLOCATION_SIZE" }, { "declarator": "FORMAT_1 = Format.createSampleFormat(\"1\", \"...
{ "body": "@Test\n public void testLargestQueuedTimestampWithRead() {\n writeTestData();\n assertThat(sampleQueue.getLargestQueuedTimestampUs()).isEqualTo(LAST_SAMPLE_TIMESTAMP);\n assertReadTestData();\n // Reading everything should not reduce the largest timestamp.\n assertThat(sampleQueue.getLarges...
{ "fields": [ { "declarator": "ADVANCE_FAILED = -1", "modifier": "public static final", "original_string": "public static final int ADVANCE_FAILED = -1;", "type": "int", "var_name": "ADVANCE_FAILED" }, { "declarator": "INITIAL_SCRATCH_SIZE = 32", "modifier": "priv...
{ "body": "public long getLargestQueuedTimestampUs() {\n return metadataQueue.getLargestQueuedTimestampUs();\n }", "class_method_signature": "SampleQueue.getLargestQueuedTimestampUs()", "constructor": false, "full_signature": "public long getLargestQueuedTimestampUs()", "identifier": "getLargestQueuedTime...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_83
{ "fields": [ { "declarator": "TEST_DATA = new byte[] {0x3C, (byte) 0xD2, (byte) 0x5F, (byte) 0x01,\n (byte) 0xFF, (byte) 0x14, (byte) 0x60, (byte) 0x99}", "modifier": "private static final", "original_string": "private static final byte[] TEST_DATA = new byte[] {0x3C, (byte) 0xD2, (byte) 0...
{ "body": "@Test\n public void testRead32BitsNonByteAligned() {\n assertThat(testArray.readBits(5)).isEqualTo(getTestDataBits(0, 5));\n assertThat(testArray.readBits(32)).isEqualTo(getTestDataBits(5, 32));\n }", "class_method_signature": "ParsableBitArrayTest.testRead32BitsNonByteAligned()", "constructor"...
{ "fields": [ { "declarator": "data", "modifier": "public", "original_string": "public byte[] data;", "type": "byte[]", "var_name": "data" }, { "declarator": "byteOffset", "modifier": "private", "original_string": "private int byteOffset;", "type": "in...
{ "body": "public int readBits(int numBits) {\n if (numBits == 0) {\n return 0;\n }\n int returnValue = 0;\n bitOffset += numBits;\n while (bitOffset > 8) {\n bitOffset -= 8;\n returnValue |= (data[byteOffset++] & 0xFF) << bitOffset;\n }\n returnValue |= (data[byteOffset] & 0xFF) >...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_412
{ "fields": [ { "declarator": "EMPTY_NAME = \"\"", "modifier": "private static final", "original_string": "private static final String EMPTY_NAME = \"\";", "type": "String", "var_name": "EMPTY_NAME" }, { "declarator": "databaseProvider", "modifier": "private", ...
{ "body": "@Test\n public void removeDownload_nonExistingId_doesNotFail() throws DatabaseIOException {\n downloadIndex.removeDownload(\"non existing id\");\n }", "class_method_signature": "DefaultDownloadIndexTest.removeDownload_nonExistingId_doesNotFail()", "constructor": false, "full_signature": "@Test p...
{ "fields": [ { "declarator": "TABLE_PREFIX = DatabaseProvider.TABLE_PREFIX + \"Downloads\"", "modifier": "private static final", "original_string": "private static final String TABLE_PREFIX = DatabaseProvider.TABLE_PREFIX + \"Downloads\";", "type": "String", "var_name": "TABLE_PREFI...
{ "body": "@Override\n public void removeDownload(String id) throws DatabaseIOException {\n ensureInitialized();\n try {\n databaseProvider.getWritableDatabase().delete(tableName, WHERE_ID_EQUALS, new String[] {id});\n } catch (SQLiteException e) {\n throw new DatabaseIOException(e);\n }\n }",...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_107
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UriUtilTest.java", "identifier": "UriUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void removeFirstQueryParameter() {\n Uri uri = Uri.parse(\"http://uri?query=value&second=value2\");\n assertThat(removeQueryParameter(uri, \"query\").toString()).isEqualTo(\"http://uri?second=value2\");\n }", "class_method_signature": "UriUtilTest.removeFirstQueryParameter()", "c...
{ "fields": [ { "declarator": "INDEX_COUNT = 4", "modifier": "private static final", "original_string": "private static final int INDEX_COUNT = 4;", "type": "int", "var_name": "INDEX_COUNT" }, { "declarator": "SCHEME_COLON = 0", "modifier": "private static final",...
{ "body": "public static Uri removeQueryParameter(Uri uri, String queryParameterName) {\n Uri.Builder builder = uri.buildUpon();\n builder.clearQuery();\n for (String key : uri.getQueryParameterNames()) {\n if (!key.equals(queryParameterName)) {\n for (String value : uri.getQueryParameters(key)) ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_17
{ "fields": [ { "declarator": "OGG_EXTRACTOR_FACTORY = OggExtractor::new", "modifier": "private static final", "original_string": "private static final ExtractorFactory OGG_EXTRACTOR_FACTORY = OggExtractor::new;", "type": "ExtractorFactory", "var_name": "OGG_EXTRACTOR_FACTORY" } ...
{ "body": "@Test\n public void testSniffFailsOpusFile() throws Exception {\n byte[] data =\n TestUtil.joinByteArrays(\n OggTestData.buildOggHeader(0x02, 0, 1000, 0x00), new byte[] {'O', 'p', 'u', 's'});\n assertThat(sniff(data)).isFalse();\n }", "class_method_signature": "OggExtractorTest....
{ "fields": [ { "declarator": "FACTORY = () -> new Extractor[] {new OggExtractor()}", "modifier": "public static final", "original_string": "public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new OggExtractor()};", "type": "ExtractorsFactory", "var_name": "FACTORY...
{ "body": "@Override\n public boolean sniff(ExtractorInput input) throws IOException, InterruptedException {\n try {\n return sniffInternal(input);\n } catch (ParserException e) {\n return false;\n }\n }", "class_method_signature": "OggExtractor.sniff(ExtractorInput input)", "constructor": fa...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_310
{ "fields": [ { "declarator": "SIMULATED_TRANSFER_COUNT = 100", "modifier": "private static final", "original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;", "type": "int", "var_name": "SIMULATED_TRANSFER_COUNT" }, { "declarator": "FAST_COUNTRY_ISO ...
{ "body": "@Test\n public void\n initialBitrateEstimateOverwrite_forEthernet_whileConnectedToOtherNetwork_doesNotSetInitialEstimate() {\n setActiveNetworkInfo(networkInfo2g);\n DefaultBandwidthMeter bandwidthMeter =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext())\n ...
{ "fields": [ { "declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()", "modifier": "public static final", "original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG...
{ "body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }", "class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()", "constructor": false, "full_signature": "@Override public synchronized long getBitrateEstimate()", "identifier": "getBitrateEstima...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_255
{ "fields": [ { "declarator": "schemeDataDataSource", "modifier": "private", "original_string": "private DataSource schemeDataDataSource;", "type": "DataSource", "var_name": "schemeDataDataSource" } ], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/upst...
{ "body": "@Test\n public void testMalformedData() {\n try {\n schemeDataDataSource.open(buildDataSpec(\"data:text/plain;base64,,This%20is%20Content\"));\n fail();\n } catch (IOException e) {\n // Expected.\n }\n try {\n schemeDataDataSource.open(buildDataSpec(\"data:text/plain;base64...
{ "fields": [ { "declarator": "SCHEME_DATA = \"data\"", "modifier": "public static final", "original_string": "public static final String SCHEME_DATA = \"data\";", "type": "String", "var_name": "SCHEME_DATA" }, { "declarator": "dataSpec", "modifier": "private @Nul...
{ "body": "@Override\n public long open(DataSpec dataSpec) throws IOException {\n transferInitializing(dataSpec);\n this.dataSpec = dataSpec;\n Uri uri = dataSpec.uri;\n String scheme = uri.getScheme();\n if (!SCHEME_DATA.equals(scheme)) {\n throw new ParserException(\"Unsupported scheme: \" + sc...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_486
{ "fields": [ { "declarator": "ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_AUDIO)", "modifier": "private static final", "original_string": "private static final RendererCapabilities ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n ...
{ "body": "@Test\n public void testSelectTracksWithNoTrackWithinCapabilitiesSelectExceededCapabilityTrack()\n throws Exception {\n Format audioFormat =\n Format.createAudioSampleFormat(\"audio\", MimeTypes.AUDIO_AAC, null, Format.NO_VALUE,\n Format.NO_VALUE, 2, 44100, null, null, 0, null);\...
{ "fields": [ { "declarator": "FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f", "modifier": "private static final", "original_string": "private static final float FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f;", "type": "float", "var_name": "FRACTION_TO_CONSIDER_FULLSCREEN" }, { "de...
{ "body": "@Override\n protected final Pair<@NullableType RendererConfiguration[], @NullableType TrackSelection[]>\n selectTracks(\n MappedTrackInfo mappedTrackInfo,\n int[][][] rendererFormatSupports,\n int[] rendererMixedMimeTypeAdaptationSupports)\n throws ExoPlaybackExcep...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_193
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java", "identifier": "WebvttCueParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseEntities() throws Exception {\n Spanned text = parseCueText(\"&amp; &gt; &lt; &nbsp;\");\n assertThat(text.toString()).isEqualTo(\"& > < \");\n }", "class_method_signature": "WebvttCueParserTest.testParseEntities()", "constructor": false, "full_signature": "@Test...
{ "fields": [ { "declarator": "CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\")", "modifier": "public static final", "original_string": "public static final Pattern CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\");",...
{ "body": "static void parseCueText(String id, String markup, WebvttCue.Builder builder,\n List<WebvttCssStyle> styles) {\n SpannableStringBuilder spannedText = new SpannableStringBuilder();\n ArrayDeque<StartTag> startTagStack = new ArrayDeque<>();\n List<StyleMatch> scratchStyleMatches = new ArrayList...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_469
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getBitratesUsingPastInfo_oneChunkWithDifferentFormat_returnsEstimationBitrate() {\n FakeMediaChunk chunk =\n createChunk(\n createFormatWithBitrate(10),\n /* length= */ 10,\n /* startTimeSec= */ 0,\n /* endTimeSec= */ 10);\n\n in...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingPastInfo(\n List<? extends MediaChunk> queue,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n if (bitrates == null) {\n bitrates = new int[formats.length];\n Arrays.fill(bitrates, For...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_347
{ "fields": [ { "declarator": "mediaSource", "modifier": "private", "original_string": "private ConcatenatingMediaSource mediaSource;", "type": "ConcatenatingMediaSource", "var_name": "mediaSource" }, { "declarator": "testRunner", "modifier": "private", "ori...
{ "body": "@Test\n public void testCustomCallbackAfterPreparationAddSingleWithIndex() throws IOException {\n DummyMainThread dummyMainThread = new DummyMainThread();\n try {\n testRunner.prepareSource();\n final TimelineGrabber timelineGrabber = new TimelineGrabber(testRunner);\n dummyMainThread...
{ "fields": [ { "declarator": "MSG_ADD = 0", "modifier": "private static final", "original_string": "private static final int MSG_ADD = 0;", "type": "int", "var_name": "MSG_ADD" }, { "declarator": "MSG_REMOVE = 1", "modifier": "private static final", "origin...
{ "body": "public final synchronized void addMediaSource(MediaSource mediaSource) {\n addMediaSource(mediaSourcesPublic.size(), mediaSource);\n }", "class_method_signature": "ConcatenatingMediaSource.addMediaSource(MediaSource mediaSource)", "constructor": false, "full_signature": "public final synchronized...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_202
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java", "identifier": "WebvttCueParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseCornerCases() throws Exception {\n Spanned text = parseCueText(\">\");\n assertThat(text.toString()).isEqualTo(\">\");\n\n text = parseCueText(\"<\");\n assertThat(text.toString()).isEmpty();\n\n text = parseCueText(\"<b.st1.st2 annotation\");\n assertThat(te...
{ "fields": [ { "declarator": "CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\")", "modifier": "public static final", "original_string": "public static final Pattern CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\");",...
{ "body": "static void parseCueText(String id, String markup, WebvttCue.Builder builder,\n List<WebvttCssStyle> styles) {\n SpannableStringBuilder spannedText = new SpannableStringBuilder();\n ArrayDeque<StartTag> startTagStack = new ArrayDeque<>();\n List<StyleMatch> scratchStyleMatches = new ArrayList...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_56
{ "fields": [ { "declarator": "packetPayload", "modifier": "private", "original_string": "private byte[] packetPayload;", "type": "byte[]", "var_name": "packetPayload" }, { "declarator": "payloadReader", "modifier": "private", "original_string": "private Cus...
{ "body": "@Test\n public void testHeaderSplitAcrossPackets() {\n packetPayload[0] = 3; // The first packet includes a pointer_field.\n insertTableSection(4, (byte) 100, 3); // This section header spreads across both packets.\n\n ParsableByteArray firstPacket = new ParsableByteArray(packetPayload, 5);\n ...
{ "fields": [ { "declarator": "SECTION_HEADER_LENGTH = 3", "modifier": "private static final", "original_string": "private static final int SECTION_HEADER_LENGTH = 3;", "type": "int", "var_name": "SECTION_HEADER_LENGTH" }, { "declarator": "DEFAULT_SECTION_BUFFER_LENGTH ...
{ "body": "@Override\n public void consume(ParsableByteArray data, @Flags int flags) {\n boolean payloadUnitStartIndicator = (flags & FLAG_PAYLOAD_UNIT_START_INDICATOR) != 0;\n int payloadStartPosition = C.POSITION_UNSET;\n if (payloadUnitStartIndicator) {\n int payloadStartOffset = data.readUnsignedBy...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_351
{ "fields": [ { "declarator": "mediaSource", "modifier": "private", "original_string": "private ConcatenatingMediaSource mediaSource;", "type": "ConcatenatingMediaSource", "var_name": "mediaSource" }, { "declarator": "testRunner", "modifier": "private", "ori...
{ "body": "@Test\n public void testNestedTimeline() throws IOException {\n ConcatenatingMediaSource nestedSource1 =\n new ConcatenatingMediaSource(/* isAtomic= */ false, new FakeShuffleOrder(0));\n ConcatenatingMediaSource nestedSource2 =\n new ConcatenatingMediaSource(/* isAtomic= */ true, new F...
{ "fields": [ { "declarator": "MSG_ADD = 0", "modifier": "private static final", "original_string": "private static final int MSG_ADD = 0;", "type": "int", "var_name": "MSG_ADD" }, { "declarator": "MSG_REMOVE = 1", "modifier": "private static final", "origin...
{ "body": "public final synchronized void addMediaSource(MediaSource mediaSource) {\n addMediaSource(mediaSourcesPublic.size(), mediaSource);\n }", "class_method_signature": "ConcatenatingMediaSource.addMediaSource(MediaSource mediaSource)", "constructor": false, "full_signature": "public final synchronized...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_214
{ "fields": [ { "declarator": "NO_SUBTITLE = \"tx3g/no_subtitle\"", "modifier": "private static final", "original_string": "private static final String NO_SUBTITLE = \"tx3g/no_subtitle\";", "type": "String", "var_name": "NO_SUBTITLE" }, { "declarator": "SAMPLE_JUST_TEXT...
{ "body": "@Test\n public void testDecodeWithOtherExtension() throws IOException, SubtitleDecoderException {\n Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList());\n byte[] bytes =\n TestUtil.getByteArray(\n ApplicationProvider.getApplicationContext(), SAMPLE_WITH_OTHER_EXTENSION);...
{ "fields": [ { "declarator": "BOM_UTF16_BE = '\\uFEFF'", "modifier": "private static final", "original_string": "private static final char BOM_UTF16_BE = '\\uFEFF';", "type": "char", "var_name": "BOM_UTF16_BE" }, { "declarator": "BOM_UTF16_LE = '\\uFFFE'", "modif...
{ "body": "@Override\n protected Subtitle decode(byte[] bytes, int length, boolean reset)\n throws SubtitleDecoderException {\n parsableByteArray.reset(bytes, length);\n String cueTextString = readSubtitleText(parsableByteArray);\n if (cueTextString.isEmpty()) {\n return Tx3gSubtitle.EMPTY;\n }...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_428
{ "fields": [ { "declarator": "CONTENT_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "private static final", "original_string": "private static final long CONTENT_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "CONTENT_DURATION_US" }, { "de...
{ "body": "@Test\n public void getNextMediaPeriodInfo_withMidrollAds_returnsCorrectMediaPeriodInfos() {\n setupTimeline(\n /* initialPositionUs= */ 0,\n /* adGroupTimesUs= */ FIRST_AD_START_TIME_US,\n SECOND_AD_START_TIME_US);\n assertGetNextMediaPeriodInfoReturnsContentMediaPeriod(\n ...
{ "fields": [ { "declarator": "MAXIMUM_BUFFER_AHEAD_PERIODS = 100", "modifier": "private static final", "original_string": "private static final int MAXIMUM_BUFFER_AHEAD_PERIODS = 100;", "type": "int", "var_name": "MAXIMUM_BUFFER_AHEAD_PERIODS" }, { "declarator": "perio...
{ "body": "public @Nullable MediaPeriodInfo getNextMediaPeriodInfo(\n long rendererPositionUs, PlaybackInfo playbackInfo) {\n return loading == null\n ? getFirstMediaPeriodInfo(playbackInfo)\n : getFollowingMediaPeriodInfo(loading, rendererPositionUs);\n }", "class_method_signature": "MediaPe...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_306
{ "fields": [ { "declarator": "SIMULATED_TRANSFER_COUNT = 100", "modifier": "private static final", "original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;", "type": "int", "var_name": "SIMULATED_TRANSFER_COUNT" }, { "declarator": "FAST_COUNTRY_ISO ...
{ "body": "@Test\n public void initialBitrateEstimateOverwrite_whileOffline_setsInitialEstimate() {\n setActiveNetworkInfo(networkInfoOffline);\n DefaultBandwidthMeter bandwidthMeter =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext())\n .setInitialBitrateEstimat...
{ "fields": [ { "declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()", "modifier": "public static final", "original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG...
{ "body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }", "class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()", "constructor": false, "full_signature": "@Override public synchronized long getBitrateEstimate()", "identifier": "getBitrateEstima...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_243
{ "fields": [ { "declarator": "TAG_HEADER = new byte[] {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 0}", "modifier": "private static final", "original_string": "private static final byte[] TAG_HEADER = new byte[] {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 0};", "type": "byte[]", "var_name": "TAG_HEADER"...
{ "body": "@Test\n public void testDecodeWxxxFrame() {\n byte[] rawId3 = buildSingleFrameTag(\"WXXX\", new byte[] {ID3_TEXT_ENCODING_UTF_8, 116, 101, 115,\n 116, 0, 104, 116, 116, 112, 115, 58, 47, 47, 116, 101, 115, 116, 46, 99, 111, 109, 47, 97,\n 98, 99, 63, 100, 101, 102});\n Id3Decoder decod...
{ "fields": [ { "declarator": "NO_FRAMES_PREDICATE =\n (majorVersion, id0, id1, id2, id3) -> false", "modifier": "public static final", "original_string": "public static final FramePredicate NO_FRAMES_PREDICATE =\n (majorVersion, id0, id1, id2, id3) -> false;", "type": "FramePred...
{ "body": "private static @Nullable UrlLinkFrame decodeWxxxFrame(ParsableByteArray id3Data, int frameSize)\n throws UnsupportedEncodingException {\n if (frameSize < 1) {\n // Frame is malformed.\n return null;\n }\n\n int encoding = id3Data.readUnsignedByte();\n String charset = getCharsetN...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_490
{ "fields": [ { "declarator": "ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_AUDIO)", "modifier": "private static final", "original_string": "private static final RendererCapabilities ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n ...
{ "body": "@Test\n public void testSelectTracksWithinCapabilitiesSelectHigherBitrate() throws Exception {\n Format lowerBitrateFormat =\n Format.createAudioSampleFormat(\n \"audioFormat\",\n MimeTypes.AUDIO_AAC,\n null,\n 15000,\n Format.NO_VALUE,\n ...
{ "fields": [ { "declarator": "FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f", "modifier": "private static final", "original_string": "private static final float FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f;", "type": "float", "var_name": "FRACTION_TO_CONSIDER_FULLSCREEN" }, { "de...
{ "body": "@Override\n protected final Pair<@NullableType RendererConfiguration[], @NullableType TrackSelection[]>\n selectTracks(\n MappedTrackInfo mappedTrackInfo,\n int[][][] rendererFormatSupports,\n int[] rendererMixedMimeTypeAdaptationSupports)\n throws ExoPlaybackExcep...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_185
{ "fields": [ { "declarator": "SINGLE_CUE_SAMPLE = {\n 0x00, 0x00, 0x00, 0x1C, // Size\n 0x76, 0x74, 0x74, 0x63, // \"vttc\" Box type. VTT Cue box begins:\n\n 0x00, 0x00, 0x00, 0x14, // Contained payload box's size\n 0x70, 0x61, 0x79, 0x6c, // Contained payload box's type (payl), Cue...
{ "body": "@Test\n public void testSampleWithIncompleteHeader() {\n Mp4WebvttDecoder decoder = new Mp4WebvttDecoder();\n try {\n decoder.decode(INCOMPLETE_HEADER_SAMPLE, INCOMPLETE_HEADER_SAMPLE.length, false);\n } catch (SubtitleDecoderException e) {\n return;\n }\n fail();\n }", "class_...
{ "fields": [ { "declarator": "BOX_HEADER_SIZE = 8", "modifier": "private static final", "original_string": "private static final int BOX_HEADER_SIZE = 8;", "type": "int", "var_name": "BOX_HEADER_SIZE" }, { "declarator": "TYPE_payl = Util.getIntegerCodeForString(\"payl\...
{ "body": "@Override\n protected Mp4WebvttSubtitle decode(byte[] bytes, int length, boolean reset)\n throws SubtitleDecoderException {\n // Webvtt in Mp4 samples have boxes inside of them, so we have to do a traditional box parsing:\n // first 4 bytes size and then 4 bytes type.\n sampleData.reset(byte...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_408
{ "fields": [ { "declarator": "NOW_MS = 1234", "modifier": "private static final", "original_string": "private static final long NOW_MS = 1234;", "type": "long", "var_name": "NOW_MS" }, { "declarator": "tempFile", "modifier": "private", "original_string": "p...
{ "body": "@Test\n public void mergeRequest_nonExistingDownload_createsNewDownload() throws IOException {\n byte[] data = new byte[] {1, 2, 3, 4};\n DownloadRequest request =\n new DownloadRequest(\n \"id\",\n TYPE_PROGRESSIVE,\n Uri.parse(\"https://www.test.com/download...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/offline/ActionFileUpgradeUtil.java", "identifier": "ActionFileUpgradeUtil", "interfaces": "", "methods": [ { "class_method_signature": "ActionFileUpgradeUtil.ActionFileUpgradeUtil()", "constructor": true, ...
{ "body": "static void mergeRequest(\n DownloadRequest request,\n DefaultDownloadIndex downloadIndex,\n boolean addNewDownloadAsCompleted,\n long nowMs)\n throws IOException {\n Download download = downloadIndex.getDownload(request.id);\n if (download != null) {\n download = Downlo...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_234
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/metadata/icy/IcyDecoderTest.java", "identifier": "IcyDecoderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void decode_titleOnly() {\n IcyDecoder decoder = new IcyDecoder();\n Metadata metadata = decoder.decode(\"StreamTitle='test title';\");\n\n assertThat(metadata.length()).isEqualTo(1);\n IcyInfo streamInfo = (IcyInfo) metadata.get(0);\n assertThat(streamInfo.title).isEqualTo(\...
{ "fields": [ { "declarator": "TAG = \"IcyDecoder\"", "modifier": "private static final", "original_string": "private static final String TAG = \"IcyDecoder\";", "type": "String", "var_name": "TAG" }, { "declarator": "METADATA_ELEMENT = Pattern.compile(\"(.+?)='(.+?)';\...
{ "body": "@Override\n @Nullable\n @SuppressWarnings(\"ByteBufferBackingArray\")\n public Metadata decode(MetadataInputBuffer inputBuffer) {\n ByteBuffer buffer = inputBuffer.data;\n byte[] data = buffer.array();\n int length = buffer.limit();\n return decode(Util.fromUtf8Bytes(data, 0, length));\n }"...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_99
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUnescapeInvalidFileName() {\n assertThat(Util.unescapeFileName(\"%a\")).isNull();\n assertThat(Util.unescapeFileName(\"%xyz\")).isNull();\n }", "class_method_signature": "UtilTest.testUnescapeInvalidFileName()", "constructor": false, "full_signature": "@Test public voi...
{ "fields": [ { "declarator": "SDK_INT = Build.VERSION.SDK_INT", "modifier": "public static final", "original_string": "public static final int SDK_INT = Build.VERSION.SDK_INT;", "type": "int", "var_name": "SDK_INT" }, { "declarator": "DEVICE = Build.DEVICE", "mod...
{ "body": "public static @Nullable String unescapeFileName(String fileName) {\n int length = fileName.length();\n int percentCharacterCount = 0;\n for (int i = 0; i < length; i++) {\n if (fileName.charAt(i) == '%') {\n percentCharacterCount++;\n }\n }\n if (percentCharacterCount == 0) ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_371
{ "fields": [ { "declarator": "ALLOCATION_SIZE = 16", "modifier": "private static final", "original_string": "private static final int ALLOCATION_SIZE = 16;", "type": "int", "var_name": "ALLOCATION_SIZE" }, { "declarator": "FORMAT_1 = Format.createSampleFormat(\"1\", \"...
{ "body": "@Test\n public void testResetReleasesAllocations() {\n writeTestData();\n assertAllocationCount(10);\n sampleQueue.reset();\n assertAllocationCount(0);\n }", "class_method_signature": "SampleQueueTest.testResetReleasesAllocations()", "constructor": false, "full_signature": "@Test public...
{ "fields": [ { "declarator": "ADVANCE_FAILED = -1", "modifier": "public static final", "original_string": "public static final int ADVANCE_FAILED = -1;", "type": "int", "var_name": "ADVANCE_FAILED" }, { "declarator": "INITIAL_SCRATCH_SIZE = 32", "modifier": "priv...
{ "body": "public void reset() {\n reset(false);\n }", "class_method_signature": "SampleQueue.reset()", "constructor": false, "full_signature": "public void reset()", "identifier": "reset", "invocations": [ "reset" ], "modifiers": "public", "parameters": "()", "return": "void", "signature"...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_263
{ "fields": [ { "declarator": "mockCache", "modifier": "@Mock(answer = Answers.CALLS_REAL_METHODS) private", "original_string": "@Mock(answer = Answers.CALLS_REAL_METHODS) private AbstractFakeCache mockCache;", "type": "AbstractFakeCache", "var_name": "mockCache" }, { "...
{ "body": "@Test\n public void testGetCachedFromNonZeroPosition() {\n mockCache.contentLength = 1000;\n mockCache.spansAndGaps = new int[] {100, 100, 200};\n Pair<Long, Long> contentLengthAndBytesCached =\n CacheUtil.getCached(\n new DataSpec(\n Uri.parse(\"test\"),\n ...
{ "fields": [ { "declarator": "DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024;", "type": "int", "var_name": "DEFAULT_BUFFER_SIZE_BYTES" }, { "declarator": "DE...
{ "body": "public static Pair<Long, Long> getCached(\n DataSpec dataSpec, Cache cache, @Nullable CacheKeyFactory cacheKeyFactory) {\n String key = buildCacheKey(dataSpec, cacheKeyFactory);\n long position = dataSpec.absoluteStreamPosition;\n long requestLength;\n if (dataSpec.length != C.LENGTH_UNSET...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_326
{ "fields": [ { "declarator": "NO_COMMAND_RECEIVED = ~PLAYER_COMMAND_WAIT_FOR_CALLBACK", "modifier": "private static final", "original_string": "private static final int NO_COMMAND_RECEIVED = ~PLAYER_COMMAND_WAIT_FOR_CALLBACK;", "type": "int", "var_name": "NO_COMMAND_RECEIVED" },...
{ "body": "@Test\n public void setAudioAttributes_withUsageMedia_usesAudioFocusGain() {\n // Ensure setting media type audio attributes requests AUDIOFOCUS_GAIN.\n AudioAttributes media = new AudioAttributes.Builder().setUsage(C.USAGE_MEDIA).build();\n Shadows.shadowOf(audioManager)\n .setNextFocusRe...
{ "fields": [ { "declarator": "PLAYER_COMMAND_DO_NOT_PLAY = -1", "modifier": "public static final", "original_string": "public static final int PLAYER_COMMAND_DO_NOT_PLAY = -1;", "type": "int", "var_name": "PLAYER_COMMAND_DO_NOT_PLAY" }, { "declarator": "PLAYER_COMMAND_...
{ "body": "@PlayerCommand\n public int setAudioAttributes(\n @Nullable AudioAttributes audioAttributes, boolean playWhenReady, int playerState) {\n if (!Util.areEqual(this.audioAttributes, audioAttributes)) {\n this.audioAttributes = audioAttributes;\n focusGain = convertAudioAttributesToFocusGain(...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_449
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getAverageBitrate_multipleSameDurationChunks_returnsAverageChunkBitrate() {\n long[] chunkTimeBoundariesSec = {0, 5, 10};\n long[] chunkLengths = {10, 20};\n\n FakeMediaChunkIterator iterator =\n new FakeMediaChunkIterator(chunkTimeBoundariesSec, chunkLengths);\n\n a...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "public static int getAverageBitrate(MediaChunkIterator iterator, long maxDurationUs) {\n long totalDurationUs = 0;\n long totalLength = 0;\n while (iterator.next()) {\n long chunkLength = iterator.getDataSpec().length;\n if (chunkLength == C.LENGTH_UNSET) {\n break;\n }\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_275
{ "fields": [ { "declarator": "TEST_DATA = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}", "modifier": "private static final", "original_string": "private static final byte[] TEST_DATA = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};", "type": "byte[]", "var_name": "TEST_DATA" }, { ...
{ "body": "@Test\n public void testContentLengthEdgeCases() throws Exception {\n DataSpec dataSpec = buildDataSpec(TEST_DATA.length - 2, 2);\n\n // Read partial at EOS but don't cross it so length is unknown.\n CacheDataSource cacheDataSource = createCacheDataSource(false, true);\n assertReadData(cacheDa...
{ "fields": [ { "declarator": "FLAG_BLOCK_ON_CACHE = 1", "modifier": "public static final", "original_string": "public static final int FLAG_BLOCK_ON_CACHE = 1;", "type": "int", "var_name": "FLAG_BLOCK_ON_CACHE" }, { "declarator": "FLAG_IGNORE_CACHE_ON_ERROR = 1 << 1", ...
{ "body": "@Override\n public long open(DataSpec dataSpec) throws IOException {\n try {\n key = cacheKeyFactory.buildCacheKey(dataSpec);\n uri = dataSpec.uri;\n actualUri = getRedirectedUriOrDefault(cache, key, /* defaultUri= */ uri);\n httpMethod = dataSpec.httpMethod;\n flags = dataSpec...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_37
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/extractor/DefaultExtractorsFactoryTest.java", "identifier": "DefaultExtractorsFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateExtractors_returnExpectedClasses() {\n DefaultExtractorsFactory defaultExtractorsFactory = new DefaultExtractorsFactory();\n\n Extractor[] extractors = defaultExtractorsFactory.createExtractors();\n List<Class> listCreatedExtractorClasses = new ArrayList<>();\n fo...
{ "fields": [ { "declarator": "FLAC_EXTRACTOR_CONSTRUCTOR", "modifier": "private static final", "original_string": "private static final Constructor<? extends Extractor> FLAC_EXTRACTOR_CONSTRUCTOR;", "type": "Constructor<? extends Extractor>", "var_name": "FLAC_EXTRACTOR_CONSTRUCTOR"...
{ "body": "@Override\n public synchronized Extractor[] createExtractors() {\n Extractor[] extractors = new Extractor[FLAC_EXTRACTOR_CONSTRUCTOR == null ? 13 : 14];\n extractors[0] = new MatroskaExtractor(matroskaFlags);\n extractors[1] = new FragmentedMp4Extractor(fragmentedMp4Flags);\n extractors[2] = n...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_330
{ "fields": [ { "declarator": "TRUEHD_SYNCFRAME_SAMPLE_COUNT = 40", "modifier": "private static final", "original_string": "private static final int TRUEHD_SYNCFRAME_SAMPLE_COUNT = 40;", "type": "int", "var_name": "TRUEHD_SYNCFRAME_SAMPLE_COUNT" }, { "declarator": "TRUE...
{ "body": "@Test\n public void testParseTrueHdSyncframeAudioSampleCount_syncframe() {\n assertThat(Ac3Util.parseTrueHdSyncframeAudioSampleCount(TRUEHD_SYNCFRAME_HEADER))\n .isEqualTo(TRUEHD_SYNCFRAME_SAMPLE_COUNT);\n }", "class_method_signature": "Ac3UtilTest.testParseTrueHdSyncframeAudioSampleCount_syn...
{ "fields": [ { "declarator": "TRUEHD_RECHUNK_SAMPLE_COUNT = 16", "modifier": "public static final", "original_string": "public static final int TRUEHD_RECHUNK_SAMPLE_COUNT = 16;", "type": "int", "var_name": "TRUEHD_RECHUNK_SAMPLE_COUNT" }, { "declarator": "TRUEHD_SYNCF...
{ "body": "public static int parseTrueHdSyncframeAudioSampleCount(byte[] syncframe) {\n // TODO: Link to specification if available.\n // The syncword ends 0xBA for TrueHD or 0xBB for MLP.\n if (syncframe[4] != (byte) 0xF8\n || syncframe[5] != (byte) 0x72\n || syncframe[6] != (byte) 0x6F\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_388
{ "fields": [ { "declarator": "TEST_AD_GROUP_TMES_US = new long[] {0, C.msToUs(10_000)}", "modifier": "private static final", "original_string": "private static final long[] TEST_AD_GROUP_TMES_US = new long[] {0, C.msToUs(10_000)};", "type": "long[]", "var_name": "TEST_AD_GROUP_TMES_...
{ "body": "@Test\n public void testSkipAllWithoutAdCount() {\n state = state.withSkippedAdGroup(0);\n state = state.withSkippedAdGroup(1);\n assertThat(state.adGroups[0].count).isEqualTo(0);\n assertThat(state.adGroups[1].count).isEqualTo(0);\n }", "class_method_signature": "AdPlaybackStateTest.testSk...
{ "fields": [ { "declarator": "AD_STATE_UNAVAILABLE = 0", "modifier": "public static final", "original_string": "public static final int AD_STATE_UNAVAILABLE = 0;", "type": "int", "var_name": "AD_STATE_UNAVAILABLE" }, { "declarator": "AD_STATE_AVAILABLE = 1", "mod...
{ "body": "@CheckResult\n public AdPlaybackState withSkippedAdGroup(int adGroupIndex) {\n AdGroup[] adGroups = Arrays.copyOf(this.adGroups, this.adGroups.length);\n adGroups[adGroupIndex] = adGroups[adGroupIndex].withAllAdsSkipped();\n return new AdPlaybackState(adGroupTimesUs, adGroups, adResumePositionUs,...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_222
{ "fields": [ { "declarator": "TEST_POSITION_US = 123456789012345678L", "modifier": "private static final", "original_string": "private static final long TEST_POSITION_US = 123456789012345678L;", "type": "long", "var_name": "TEST_POSITION_US" }, { "declarator": "SLEEP_T...
{ "body": "@Test\n public void standaloneGetPlaybackParameters_initializedWithDefaultPlaybackParameters() {\n assertThat(mediaClock.getPlaybackParameters()).isEqualTo(PlaybackParameters.DEFAULT);\n }", "class_method_signature": "DefaultMediaClockTest.standaloneGetPlaybackParameters_initializedWithDefaultPlayba...
{ "fields": [ { "declarator": "standaloneMediaClock", "modifier": "private final", "original_string": "private final StandaloneMediaClock standaloneMediaClock;", "type": "StandaloneMediaClock", "var_name": "standaloneMediaClock" }, { "declarator": "listener", "mod...
{ "body": "@Override\n public PlaybackParameters getPlaybackParameters() {\n return rendererClock != null ? rendererClock.getPlaybackParameters()\n : standaloneMediaClock.getPlaybackParameters();\n }", "class_method_signature": "DefaultMediaClock.getPlaybackParameters()", "constructor": false, "full...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_367
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/source/CompositeSequenceableLoaderTest.java", "identifier": "CompositeSequenceableLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testContinueLoadingReturnTrueIfLoaderBehindPlaybackPositionCanMakeProgress() {\n FakeSequenceableLoader loader1 =\n new FakeSequenceableLoader(/* bufferedPositionUs */ 1000, /* nextLoadPositionUs */ 2000);\n FakeSequenceableLoader loader2 =\n new FakeSequenceableLoa...
{ "fields": [ { "declarator": "loaders", "modifier": "protected final", "original_string": "protected final SequenceableLoader[] loaders;", "type": "SequenceableLoader[]", "var_name": "loaders" } ], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/source/...
{ "body": "@Override\n public boolean continueLoading(long positionUs) {\n boolean madeProgress = false;\n boolean madeProgressThisIteration;\n do {\n madeProgressThisIteration = false;\n long nextLoadPositionUs = getNextLoadPositionUs();\n if (nextLoadPositionUs == C.TIME_END_OF_SOURCE) {\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_60
{ "fields": [ { "declarator": "packetPayload", "modifier": "private", "original_string": "private byte[] packetPayload;", "type": "byte[]", "var_name": "packetPayload" }, { "declarator": "payloadReader", "modifier": "private", "original_string": "private Cus...
{ "body": "@Test\n public void testCrcChecks() {\n byte[] correctCrcPat = new byte[] {\n (byte) 0x0, (byte) 0x0, (byte) 0xb0, (byte) 0xd, (byte) 0x0, (byte) 0x1, (byte) 0xc1,\n (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x1, (byte) 0xe1, (byte) 0x0, (byte) 0xe8,\n (byte) 0xf9, (byte) 0x5e, (b...
{ "fields": [ { "declarator": "SECTION_HEADER_LENGTH = 3", "modifier": "private static final", "original_string": "private static final int SECTION_HEADER_LENGTH = 3;", "type": "int", "var_name": "SECTION_HEADER_LENGTH" }, { "declarator": "DEFAULT_SECTION_BUFFER_LENGTH ...
{ "body": "@Override\n public void consume(ParsableByteArray data, @Flags int flags) {\n boolean payloadUnitStartIndicator = (flags & FLAG_PAYLOAD_UNIT_START_INDICATOR) != 0;\n int payloadStartPosition = C.POSITION_UNSET;\n if (payloadUnitStartIndicator) {\n int payloadStartOffset = data.readUnsignedBy...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_170
{ "fields": [ { "declarator": "EMPTY_FILE = \"subrip/empty\"", "modifier": "private static final", "original_string": "private static final String EMPTY_FILE = \"subrip/empty\";", "type": "String", "var_name": "EMPTY_FILE" }, { "declarator": "TYPICAL_FILE = \"subrip/typ...
{ "body": "@Test\n public void testDecodeTypicalMissingSequence() throws IOException {\n // Parsing should succeed, parsing the first and third cues only.\n SubripDecoder decoder = new SubripDecoder();\n byte[] bytes =\n TestUtil.getByteArray(\n ApplicationProvider.getApplicationContext(),...
{ "fields": [ { "declarator": "START_FRACTION = 0.08f", "modifier": "static final", "original_string": "static final float START_FRACTION = 0.08f;", "type": "float", "var_name": "START_FRACTION" }, { "declarator": "END_FRACTION = 1 - START_FRACTION", "modifier": "...
{ "body": "@Override\n protected SubripSubtitle decode(byte[] bytes, int length, boolean reset) {\n ArrayList<Cue> cues = new ArrayList<>();\n LongArray cueTimesUs = new LongArray();\n ParsableByteArray subripData = new ParsableByteArray(bytes, length);\n String currentLine;\n\n while ((currentLine = ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_465
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getBitratesUsingPastInfo_oneChunkNoLength_returnsNoValue() {\n Format format = createFormatWithBitrate(10);\n FakeMediaChunk chunk =\n createChunk(\n format, /* length= */ C.LENGTH_UNSET, /* startTimeSec= */ 0, /* endTimeSec= */ 10);\n\n int[] bitrates =\n ...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingPastInfo(\n List<? extends MediaChunk> queue,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n if (bitrates == null) {\n bitrates = new int[formats.length];\n Arrays.fill(bitrates, For...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_259
{ "fields": [ { "declarator": "mockCache", "modifier": "@Mock(answer = Answers.CALLS_REAL_METHODS) private", "original_string": "@Mock(answer = Answers.CALLS_REAL_METHODS) private AbstractFakeCache mockCache;", "type": "AbstractFakeCache", "var_name": "mockCache" }, { "...
{ "body": "@Test\n public void testGetCachedNoData() {\n Pair<Long, Long> contentLengthAndBytesCached =\n CacheUtil.getCached(\n new DataSpec(Uri.parse(\"test\")), mockCache, /* cacheKeyFactory= */ null);\n\n assertThat(contentLengthAndBytesCached.first).isEqualTo(C.LENGTH_UNSET);\n assert...
{ "fields": [ { "declarator": "DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024;", "type": "int", "var_name": "DEFAULT_BUFFER_SIZE_BYTES" }, { "declarator": "DE...
{ "body": "public static Pair<Long, Long> getCached(\n DataSpec dataSpec, Cache cache, @Nullable CacheKeyFactory cacheKeyFactory) {\n String key = buildCacheKey(dataSpec, cacheKeyFactory);\n long position = dataSpec.absoluteStreamPosition;\n long requestLength;\n if (dataSpec.length != C.LENGTH_UNSET...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_432
{ "fields": [ { "declarator": "CONTENT_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "private static final", "original_string": "private static final long CONTENT_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "CONTENT_DURATION_US" }, { "de...
{ "body": "@Test\n public void\n updateQueuedPeriods_withDurationChangeInReadingPeriodBeforeReadingPosition_doesntHandleChangeAndRemovesPeriodsAfterChangedPeriod() {\n setupTimeline(\n /* initialPositionUs= */ 0,\n /* adGroupTimesUs= */ FIRST_AD_START_TIME_US,\n SECOND_AD_START_TIME_US);...
{ "fields": [ { "declarator": "MAXIMUM_BUFFER_AHEAD_PERIODS = 100", "modifier": "private static final", "original_string": "private static final int MAXIMUM_BUFFER_AHEAD_PERIODS = 100;", "type": "int", "var_name": "MAXIMUM_BUFFER_AHEAD_PERIODS" }, { "declarator": "perio...
{ "body": "public boolean updateQueuedPeriods(long rendererPositionUs, long maxRendererReadPositionUs) {\n // TODO: Merge this into setTimeline so that the queue gets updated as soon as the new timeline\n // is set, once all cases handled by ExoPlayerImplInternal.handleSourceInfoRefreshed can be\n // handled...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_218
{ "fields": [ { "declarator": "EVENT_PLAYER_STATE_CHANGED = 0", "modifier": "private static final", "original_string": "private static final int EVENT_PLAYER_STATE_CHANGED = 0;", "type": "int", "var_name": "EVENT_PLAYER_STATE_CHANGED" }, { "declarator": "EVENT_TIMELINE_...
{ "body": "@Test\n public void testNotifyExternalEvents() throws Exception {\n MediaSource mediaSource = new FakeMediaSource(SINGLE_PERIOD_TIMELINE, /* manifest= */ null);\n ActionSchedule actionSchedule =\n new ActionSchedule.Builder(\"AnalyticsCollectorTest\")\n .pause()\n .waitF...
{ "fields": [ { "declarator": "listeners", "modifier": "private final", "original_string": "private final CopyOnWriteArraySet<AnalyticsListener> listeners;", "type": "CopyOnWriteArraySet<AnalyticsListener>", "var_name": "listeners" }, { "declarator": "clock", "mod...
{ "body": "public final void notifySeekStarted() {\n if (!mediaPeriodQueueTracker.isSeeking()) {\n EventTime eventTime = generatePlayingMediaPeriodEventTime();\n mediaPeriodQueueTracker.onSeekStarted();\n for (AnalyticsListener listener : listeners) {\n listener.onSeekStarted(eventTime);\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_166
{ "fields": [ { "declarator": "EMPTY_FILE = \"subrip/empty\"", "modifier": "private static final", "original_string": "private static final String EMPTY_FILE = \"subrip/empty\";", "type": "String", "var_name": "EMPTY_FILE" }, { "declarator": "TYPICAL_FILE = \"subrip/typ...
{ "body": "@Test\n public void testDecodeTypical() throws IOException {\n SubripDecoder decoder = new SubripDecoder();\n byte[] bytes = TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), TYPICAL_FILE);\n SubripSubtitle subtitle = decoder.decode(bytes, bytes.length, false);\n\n assertThat(...
{ "fields": [ { "declarator": "START_FRACTION = 0.08f", "modifier": "static final", "original_string": "static final float START_FRACTION = 0.08f;", "type": "float", "var_name": "START_FRACTION" }, { "declarator": "END_FRACTION = 1 - START_FRACTION", "modifier": "...
{ "body": "@Override\n protected SubripSubtitle decode(byte[] bytes, int length, boolean reset) {\n ArrayList<Cue> cues = new ArrayList<>();\n LongArray cueTimesUs = new LongArray();\n ParsableByteArray subripData = new ParsableByteArray(bytes, length);\n String currentLine;\n\n while ((currentLine = ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_189
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java", "identifier": "WebvttCueParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseWellFormedUnclosedEndAtParent() throws Exception {\n Spanned text = parseCueText(\"An unclosed u tag with <i><u>underline and italic</i> inside\");\n\n assertThat(text.toString()).isEqualTo(\"An unclosed u tag with underline and italic inside\");\n\n UnderlineSpan[] u...
{ "fields": [ { "declarator": "CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\")", "modifier": "public static final", "original_string": "public static final Pattern CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\");",...
{ "body": "static void parseCueText(String id, String markup, WebvttCue.Builder builder,\n List<WebvttCssStyle> styles) {\n SpannableStringBuilder spannedText = new SpannableStringBuilder();\n ArrayDeque<StartTag> startTagStack = new ArrayDeque<>();\n List<StyleMatch> scratchStyleMatches = new ArrayList...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_473
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void\n getBitratesUsingPastInfo_multipleChunkExceedingMaxDuration_returnsAverageUntilMaxDuration() {\n Format format = createFormatWithBitrate(10);\n FakeMediaChunk chunk =\n createChunk(format, /* length= */ 10, /* startTimeSec= */ 0, /* endTimeSec= */ 20);\n FakeMedia...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingPastInfo(\n List<? extends MediaChunk> queue,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n if (bitrates == null) {\n bitrates = new int[formats.length];\n Arrays.fill(bitrates, For...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_497
{ "fields": [ { "declarator": "ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_AUDIO)", "modifier": "private static final", "original_string": "private static final RendererCapabilities ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n ...
{ "body": "@Test\n public void testSelectTracksExceedingCapabilitiesPreferLowerSampleRateBeforeBitrate()\n throws Exception {\n Format higherSampleRateLowerBitrateFormat =\n Format.createAudioSampleFormat(\"audioFormat\", MimeTypes.AUDIO_AAC, null, 15000,\n Format.NO_VALUE, 2, 44100, null, ...
{ "fields": [ { "declarator": "FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f", "modifier": "private static final", "original_string": "private static final float FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f;", "type": "float", "var_name": "FRACTION_TO_CONSIDER_FULLSCREEN" }, { "de...
{ "body": "@Override\n protected final Pair<@NullableType RendererConfiguration[], @NullableType TrackSelection[]>\n selectTracks(\n MappedTrackInfo mappedTrackInfo,\n int[][][] rendererFormatSupports,\n int[] rendererMixedMimeTypeAdaptationSupports)\n throws ExoPlaybackExcep...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_182
{ "fields": [ { "declarator": "SINGLE_CUE_SAMPLE = {\n 0x00, 0x00, 0x00, 0x1C, // Size\n 0x76, 0x74, 0x74, 0x63, // \"vttc\" Box type. VTT Cue box begins:\n\n 0x00, 0x00, 0x00, 0x14, // Contained payload box's size\n 0x70, 0x61, 0x79, 0x6c, // Contained payload box's type (payl), Cue...
{ "body": "@Test\n public void testSingleCueSample() throws SubtitleDecoderException {\n Mp4WebvttDecoder decoder = new Mp4WebvttDecoder();\n Subtitle result = decoder.decode(SINGLE_CUE_SAMPLE, SINGLE_CUE_SAMPLE.length, false);\n Cue expectedCue = new Cue(\"Hello World\"); // Line feed must be trimmed by th...
{ "fields": [ { "declarator": "BOX_HEADER_SIZE = 8", "modifier": "private static final", "original_string": "private static final int BOX_HEADER_SIZE = 8;", "type": "int", "var_name": "BOX_HEADER_SIZE" }, { "declarator": "TYPE_payl = Util.getIntegerCodeForString(\"payl\...
{ "body": "@Override\n protected Mp4WebvttSubtitle decode(byte[] bytes, int length, boolean reset)\n throws SubtitleDecoderException {\n // Webvtt in Mp4 samples have boxes inside of them, so we have to do a traditional box parsing:\n // first 4 bytes size and then 4 bytes type.\n sampleData.reset(byte...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_478
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getBitratesUsingPastAndFutureInfo_noPastAndFutureInfo_returnsBitratesOfFormats() {\n int[] bitrates =\n TrackSelectionUtil.getBitratesUsingPastAndFutureInfo(\n new Format[] {createFormatWithBitrate(10), createFormatWithBitrate(20)},\n Collections.emptyLi...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "public static int[] getBitratesUsingPastAndFutureInfo(\n Format[] formats,\n List<? extends MediaChunk> queue,\n long maxPastDurationUs,\n MediaChunkIterator[] iterators,\n long maxFutureDurationUs,\n boolean useFormatBitrateAsLowerBound,\n @Nullable int[] bitrates) {\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_301
{ "fields": [ { "declarator": "SIMULATED_TRANSFER_COUNT = 100", "modifier": "private static final", "original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;", "type": "int", "var_name": "SIMULATED_TRANSFER_COUNT" }, { "declarator": "FAST_COUNTRY_ISO ...
{ "body": "@Test\n public void\n defaultInitialBitrateEstimate_forEthernet_forFastCountry_isGreaterThanEstimateForSlowCountry() {\n setActiveNetworkInfo(networkInfoEthernet);\n setNetworkCountryIso(FAST_COUNTRY_ISO);\n DefaultBandwidthMeter bandwidthMeterFast =\n new DefaultBandwidthMeter.Builde...
{ "fields": [ { "declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()", "modifier": "public static final", "original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG...
{ "body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }", "class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()", "constructor": false, "full_signature": "@Override public synchronized long getBitrateEstimate()", "identifier": "getBitrateEstima...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_356
{ "fields": [ { "declarator": "mediaSource", "modifier": "private", "original_string": "private ConcatenatingMediaSource mediaSource;", "type": "ConcatenatingMediaSource", "var_name": "mediaSource" }, { "declarator": "testRunner", "modifier": "private", "ori...
{ "body": "@Test\n public void testCustomCallbackBeforePreparationSetShuffleOrder() throws Exception {\n ConditionVariable runnableInvoked = new ConditionVariable();\n\n DummyMainThread dummyMainThread = new DummyMainThread();\n dummyMainThread.runOnMainThread(\n () ->\n mediaSource.setShu...
{ "fields": [ { "declarator": "MSG_ADD = 0", "modifier": "private static final", "original_string": "private static final int MSG_ADD = 0;", "type": "int", "var_name": "MSG_ADD" }, { "declarator": "MSG_REMOVE = 1", "modifier": "private static final", "origin...
{ "body": "public final synchronized void setShuffleOrder(ShuffleOrder shuffleOrder) {\n setPublicShuffleOrder(shuffleOrder, /* handler= */ null, /* onCompletionAction= */ null);\n }", "class_method_signature": "ConcatenatingMediaSource.setShuffleOrder(ShuffleOrder shuffleOrder)", "constructor": false, "ful...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_213
{ "fields": [ { "declarator": "NO_SUBTITLE = \"tx3g/no_subtitle\"", "modifier": "private static final", "original_string": "private static final String NO_SUBTITLE = \"tx3g/no_subtitle\";", "type": "String", "var_name": "NO_SUBTITLE" }, { "declarator": "SAMPLE_JUST_TEXT...
{ "body": "@Test\n public void testDecodeWithMultipleStyl() throws IOException, SubtitleDecoderException {\n Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList());\n byte[] bytes =\n TestUtil.getByteArray(\n ApplicationProvider.getApplicationContext(), SAMPLE_WITH_MULTIPLE_STYL);\n ...
{ "fields": [ { "declarator": "BOM_UTF16_BE = '\\uFEFF'", "modifier": "private static final", "original_string": "private static final char BOM_UTF16_BE = '\\uFEFF';", "type": "char", "var_name": "BOM_UTF16_BE" }, { "declarator": "BOM_UTF16_LE = '\\uFFFE'", "modif...
{ "body": "@Override\n protected Subtitle decode(byte[] bytes, int length, boolean reset)\n throws SubtitleDecoderException {\n parsableByteArray.reset(bytes, length);\n String cueTextString = readSubtitleText(parsableByteArray);\n if (cueTextString.isEmpty()) {\n return Tx3gSubtitle.EMPTY;\n }...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_340
{ "fields": [ { "declarator": "mediaSource", "modifier": "private", "original_string": "private ConcatenatingMediaSource mediaSource;", "type": "ConcatenatingMediaSource", "var_name": "mediaSource" }, { "declarator": "testRunner", "modifier": "private", "ori...
{ "body": "@Test\n public void testDynamicChangeOfEmptyTimelines() throws IOException {\n FakeMediaSource[] childSources =\n new FakeMediaSource[] {\n new FakeMediaSource(Timeline.EMPTY, /* manifest= */ null),\n new FakeMediaSource(Timeline.EMPTY, /* manifest= */ null),\n new Fak...
{ "fields": [ { "declarator": "MSG_ADD = 0", "modifier": "private static final", "original_string": "private static final int MSG_ADD = 0;", "type": "int", "var_name": "MSG_ADD" }, { "declarator": "MSG_REMOVE = 1", "modifier": "private static final", "origin...
{ "body": "public final synchronized void addMediaSources(Collection<MediaSource> mediaSources) {\n addPublicMediaSources(\n mediaSourcesPublic.size(),\n mediaSources,\n /* handler= */ null,\n /* onCompletionAction= */ null);\n }", "class_method_signature": "ConcatenatingMediaSource....
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_205
{ "fields": [ { "declarator": "FIRST_SUBTITLE_STRING = \"This is the first subtitle.\"", "modifier": "private static final", "original_string": "private static final String FIRST_SUBTITLE_STRING = \"This is the first subtitle.\";", "type": "String", "var_name": "FIRST_SUBTITLE_STRING...
{ "body": "@Test\n public void testOverlappingSubtitleText() {\n // Test before first subtitle\n assertSingleCueEmpty(overlappingSubtitle.getCues(0));\n assertSingleCueEmpty(overlappingSubtitle.getCues(500000));\n assertSingleCueEmpty(overlappingSubtitle.getCues(999999));\n\n // Test first subtitle\n ...
{ "fields": [ { "declarator": "cues", "modifier": "private final", "original_string": "private final List<WebvttCue> cues;", "type": "List<WebvttCue>", "var_name": "cues" }, { "declarator": "numCues", "modifier": "private final", "original_string": "private ...
{ "body": "@Override\n public List<Cue> getCues(long timeUs) {\n ArrayList<Cue> list = null;\n WebvttCue firstNormalCue = null;\n SpannableStringBuilder normalCueTextBuilder = null;\n\n for (int i = 0; i < numCues; i++) {\n if ((cueTimesUs[i * 2] <= timeUs) && (timeUs < cueTimesUs[i * 2 + 1])) {\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_481
{ "fields": [ { "declarator": "ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_AUDIO)", "modifier": "private static final", "original_string": "private static final RendererCapabilities ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n ...
{ "body": "@Test\n public void testSetParameterWithDefaultParametersDoesNotNotifyInvalidationListener()\n throws Exception {\n trackSelector.setParameters(Parameters.DEFAULT);\n verify(invalidationListener, never()).onTrackSelectionsInvalidated();\n }", "class_method_signature": "DefaultTrackSelectorTe...
{ "fields": [ { "declarator": "FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f", "modifier": "private static final", "original_string": "private static final float FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f;", "type": "float", "var_name": "FRACTION_TO_CONSIDER_FULLSCREEN" }, { "de...
{ "body": "public void setParameters(Parameters parameters) {\n Assertions.checkNotNull(parameters);\n if (!parametersReference.getAndSet(parameters).equals(parameters)) {\n invalidate();\n }\n }", "class_method_signature": "DefaultTrackSelector.setParameters(Parameters parameters)", "constructor":...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_194
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java", "identifier": "WebvttCueParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseEntitiesUnsupported() throws Exception {\n Spanned text = parseCueText(\"&noway; &sure;\");\n assertThat(text.toString()).isEqualTo(\" \");\n }", "class_method_signature": "WebvttCueParserTest.testParseEntitiesUnsupported()", "constructor": false, "full_signature"...
{ "fields": [ { "declarator": "CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\")", "modifier": "public static final", "original_string": "public static final Pattern CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\");",...
{ "body": "static void parseCueText(String id, String markup, WebvttCue.Builder builder,\n List<WebvttCssStyle> styles) {\n SpannableStringBuilder spannedText = new SpannableStringBuilder();\n ArrayDeque<StartTag> startTagStack = new ArrayDeque<>();\n List<StyleMatch> scratchStyleMatches = new ArrayList...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_317
{ "fields": [ { "declarator": "SIMULATED_TRANSFER_COUNT = 100", "modifier": "private static final", "original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;", "type": "int", "var_name": "SIMULATED_TRANSFER_COUNT" }, { "declarator": "FAST_COUNTRY_ISO ...
{ "body": "@Test\n public void initialBitrateEstimateOverwrite_forOffline_whileOffline_setsInitialEstimate() {\n setActiveNetworkInfo(networkInfoOffline);\n DefaultBandwidthMeter bandwidthMeter =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext())\n .setInitialBit...
{ "fields": [ { "declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()", "modifier": "public static final", "original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG...
{ "body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }", "class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()", "constructor": false, "full_signature": "@Override public synchronized long getBitrateEstimate()", "identifier": "getBitrateEstima...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_415
{ "fields": [ { "declarator": "TEST_DOWNLOAD_TYPE = \"downloadType\"", "modifier": "private static final", "original_string": "private static final String TEST_DOWNLOAD_TYPE = \"downloadType\";", "type": "String", "var_name": "TEST_DOWNLOAD_TYPE" }, { "declarator": "TES...
{ "body": "@Test\n public void getManifest_returnsManifest() throws Exception {\n prepareDownloadHelper(downloadHelper);\n\n Object manifest = downloadHelper.getManifest();\n\n assertThat(manifest).isEqualTo(TEST_MANIFEST);\n }", "class_method_signature": "DownloadHelperTest.getManifest_returnsManifest()...
{ "fields": [ { "declarator": "DEFAULT_TRACK_SELECTOR_PARAMETERS =\n new DefaultTrackSelector.ParametersBuilder().setForceHighestSupportedBitrate(true).build()", "modifier": "public static final", "original_string": "public static final DefaultTrackSelector.Parameters DEFAULT_TRACK_SELECTOR...
{ "body": "@Nullable\n public Object getManifest() {\n if (mediaSource == null) {\n return null;\n }\n assertPreparedWithMedia();\n return mediaPreparer.manifest;\n }", "class_method_signature": "DownloadHelper.getManifest()", "constructor": false, "full_signature": "@Nullable public Object g...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_100
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInflate() {\n byte[] testData = TestUtil.buildTestData(/*arbitrary test data size*/ 256 * 1024);\n byte[] compressedData = new byte[testData.length * 2];\n Deflater compresser = new Deflater(9);\n compresser.setInput(testData);\n compresser.finish();\n int compres...
{ "fields": [ { "declarator": "SDK_INT = Build.VERSION.SDK_INT", "modifier": "public static final", "original_string": "public static final int SDK_INT = Build.VERSION.SDK_INT;", "type": "int", "var_name": "SDK_INT" }, { "declarator": "DEVICE = Build.DEVICE", "mod...
{ "body": "public static boolean inflate(\n ParsableByteArray input, ParsableByteArray output, @Nullable Inflater inflater) {\n if (input.bytesLeft() <= 0) {\n return false;\n }\n byte[] outputData = output.data;\n if (outputData.length < input.bytesLeft()) {\n outputData = new byte[2 * inp...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_84
{ "fields": [ { "declarator": "TEST_DATA = new byte[] {0x3C, (byte) 0xD2, (byte) 0x5F, (byte) 0x01,\n (byte) 0xFF, (byte) 0x14, (byte) 0x60, (byte) 0x99}", "modifier": "private static final", "original_string": "private static final byte[] TEST_DATA = new byte[] {0x3C, (byte) 0xD2, (byte) 0...
{ "body": "@Test\n public void testSkipBytes() {\n testArray.skipBytes(2);\n assertReadBitsToEnd(16);\n }", "class_method_signature": "ParsableBitArrayTest.testSkipBytes()", "constructor": false, "full_signature": "@Test public void testSkipBytes()", "identifier": "testSkipBytes", "invocations": [ ...
{ "fields": [ { "declarator": "data", "modifier": "public", "original_string": "public byte[] data;", "type": "byte[]", "var_name": "data" }, { "declarator": "byteOffset", "modifier": "private", "original_string": "private int byteOffset;", "type": "in...
{ "body": "public void skipBytes(int length) {\n Assertions.checkState(bitOffset == 0);\n byteOffset += length;\n assertValidOffset();\n }", "class_method_signature": "ParsableBitArray.skipBytes(int length)", "constructor": false, "full_signature": "public void skipBytes(int length)", "identifier": ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_229
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/metadata/emsg/EventMessageDecoderTest.java", "identifier": "EventMessageDecoderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDecodeEventMessage() {\n byte[] rawEmsgBody = new byte[] {\n 117, 114, 110, 58, 116, 101, 115, 116, 0, // scheme_id_uri = \"urn:test\"\n 49, 50, 51, 0, // value = \"123\"\n 0, 0, -69, -128, // timescale = 48000\n 0, 0, -69, -128, // presentation_time_...
{ "fields": [ { "declarator": "TAG = \"EventMessageDecoder\"", "modifier": "private static final", "original_string": "private static final String TAG = \"EventMessageDecoder\";", "type": "String", "var_name": "TAG" } ], "file": "videoplayer-core/src/main/java/com/google/andr...
{ "body": "@SuppressWarnings(\"ByteBufferBackingArray\")\n @Override\n public Metadata decode(MetadataInputBuffer inputBuffer) {\n ByteBuffer buffer = inputBuffer.data;\n byte[] data = buffer.array();\n int size = buffer.limit();\n ParsableByteArray emsgData = new ParsableByteArray(data, size);\n Str...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_383
{ "fields": [ { "declarator": "ALLOCATION_SIZE = 16", "modifier": "private static final", "original_string": "private static final int ALLOCATION_SIZE = 16;", "type": "int", "var_name": "ALLOCATION_SIZE" }, { "declarator": "FORMAT_1 = Format.createSampleFormat(\"1\", \"...
{ "body": "@Test\n public void testDiscardUpstreamBeforeRead() {\n writeTestData();\n sampleQueue.discardUpstreamSamples(4);\n assertAllocationCount(4);\n assertReadTestData(null, 0, 4);\n assertReadFormat(false, FORMAT_2);\n assertNoSamplesToRead(FORMAT_2);\n }", "class_method_signature": "Samp...
{ "fields": [ { "declarator": "ADVANCE_FAILED = -1", "modifier": "public static final", "original_string": "public static final int ADVANCE_FAILED = -1;", "type": "int", "var_name": "ADVANCE_FAILED" }, { "declarator": "INITIAL_SCRATCH_SIZE = 32", "modifier": "priv...
{ "body": "public void discardUpstreamSamples(int discardFromIndex) {\n totalBytesWritten = metadataQueue.discardUpstreamSamples(discardFromIndex);\n if (totalBytesWritten == 0 || totalBytesWritten == firstAllocationNode.startPosition) {\n clearAllocationNodes(firstAllocationNode);\n firstAllocationNo...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_157
{ "fields": [ { "declarator": "SPEED = 1f", "modifier": "private static final", "original_string": "private static final float SPEED = 1f;", "type": "float", "var_name": "SPEED" }, { "declarator": "MIN_BUFFER_US = C.msToUs(DefaultLoadControl.DEFAULT_MIN_BUFFER_MS)", ...
{ "body": "@Test\n public void testShouldNotContinueLoadingWithMaxBufferReached_inFastPlayback() {\n createDefaultLoadControl();\n\n assertThat(loadControl.shouldContinueLoading(MAX_BUFFER_US, /* playbackSpeed= */ 100f))\n .isFalse();\n }", "class_method_signature": "DefaultLoadControlTest.testShould...
{ "fields": [ { "declarator": "DEFAULT_MIN_BUFFER_MS = 15000", "modifier": "public static final", "original_string": "public static final int DEFAULT_MIN_BUFFER_MS = 15000;", "type": "int", "var_name": "DEFAULT_MIN_BUFFER_MS" }, { "declarator": "DEFAULT_MAX_BUFFER_MS = ...
{ "body": "@Override\n public boolean shouldContinueLoading(long bufferedDurationUs, float playbackSpeed) {\n boolean targetBufferSizeReached = allocator.getTotalBytesAllocated() >= targetBufferSize;\n long minBufferUs = hasVideo ? minBufferVideoUs : minBufferAudioUs;\n if (playbackSpeed > 1) {\n // Th...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_507
{ "fields": [ { "declarator": "MAX_DURATION_MS = 30_000", "modifier": "private static final", "original_string": "private static final long MAX_DURATION_MS = 30_000;", "type": "long", "var_name": "MAX_DURATION_MS" } ], "file": "videoplayer-core/src/test/java/com/google/androi...
{ "body": "@Test\n public void getBitrates_pastMaxDurationSet_returnsEstimateUsingPastChunks() {\n WindowedTrackBitrateEstimator estimator =\n new WindowedTrackBitrateEstimator(\n MAX_DURATION_MS,\n /* maxFutureDurationMs= */ 0,\n /* useFormatBitrateAsLowerBound= */ false);...
{ "fields": [ { "declarator": "maxPastDurationUs", "modifier": "private final", "original_string": "private final long maxPastDurationUs;", "type": "long", "var_name": "maxPastDurationUs" }, { "declarator": "maxFutureDurationUs", "modifier": "private final", ...
{ "body": "@Override\n public int[] getBitrates(\n Format[] formats,\n List<? extends MediaChunk> queue,\n MediaChunkIterator[] iterators,\n @Nullable int[] bitrates) {\n if (maxFutureDurationUs > 0 || maxPastDurationUs > 0) {\n return TrackSelectionUtil.getBitratesUsingPastAndFutureInfo(...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_4
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/extractor/ogg/VorbisUtilTest.java", "identifier": "VorbisUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testVerifyVorbisHeaderCapturePattern() throws ParserException {\n ParsableByteArray header = new ParsableByteArray(\n new byte[] {0x01, 'v', 'o', 'r', 'b', 'i', 's'});\n assertThat(verifyVorbisHeaderCapturePattern(0x01, header, false)).isTrue();\n }", "class_method_sign...
{ "fields": [ { "declarator": "TAG = \"VorbisUtil\"", "modifier": "private static final", "original_string": "private static final String TAG = \"VorbisUtil\";", "type": "String", "var_name": "TAG" } ], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/ext...
{ "body": "public static boolean verifyVorbisHeaderCapturePattern(int headerType, ParsableByteArray header,\n boolean quiet)\n throws ParserException {\n if (header.bytesLeft() < 7) {\n if (quiet) {\n return false;\n } else {\n throw new ParserException(\"too short header: \" + he...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_291
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/upstream/BaseDataSourceTest.java", "identifier": "BaseDataSourceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void dataTransfer_withRemoteSource_isReported() throws IOException {\n TestSource testSource = new TestSource(/* isNetwork= */ true);\n TestTransferListener transferListener = new TestTransferListener();\n testSource.addTransferListener(transferListener);\n\n DataSpec dataSpec =...
{ "fields": [ { "declarator": "isNetwork", "modifier": "private final", "original_string": "private final boolean isNetwork;", "type": "boolean", "var_name": "isNetwork" }, { "declarator": "listeners", "modifier": "private final", "original_string": "private...
{ "body": "@Override\n public final void addTransferListener(TransferListener transferListener) {\n if (!listeners.contains(transferListener)) {\n listeners.add(transferListener);\n listenerCount++;\n }\n }", "class_method_signature": "BaseDataSource.addTransferListener(TransferListener transferLi...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_454
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getAverageBitrate_zeroMaxDuration_returnsNoValue() {\n long[] chunkTimeBoundariesSec = {0, 5, 10};\n long[] chunkLengths = {10, 20};\n\n FakeMediaChunkIterator iterator =\n new FakeMediaChunkIterator(chunkTimeBoundariesSec, chunkLengths);\n\n assertThat(TrackSelectio...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "public static int getAverageBitrate(MediaChunkIterator iterator, long maxDurationUs) {\n long totalDurationUs = 0;\n long totalLength = 0;\n while (iterator.next()) {\n long chunkLength = iterator.getDataSpec().length;\n if (chunkLength == C.LENGTH_UNSET) {\n break;\n }\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_511
{ "fields": [ { "declarator": "VIDEO_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_VIDEO)", "modifier": "private static final", "original_string": "private static final RendererCapabilities VIDEO_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_VIDEO);", "t...
{ "body": "@Test\n public void testMappingReverseOrder() throws ExoPlaybackException {\n FakeMappingTrackSelector trackSelector = new FakeMappingTrackSelector();\n RendererCapabilities[] reverseOrderRendererCapabilities = new RendererCapabilities[] {\n AUDIO_CAPABILITIES, VIDEO_CAPABILITIES};\n track...
{ "fields": [ { "declarator": "currentMappedTrackInfo", "modifier": "private @Nullable", "original_string": "private @Nullable MappedTrackInfo currentMappedTrackInfo;", "type": "MappedTrackInfo", "var_name": "currentMappedTrackInfo" } ], "file": "videoplayer-core/src/main/jav...
{ "body": "@Override\n public final TrackSelectorResult selectTracks(\n RendererCapabilities[] rendererCapabilities,\n TrackGroupArray trackGroups,\n MediaPeriodId periodId,\n Timeline timeline)\n throws ExoPlaybackException {\n // Structures into which data will be written during the sel...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_268
{ "fields": [ { "declarator": "mockCache", "modifier": "@Mock(answer = Answers.CALLS_REAL_METHODS) private", "original_string": "@Mock(answer = Answers.CALLS_REAL_METHODS) private AbstractFakeCache mockCache;", "type": "AbstractFakeCache", "var_name": "mockCache" }, { "...
{ "body": "@Test\n public void testCacheLengthExceedsActualDataLength() throws Exception {\n FakeDataSet fakeDataSet = new FakeDataSet().setRandomData(\"test_data\", 100);\n FakeDataSource dataSource = new FakeDataSource(fakeDataSet);\n\n Uri testUri = Uri.parse(\"test_data\");\n DataSpec dataSpec = new ...
{ "fields": [ { "declarator": "DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024;", "type": "int", "var_name": "DEFAULT_BUFFER_SIZE_BYTES" }, { "declarator": "DE...
{ "body": "public static void cache(\n DataSpec dataSpec,\n Cache cache,\n @Nullable CacheKeyFactory cacheKeyFactory,\n DataSource upstream,\n @Nullable ProgressListener progressListener,\n @Nullable AtomicBoolean isCanceled)\n throws IOException, InterruptedException {\n cache(\...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_403
{ "fields": [ { "declarator": "ASSERT_TRUE_TIMEOUT = 10000", "modifier": "private static final", "original_string": "private static final int ASSERT_TRUE_TIMEOUT = 10000;", "type": "int", "var_name": "ASSERT_TRUE_TIMEOUT" }, { "declarator": "ASSERT_FALSE_TIME = 1000", ...
{ "body": "@Test\n public void setSingleDownloadStopReason_doesNotAffectOtherDownloads() throws Throwable {\n DownloadRunner runner1 = new DownloadRunner(uri1);\n DownloadRunner runner2 = new DownloadRunner(uri2);\n DownloadRunner runner3 = new DownloadRunner(uri3);\n\n runner1.postDownloadRequest().getT...
{ "fields": [ { "declarator": "DEFAULT_MAX_PARALLEL_DOWNLOADS = 3", "modifier": "public static final", "original_string": "public static final int DEFAULT_MAX_PARALLEL_DOWNLOADS = 3;", "type": "int", "var_name": "DEFAULT_MAX_PARALLEL_DOWNLOADS" }, { "declarator": "DEFAU...
{ "body": "public void setStopReason(@Nullable String id, int stopReason) {\n pendingMessages++;\n internalHandler\n .obtainMessage(MSG_SET_STOP_REASON, stopReason, /* unused */ 0, id)\n .sendToTarget();\n }", "class_method_signature": "DownloadManager.setStopReason(@Nullable String id, int sto...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_395
{ "fields": [ { "declarator": "tempFile", "modifier": "private", "original_string": "private File tempFile;", "type": "File", "var_name": "tempFile" }, { "declarator": "expectedAction1", "modifier": "private", "original_string": "private DownloadRequest expe...
{ "body": "@Test\n public void testLoadUnsupportedVersion() throws Exception {\n ActionFile actionFile = getActionFile(\"offline/action_file_unsupported_version.exi\");\n try {\n actionFile.load();\n Assert.fail();\n } catch (IOException e) {\n // Expected exception.\n }\n }", "class_me...
{ "fields": [ { "declarator": "VERSION = 0", "modifier": "private static final", "original_string": "private static final int VERSION = 0;", "type": "int", "var_name": "VERSION" }, { "declarator": "atomicFile", "modifier": "private final", "original_string":...
{ "body": "public DownloadRequest[] load() throws IOException {\n if (!exists()) {\n return new DownloadRequest[0];\n }\n InputStream inputStream = null;\n try {\n inputStream = atomicFile.openRead();\n DataInputStream dataInputStream = new DataInputStream(inputStream);\n int version =...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_92
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testArrayBinarySearchFloor() {\n long[] values = new long[0];\n assertThat(binarySearchFloor(values, 0, false, false)).isEqualTo(-1);\n assertThat(binarySearchFloor(values, 0, false, true)).isEqualTo(0);\n\n values = new long[] {1, 3, 5};\n assertThat(binarySearchFloor(v...
{ "fields": [ { "declarator": "SDK_INT = Build.VERSION.SDK_INT", "modifier": "public static final", "original_string": "public static final int SDK_INT = Build.VERSION.SDK_INT;", "type": "int", "var_name": "SDK_INT" }, { "declarator": "DEVICE = Build.DEVICE", "mod...
{ "body": "public static int binarySearchFloor(int[] array, int value, boolean inclusive,\n boolean stayInBounds) {\n int index = Arrays.binarySearch(array, value);\n if (index < 0) {\n index = -(index + 2);\n } else {\n while (--index >= 0 && array[index] == value) {}\n if (inclusive) {\...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_248
{ "fields": [ { "declarator": "TAG_HEADER = new byte[] {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 0}", "modifier": "private static final", "original_string": "private static final byte[] TAG_HEADER = new byte[] {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 0};", "type": "byte[]", "var_name": "TAG_HEADER"...
{ "body": "@Test\n public void testDecodeMultiFrames() {\n byte[] rawId3 =\n buildMultiFramesTag(\n new FrameSpec(\n \"COMM\",\n new byte[] {\n 3, 101, 110, 103, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 0, 116,\n 101, 1...
{ "fields": [ { "declarator": "NO_FRAMES_PREDICATE =\n (majorVersion, id0, id1, id2, id3) -> false", "modifier": "public static final", "original_string": "public static final FramePredicate NO_FRAMES_PREDICATE =\n (majorVersion, id0, id1, id2, id3) -> false;", "type": "FramePred...
{ "body": "@SuppressWarnings(\"ByteBufferBackingArray\")\n @Override\n public @Nullable Metadata decode(MetadataInputBuffer inputBuffer) {\n ByteBuffer buffer = inputBuffer.data;\n return decode(buffer.array(), buffer.limit());\n }", "class_method_signature": "Id3Decoder.decode(MetadataInputBuffer inputBuf...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_161
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtilTest.java", "identifier": "TtmlRenderUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testResolveStyleMultipleReferentialStyles() {\n Map<String, TtmlStyle> globalStyles = getGlobalStyles();\n String[] styleIds = {\"s0\", \"s1\"};\n\n TtmlStyle resolved = TtmlRenderUtil.resolveStyle(null, styleIds, globalStyles);\n assertThat(resolved).isNotSameAs(globalStyl...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtil.java", "identifier": "TtmlRenderUtil", "interfaces": "", "methods": [ { "class_method_signature": "TtmlRenderUtil.resolveStyle(TtmlStyle style, String[] styleIds,\n Map<String, TtmlSty...
{ "body": "public static TtmlStyle resolveStyle(TtmlStyle style, String[] styleIds,\n Map<String, TtmlStyle> globalStyles) {\n if (style == null && styleIds == null) {\n // No styles at all.\n return null;\n } else if (style == null && styleIds.length == 1) {\n // Only one single referential...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_474
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void\n getBitratesUsingPastInfo_chunksWithDifferentFormats_returnsChunkAverageBitrateForLastFormat() {\n FakeMediaChunk chunk =\n createChunk(\n createFormatWithBitrate(10),\n /* length= */ 10,\n /* startTimeSec= */ 0,\n /* endTimeS...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingPastInfo(\n List<? extends MediaChunk> queue,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n if (bitrates == null) {\n bitrates = new int[formats.length];\n Arrays.fill(bitrates, For...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_209
{ "fields": [ { "declarator": "NO_SUBTITLE = \"tx3g/no_subtitle\"", "modifier": "private static final", "original_string": "private static final String NO_SUBTITLE = \"tx3g/no_subtitle\";", "type": "String", "var_name": "NO_SUBTITLE" }, { "declarator": "SAMPLE_JUST_TEXT...
{ "body": "@Test\n public void testDecodeWithStyl() throws IOException, SubtitleDecoderException {\n Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList());\n byte[] bytes =\n TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), SAMPLE_WITH_STYL);\n Subtitle subtitle = decoder.d...
{ "fields": [ { "declarator": "BOM_UTF16_BE = '\\uFEFF'", "modifier": "private static final", "original_string": "private static final char BOM_UTF16_BE = '\\uFEFF';", "type": "char", "var_name": "BOM_UTF16_BE" }, { "declarator": "BOM_UTF16_LE = '\\uFFFE'", "modif...
{ "body": "@Override\n protected Subtitle decode(byte[] bytes, int length, boolean reset)\n throws SubtitleDecoderException {\n parsableByteArray.reset(bytes, length);\n String cueTextString = readSubtitleText(parsableByteArray);\n if (cueTextString.isEmpty()) {\n return Tx3gSubtitle.EMPTY;\n }...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_435
{ "fields": [ { "declarator": "offlineLicenseHelper", "modifier": "private", "original_string": "private OfflineLicenseHelper<?> offlineLicenseHelper;", "type": "OfflineLicenseHelper<?>", "var_name": "offlineLicenseHelper" }, { "declarator": "mediaDrmCallback", "m...
{ "body": "@Test\n public void testDownloadLicenseFailsIfNoKeySetIdIsReturned() throws Exception {\n setStubLicenseAndPlaybackDurationValues(1000, 200);\n\n try {\n offlineLicenseHelper.downloadLicense(newDrmInitData());\n fail();\n } catch (Exception e) {\n // Expected.\n }\n }", "clas...
{ "fields": [ { "declarator": "DUMMY_DRM_INIT_DATA = new DrmInitData()", "modifier": "private static final", "original_string": "private static final DrmInitData DUMMY_DRM_INIT_DATA = new DrmInitData();", "type": "DrmInitData", "var_name": "DUMMY_DRM_INIT_DATA" }, { "de...
{ "body": "public synchronized byte[] downloadLicense(DrmInitData drmInitData) throws DrmSessionException {\n Assertions.checkArgument(drmInitData != null);\n return blockingKeyRequest(DefaultDrmSessionManager.MODE_DOWNLOAD, null, drmInitData);\n }", "class_method_signature": "OfflineLicenseHelper.downloadLi...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_177
{ "fields": [ { "declarator": "EMPTY = \"ssa/empty\"", "modifier": "private static final", "original_string": "private static final String EMPTY = \"ssa/empty\";", "type": "String", "var_name": "EMPTY" }, { "declarator": "TYPICAL = \"ssa/typical\"", "modifier": "p...
{ "body": "@Test\n public void testDecodeTypicalWithInitializationData() throws IOException {\n byte[] headerBytes =\n TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), TYPICAL_HEADER_ONLY);\n byte[] formatBytes =\n TestUtil.getByteArray(ApplicationProvider.getApplicationContext(...
{ "fields": [ { "declarator": "TAG = \"SsaDecoder\"", "modifier": "private static final", "original_string": "private static final String TAG = \"SsaDecoder\";", "type": "String", "var_name": "TAG" }, { "declarator": "SSA_TIMECODE_PATTERN = Pattern.compile(\n \"(?:...
{ "body": "@Override\n protected SsaSubtitle decode(byte[] bytes, int length, boolean reset) {\n ArrayList<Cue> cues = new ArrayList<>();\n LongArray cueTimesUs = new LongArray();\n\n ParsableByteArray data = new ParsableByteArray(bytes, length);\n if (!haveInitializationData) {\n parseHeader(data);...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_198
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java", "identifier": "WebvttCueParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseVoidTag() throws Exception {\n Spanned text = parseCueText(\"here comes<br/> text<br/>\");\n assertThat(text.toString()).isEqualTo(\"here comes text\");\n }", "class_method_signature": "WebvttCueParserTest.testParseVoidTag()", "constructor": false, "full_signature...
{ "fields": [ { "declarator": "CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\")", "modifier": "public static final", "original_string": "public static final Pattern CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\");",...
{ "body": "static void parseCueText(String id, String markup, WebvttCue.Builder builder,\n List<WebvttCssStyle> styles) {\n SpannableStringBuilder spannedText = new SpannableStringBuilder();\n ArrayDeque<StartTag> startTagStack = new ArrayDeque<>();\n List<StyleMatch> scratchStyleMatches = new ArrayList...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_462
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getBitratesUsingPastInfo_noFormat_returnsEmptyArray() {\n FakeMediaChunk chunk =\n createChunk(\n createFormatWithBitrate(10),\n /* length= */ 10,\n /* startTimeSec= */ 0,\n /* endTimeSec= */ 10);\n\n int[] bitrates =\n Tr...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingPastInfo(\n List<? extends MediaChunk> queue,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n if (bitrates == null) {\n bitrates = new int[formats.length];\n Arrays.fill(bitrates, For...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_225
{ "fields": [ { "declarator": "TEST_POSITION_US = 123456789012345678L", "modifier": "private static final", "original_string": "private static final long TEST_POSITION_US = 123456789012345678L;", "type": "long", "var_name": "TEST_POSITION_US" }, { "declarator": "SLEEP_T...
{ "body": "@Test\n public void standaloneSetSamePlaybackParametersAgain_shouldTriggerCallbackAgain() {\n mediaClock.setPlaybackParameters(TEST_PLAYBACK_PARAMETERS);\n mediaClock.setPlaybackParameters(TEST_PLAYBACK_PARAMETERS);\n verify(listener, times(2)).onPlaybackParametersChanged(TEST_PLAYBACK_PARAMETERS...
{ "fields": [ { "declarator": "standaloneMediaClock", "modifier": "private final", "original_string": "private final StandaloneMediaClock standaloneMediaClock;", "type": "StandaloneMediaClock", "var_name": "standaloneMediaClock" }, { "declarator": "listener", "mod...
{ "body": "@Override\n public PlaybackParameters setPlaybackParameters(PlaybackParameters playbackParameters) {\n if (rendererClock != null) {\n playbackParameters = rendererClock.setPlaybackParameters(playbackParameters);\n }\n standaloneMediaClock.setPlaybackParameters(playbackParameters);\n liste...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_88
{ "fields": [ { "declarator": "TEST_DATA = new byte[] {0x3C, (byte) 0xD2, (byte) 0x5F, (byte) 0x01,\n (byte) 0xFF, (byte) 0x14, (byte) 0x60, (byte) 0x99}", "modifier": "private static final", "original_string": "private static final byte[] TEST_DATA = new byte[] {0x3C, (byte) 0xD2, (byte) 0...
{ "body": "@Test\n public void testSetPositionNonByteAligned() {\n testArray.setPosition(5);\n assertReadBitsToEnd(5);\n }", "class_method_signature": "ParsableBitArrayTest.testSetPositionNonByteAligned()", "constructor": false, "full_signature": "@Test public void testSetPositionNonByteAligned()", "i...
{ "fields": [ { "declarator": "data", "modifier": "public", "original_string": "public byte[] data;", "type": "byte[]", "var_name": "data" }, { "declarator": "byteOffset", "modifier": "private", "original_string": "private int byteOffset;", "type": "in...
{ "body": "public void setPosition(int position) {\n byteOffset = position / 8;\n bitOffset = position - (byteOffset * 8);\n assertValidOffset();\n }", "class_method_signature": "ParsableBitArray.setPosition(int position)", "constructor": false, "full_signature": "public void setPosition(int position)...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_67
{ "fields": [ { "declarator": "XING_FRAME_HEADER_DATA = 0xFFFB3000", "modifier": "private static final", "original_string": "private static final int XING_FRAME_HEADER_DATA = 0xFFFB3000;", "type": "int", "var_name": "XING_FRAME_HEADER_DATA" }, { "declarator": "XING_FRAM...
{ "body": "@Test\n public void testGetTimeUsAtFirstAudioFrame() {\n assertThat(seeker.getTimeUs(XING_FRAME_POSITION + xingFrameSize)).isEqualTo(0);\n assertThat(seekerWithInputLength.getTimeUs(XING_FRAME_POSITION + xingFrameSize)).isEqualTo(0);\n }", "class_method_signature": "XingSeekerTest.testGetTimeUsAt...
{ "fields": [ { "declarator": "TAG = \"XingSeeker\"", "modifier": "private static final", "original_string": "private static final String TAG = \"XingSeeker\";", "type": "String", "var_name": "TAG" }, { "declarator": "dataStartPosition", "modifier": "private final...
{ "body": "@Override\n public long getTimeUs(long position) {\n long positionOffset = position - dataStartPosition;\n if (!isSeekable() || positionOffset <= xingFrameSize) {\n return 0L;\n }\n long[] tableOfContents = Assertions.checkNotNull(this.tableOfContents);\n double scaledPosition = (posit...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_360
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/source/CompositeSequenceableLoaderTest.java", "identifier": "CompositeSequenceableLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetNextLoadPositionUsReturnMinimumLoaderNextLoadPositionUs() {\n FakeSequenceableLoader loader1 =\n new FakeSequenceableLoader(/* bufferedPositionUs */ 1000, /* nextLoadPositionUs */ 2001);\n FakeSequenceableLoader loader2 =\n new FakeSequenceableLoader(/* buffe...
{ "fields": [ { "declarator": "loaders", "modifier": "protected final", "original_string": "protected final SequenceableLoader[] loaders;", "type": "SequenceableLoader[]", "var_name": "loaders" } ], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/source/...
{ "body": "@Override\n public final long getNextLoadPositionUs() {\n long nextLoadPositionUs = Long.MAX_VALUE;\n for (SequenceableLoader loader : loaders) {\n long loaderNextLoadPositionUs = loader.getNextLoadPositionUs();\n if (loaderNextLoadPositionUs != C.TIME_END_OF_SOURCE) {\n nextLoadPos...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_272
{ "fields": [ { "declarator": "TEST_DATA = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}", "modifier": "private static final", "original_string": "private static final byte[] TEST_DATA = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};", "type": "byte[]", "var_name": "TEST_DATA" }, { ...
{ "body": "@Test\n public void testUnsatisfiableRange() throws Exception {\n // Bounded request but the content length is unknown. This forces all data to be cached but not\n // the length.\n assertCacheAndRead(boundedDataSpec, /* unknownLength= */ true);\n\n // Now do an unbounded request. This will rea...
{ "fields": [ { "declarator": "FLAG_BLOCK_ON_CACHE = 1", "modifier": "public static final", "original_string": "public static final int FLAG_BLOCK_ON_CACHE = 1;", "type": "int", "var_name": "FLAG_BLOCK_ON_CACHE" }, { "declarator": "FLAG_IGNORE_CACHE_ON_ERROR = 1 << 1", ...
{ "body": "@Override\n public long open(DataSpec dataSpec) throws IOException {\n try {\n key = cacheKeyFactory.buildCacheKey(dataSpec);\n uri = dataSpec.uri;\n actualUri = getRedirectedUriOrDefault(cache, key, /* defaultUri= */ uri);\n httpMethod = dataSpec.httpMethod;\n flags = dataSpec...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_337
{ "fields": [ { "declarator": "FORMAT = Format.createSampleFormat(null, MimeTypes.AUDIO_RAW, 0)", "modifier": "private static final", "original_string": "private static final Format FORMAT = Format.createSampleFormat(null, MimeTypes.AUDIO_RAW, 0);", "type": "Format", "var_name": "FOR...
{ "body": "@Config(sdk = 19)\n @Test\n public void testSupportsFormatAtApi19() {\n assertThat(audioRenderer.supportsFormat(FORMAT))\n .isEqualTo(ADAPTIVE_NOT_SEAMLESS | TUNNELING_NOT_SUPPORTED | FORMAT_HANDLED);\n }", "class_method_signature": "SimpleDecoderAudioRendererTest.testSupportsFormatAtApi19()...
{ "fields": [ { "declarator": "REINITIALIZATION_STATE_NONE = 0", "modifier": "private static final", "original_string": "private static final int REINITIALIZATION_STATE_NONE = 0;", "type": "int", "var_name": "REINITIALIZATION_STATE_NONE" }, { "declarator": "REINITIALIZA...
{ "body": "@Override\n public final int supportsFormat(Format format) {\n if (!MimeTypes.isAudio(format.sampleMimeType)) {\n return FORMAT_UNSUPPORTED_TYPE;\n }\n int formatSupport = supportsFormatInternal(drmSessionManager, format);\n if (formatSupport <= FORMAT_UNSUPPORTED_DRM) {\n return for...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_30
{ "fields": [ { "declarator": "TEST_URI = \"http://www.google.com\"", "modifier": "private static final", "original_string": "private static final String TEST_URI = \"http://www.google.com\";", "type": "String", "var_name": "TEST_URI" }, { "declarator": "TEST_DATA = new...
{ "body": "@Test\n public void testRead() throws Exception {\n DefaultExtractorInput input = createDefaultExtractorInput();\n byte[] target = new byte[TEST_DATA.length];\n // We expect to perform three reads of three bytes, as setup in buildTestDataSource.\n int bytesRead = 0;\n bytesRead += input.rea...
{ "fields": [ { "declarator": "PEEK_MIN_FREE_SPACE_AFTER_RESIZE = 64 * 1024", "modifier": "private static final", "original_string": "private static final int PEEK_MIN_FREE_SPACE_AFTER_RESIZE = 64 * 1024;", "type": "int", "var_name": "PEEK_MIN_FREE_SPACE_AFTER_RESIZE" }, { ...
{ "body": "@Override\n public int read(byte[] target, int offset, int length) throws IOException, InterruptedException {\n int bytesRead = readFromPeekBuffer(target, offset, length);\n if (bytesRead == 0) {\n bytesRead = readFromDataSource(target, offset, length, 0, true);\n }\n commitBytesRead(byte...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_8
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/extractor/ogg/VorbisUtilTest.java", "identifier": "VorbisUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testVerifyVorbisHeaderCapturePatternQuiteInvalidPatternQuite()\n throws ParserException {\n ParsableByteArray header = new ParsableByteArray(\n new byte[] {0x01, 'x', 'v', 'o', 'r', 'b', 'i', 's'});\n assertThat(verifyVorbisHeaderCapturePattern(0x01, header, true)).is...
{ "fields": [ { "declarator": "TAG = \"VorbisUtil\"", "modifier": "private static final", "original_string": "private static final String TAG = \"VorbisUtil\";", "type": "String", "var_name": "TAG" } ], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/ext...
{ "body": "public static boolean verifyVorbisHeaderCapturePattern(int headerType, ParsableByteArray header,\n boolean quiet)\n throws ParserException {\n if (header.bytesLeft() < 7) {\n if (quiet) {\n return false;\n } else {\n throw new ParserException(\"too short header: \" + he...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_264
{ "fields": [ { "declarator": "mockCache", "modifier": "@Mock(answer = Answers.CALLS_REAL_METHODS) private", "original_string": "@Mock(answer = Answers.CALLS_REAL_METHODS) private AbstractFakeCache mockCache;", "type": "AbstractFakeCache", "var_name": "mockCache" }, { "...
{ "body": "@Test\n public void testCache() throws Exception {\n FakeDataSet fakeDataSet = new FakeDataSet().setRandomData(\"test_data\", 100);\n FakeDataSource dataSource = new FakeDataSource(fakeDataSet);\n\n CachingCounters counters = new CachingCounters();\n CacheUtil.cache(\n new DataSpec(Uri....
{ "fields": [ { "declarator": "DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024;", "type": "int", "var_name": "DEFAULT_BUFFER_SIZE_BYTES" }, { "declarator": "DE...
{ "body": "public static void cache(\n DataSpec dataSpec,\n Cache cache,\n @Nullable CacheKeyFactory cacheKeyFactory,\n DataSource upstream,\n @Nullable ProgressListener progressListener,\n @Nullable AtomicBoolean isCanceled)\n throws IOException, InterruptedException {\n cache(\...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_26
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/extractor/ogg/VorbisReaderTest.java", "identifier": "VorbisReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReadSetupHeadersWithIOExceptions() throws IOException, InterruptedException {\n byte[] data = OggTestData.getVorbisHeaderPages();\n ExtractorInput input = new FakeExtractorInput.Builder().setData(data).setSimulateIOErrors(true)\n .setSimulateUnknownLength(true).setSimu...
{ "fields": [ { "declarator": "vorbisSetup", "modifier": "private", "original_string": "private VorbisSetup vorbisSetup;", "type": "VorbisSetup", "var_name": "vorbisSetup" }, { "declarator": "previousPacketBlockSize", "modifier": "private", "original_string"...
{ "body": "@VisibleForTesting\n /* package */ VorbisSetup readSetupHeaders(ParsableByteArray scratch) throws IOException {\n\n if (vorbisIdHeader == null) {\n vorbisIdHeader = VorbisUtil.readVorbisIdentificationHeader(scratch);\n return null;\n }\n\n if (commentHeader == null) {\n commentHead...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_321
{ "fields": [ { "declarator": "SIMULATED_TRANSFER_COUNT = 100", "modifier": "private static final", "original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;", "type": "int", "var_name": "SIMULATED_TRANSFER_COUNT" }, { "declarator": "FAST_COUNTRY_ISO ...
{ "body": "@Test\n @SuppressWarnings(\"deprecation\")\n public void defaultInitialBitrateEstimate_withoutContext_isReasonable() {\n DefaultBandwidthMeter bandwidthMeterWithBuilder =\n new DefaultBandwidthMeter.Builder(/* context= */ null).build();\n long initialEstimateWithBuilder = bandwidthMeterWithB...
{ "fields": [ { "declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()", "modifier": "public static final", "original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG...
{ "body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }", "class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()", "constructor": false, "full_signature": "@Override public synchronized long getBitrateEstimate()", "identifier": "getBitrateEstima...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_458
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getBitratesUsingFutureInfo_twoTracks_returnsBitrates() {\n FakeMediaChunkIterator iterator1 =\n new FakeMediaChunkIterator(\n /* chunkTimeBoundariesSec= */ new long[] {0, 10}, /* chunkLengths= */ new long[] {10});\n FakeMediaChunkIterator iterator2 =\n ne...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingFutureInfo(\n MediaChunkIterator[] iterators,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n int trackCount = iterators.length;\n Assertions.checkArgument(trackCount == formats.length);\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }