id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
133447770_233
{ "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() {\n IcyDecoder decoder = new IcyDecoder();\n Metadata metadata = decoder.decode(\"StreamTitle='test title';StreamURL='test_url';\");\n\n assertThat(metadata.length()).isEqualTo(1);\n IcyInfo streamInfo = (IcyInfo) metadata.get(0);\n assertThat(streamInfo.title)....
{ "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_399
{ "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 downloadFails_retries() throws Throwable {\n DownloadRunner runner = new DownloadRunner(uri1);\n runner.postDownloadRequest();\n FakeDownloader downloader = runner.getDownloader(0);\n\n for (int i = 0; i < MIN_RETRY_COUNT; i++) {\n downloader.assertStarted(MAX_RETRY_DE...
{ "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 List<Download> getCurrentDownloads() {\n return downloads;\n }", "class_method_signature": "DownloadManager.getCurrentDownloads()", "constructor": false, "full_signature": "public List<Download> getCurrentDownloads()", "identifier": "getCurrentDownloads", "invocations": [], "modifier...
{ "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_376
{ "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 testAdvanceToStartOfBuffer() {\n writeTestData();\n int skipCount = sampleQueue.advanceTo(SAMPLE_TIMESTAMPS[0], true, false);\n // Should succeed but have no effect (we're already at the first frame).\n assertThat(skipCount).isEqualTo(0);\n assertReadTestData();\n ass...
{ "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 int advanceTo(long timeUs, boolean toKeyframe, boolean allowTimeBeyondBuffer) {\n return metadataQueue.advanceTo(timeUs, toKeyframe, allowTimeBeyondBuffer);\n }", "class_method_signature": "SampleQueue.advanceTo(long timeUs, boolean toKeyframe, boolean allowTimeBeyondBuffer)", "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_232
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/metadata/emsg/EventMessageEncoderTest.java", "identifier": "EventMessageEncoderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEncodeEventStreamMultipleTimesWorkingCorrectly() throws IOException {\n EventMessage eventMessage =\n new EventMessage(\"urn:test\", \"123\", 3000, 1000403, new byte[] {0, 1, 2, 3, 4});\n byte[] expectedEmsgBody =\n new byte[] {\n 117, 114, 110, 58, 116...
{ "fields": [ { "declarator": "byteArrayOutputStream", "modifier": "private final", "original_string": "private final ByteArrayOutputStream byteArrayOutputStream;", "type": "ByteArrayOutputStream", "var_name": "byteArrayOutputStream" }, { "declarator": "dataOutputStream...
{ "body": "@Nullable\n public byte[] encode(EventMessage eventMessage) {\n byteArrayOutputStream.reset();\n try {\n writeNullTerminatedString(dataOutputStream, eventMessage.schemeIdUri);\n String nonNullValue = eventMessage.value != null ? eventMessage.value : \"\";\n writeNullTerminatedString(d...
{ "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_398
{ "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 downloadFails_retriesThenTaskFails() throws Throwable {\n DownloadRunner runner = new DownloadRunner(uri1);\n runner.postDownloadRequest();\n FakeDownloader downloader = runner.getDownloader(0);\n\n for (int i = 0; i <= MIN_RETRY_COUNT; i++) {\n downloader.assertStarte...
{ "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 List<Download> getCurrentDownloads() {\n return downloads;\n }", "class_method_signature": "DownloadManager.getCurrentDownloads()", "constructor": false, "full_signature": "public List<Download> getCurrentDownloads()", "identifier": "getCurrentDownloads", "invocations": [], "modifier...
{ "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_377
{ "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 testAdvanceToEndOfBuffer() {\n writeTestData();\n int skipCount = sampleQueue.advanceTo(LAST_SAMPLE_TIMESTAMP, true, false);\n // Should succeed and skip to 2nd keyframe (the 4th frame).\n assertThat(skipCount).isEqualTo(4);\n assertReadTestData(null, DATA_SECOND_KEYFRAM...
{ "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 int advanceTo(long timeUs, boolean toKeyframe, boolean allowTimeBeyondBuffer) {\n return metadataQueue.advanceTo(timeUs, toKeyframe, allowTimeBeyondBuffer);\n }", "class_method_signature": "SampleQueue.advanceTo(long timeUs, boolean toKeyframe, boolean allowTimeBeyondBuffer)", "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_70
{ "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 testGetSeekPointsAtEndOfStream() {\n SeekPoints seekPoints = seeker.getSeekPoints(STREAM_DURATION_US);\n SeekPoint seekPoint = seekPoints.first;\n assertThat(seekPoint).isEqualTo(seekPoints.second);\n assertThat(seekPoint.timeUs).isEqualTo(STREAM_DURATION_US);\n assertTh...
{ "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 SeekPoints getSeekPoints(long timeUs) {\n if (!isSeekable()) {\n return new SeekPoints(new SeekPoint(0, dataStartPosition + xingFrameSize));\n }\n timeUs = Util.constrainValue(timeUs, 0, durationUs);\n double percent = (timeUs * 100d) / durationUs;\n double scaledPos...
{ "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_459
{ "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_bitratesArrayGiven_returnsTheSameArray() {\n FakeMediaChunkIterator iterator1 =\n new FakeMediaChunkIterator(\n /* chunkTimeBoundariesSec= */ new long[] {0, 10}, /* chunkLengths= */ new long[] {10});\n FakeMediaChunkIterator iterator2 ...
{ "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" }
133447770_265
{ "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 testCacheSetOffsetAndLength() 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 DataSpec(te...
{ "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_320
{ "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 networkTypeOverride_doesFullReset() {\n // Simulate transfers for an ethernet connection.\n setActiveNetworkInfo(networkInfoEthernet);\n FakeClock clock = new FakeClock(/* initialTimeMs= */ 0);\n DefaultBandwidthMeter bandwidthMeter =\n new DefaultBandwidthMeter.Buil...
{ "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": "public synchronized void setNetworkTypeOverride(@C.NetworkType int networkType) {\n networkTypeOverride = networkType;\n networkTypeOverrideSet = true;\n onConnectivityAction();\n }", "class_method_signature": "DefaultBandwidthMeter.setNetworkTypeOverride(@C.NetworkType int networkType)", "co...
{ "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_273
{ "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 testUnsatisfiableRangeWithCacheKeyFactoryNullDataSpecCacheKey() 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, cacheKeyFactor...
{ "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_336
{ "fields": [ { "declarator": "CHANNEL_COUNT_MONO = 1", "modifier": "private static final", "original_string": "private static final int CHANNEL_COUNT_MONO = 1;", "type": "int", "var_name": "CHANNEL_COUNT_MONO" }, { "declarator": "CHANNEL_COUNT_STEREO = 2", "modif...
{ "body": "@Config(minSdk = 21, maxSdk = NEWEST_SDK)\n @Test\n public void supportsFloatOutputFromApi21() {\n assertThat(defaultAudioSink.supportsOutput(CHANNEL_COUNT_STEREO, C.ENCODING_PCM_FLOAT))\n .isTrue();\n }", "class_method_signature": "DefaultAudioSinkTest.supportsFloatOutputFromApi21()", "co...
{ "fields": [ { "declarator": "MIN_BUFFER_DURATION_US = 250000", "modifier": "private static final", "original_string": "private static final long MIN_BUFFER_DURATION_US = 250000;", "type": "long", "var_name": "MIN_BUFFER_DURATION_US" }, { "declarator": "MAX_BUFFER_DURA...
{ "body": "@Override\n public boolean supportsOutput(int channelCount, @C.Encoding int encoding) {\n if (Util.isEncodingLinearPcm(encoding)) {\n // AudioTrack supports 16-bit integer PCM output in all platform API versions, and float\n // output from platform API version 21 only. Other integer PCM encod...
{ "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_31
{ "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 testSkip() throws Exception {\n FakeDataSource testDataSource = buildDataSource();\n DefaultExtractorInput input = new DefaultExtractorInput(testDataSource, 0, C.LENGTH_UNSET);\n // We expect to perform three skips of three bytes, as setup in buildTestDataSource.\n for (int...
{ "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 skip(int length) throws IOException, InterruptedException {\n int bytesSkipped = skipFromPeekBuffer(length);\n if (bytesSkipped == 0) {\n bytesSkipped =\n readFromDataSource(scratchSpace, 0, Math.min(length, scratchSpace.length), 0, true);\n }\n commitBytes...
{ "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_418
{ "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 getTrackSelections_returnsInitialSelection() throws Exception {\n prepareDownloadHelper(downloadHelper);\n\n List<TrackSelection> selectedText0 =\n downloadHelper.getTrackSelections(/* periodIndex= */ 0, /* rendererIndex= */ 0);\n List<TrackSelection> selectedAudio0 =\n...
{ "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": "public List<TrackSelection> getTrackSelections(int periodIndex, int rendererIndex) {\n assertPreparedWithMedia();\n return immutableTrackSelectionsByPeriodAndRenderer[periodIndex][rendererIndex];\n }", "class_method_signature": "DownloadHelper.getTrackSelections(int periodIndex, int rendererIndex)...
{ "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_224
{ "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 standaloneSetOtherPlaybackParameters_shouldTriggerCallbackAgain() {\n mediaClock.setPlaybackParameters(TEST_PLAYBACK_PARAMETERS);\n mediaClock.setPlaybackParameters(PlaybackParameters.DEFAULT);\n verify(listener).onPlaybackParametersChanged(PlaybackParameters.DEFAULT);\n }", ...
{ "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_89
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAddWithOverflowDefault() {\n long res = Util.addWithOverflowDefault(5, 10, /* overflowResult= */ 0);\n assertThat(res).isEqualTo(15);\n\n res = Util.addWithOverflowDefault(Long.MAX_VALUE - 1, 1, /* overflowResult= */ 12345);\n assertThat(res).isEqualTo(Long.MAX_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 long addWithOverflowDefault(long x, long y, long overflowResult) {\n long result = x + y;\n // See Hacker's Delight 2-13 (H. Warren Jr).\n if (((x ^ result) & (y ^ result)) < 0) {\n return overflowResult;\n }\n return result;\n }", "class_method_signature": "Util.addWit...
{ "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_66
{ "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 testGetTimeUsBeforeFirstAudioFrame() {\n assertThat(seeker.getTimeUs(-1)).isEqualTo(0);\n assertThat(seekerWithInputLength.getTimeUs(-1)).isEqualTo(0);\n }", "class_method_signature": "XingSeekerTest.testGetTimeUsBeforeFirstAudioFrame()", "constructor": false, "full_signat...
{ "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_361
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/source/CompositeSequenceableLoaderTest.java", "identifier": "CompositeSequenceableLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetNextLoadPositionUsReturnMinimumNonEndOfSourceLoaderNextLoadPositionUs() {\n FakeSequenceableLoader loader1 =\n new FakeSequenceableLoader(/* bufferedPositionUs */ 1000, /* nextLoadPositionUs */ 2000);\n FakeSequenceableLoader loader2 =\n new FakeSequenceableL...
{ "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_176
{ "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 testDecodeTypical() throws IOException {\n SsaDecoder decoder = new SsaDecoder();\n byte[] bytes = TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), TYPICAL);\n SsaSubtitle subtitle = decoder.decode(bytes, bytes.length, false);\n\n assertThat(subtitle.getEv...
{ "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_199
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java", "identifier": "WebvttCueParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseMultipleTagsOfSameKind() {\n Spanned text = parseCueText(\"blah <b>blah</b> blah <b>foo</b>\");\n\n assertThat(text.toString()).isEqualTo(\"blah blah blah foo\");\n StyleSpan[] spans = getSpans(text, StyleSpan.class);\n assertThat(spans).hasLength(2);\n assertTh...
{ "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_463
{ "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_emptyQueue_returnsNoValue() {\n int[] bitrates =\n TrackSelectionUtil.getBitratesUsingPastInfo(\n Collections.emptyList(),\n new Format[] {createFormatWithBitrate(10)},\n MAX_DURATION_US,\n /* 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_434
{ "fields": [ { "declarator": "offlineLicenseHelper", "modifier": "private", "original_string": "private OfflineLicenseHelper<?> offlineLicenseHelper;", "type": "OfflineLicenseHelper<?>", "var_name": "offlineLicenseHelper" }, { "declarator": "mediaDrmCallback", "m...
{ "body": "@Test\n public void testDownloadLicenseFailsIfNullInitData() throws Exception {\n try {\n offlineLicenseHelper.downloadLicense(null);\n fail();\n } catch (IllegalArgumentException e) {\n // Expected.\n }\n }", "class_method_signature": "OfflineLicenseHelperTest.testDownloadLicen...
{ "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_208
{ "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 testDecodeJustText() throws IOException, SubtitleDecoderException {\n Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList());\n byte[] bytes =\n TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), SAMPLE_JUST_TEXT);\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_160
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtilTest.java", "identifier": "TtmlRenderUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testResolveStyleSingleReferentialStyle() {\n Map<String, TtmlStyle> globalStyles = getGlobalStyles();\n String[] styleIds = {\"s0\"};\n\n assertThat(TtmlRenderUtil.resolveStyle(null, styleIds, globalStyles))\n .isSameAs(globalStyles.get(\"s0\"));\n }", "class_method_...
{ "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_475
{ "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_noPastInfo_returnsBitratesUsingOnlyFutureInfo() {\n FakeMediaChunkIterator iterator1 =\n new FakeMediaChunkIterator(\n /* chunkTimeBoundariesSec= */ new long[] {0, 10}, /* chunkLengths= */ new long[] {10});\n FakeMediaChunkItera...
{ "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_394
{ "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 testLoadTwoActions() throws Exception {\n ActionFile actionFile = getActionFile(\"offline/action_file_two_actions.exi\");\n DownloadRequest[] actions = actionFile.load();\n assertThat(actions).hasLength(2);\n assertThat(actions[0]).isEqualTo(expectedAction1);\n assertTha...
{ "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_93
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testListBinarySearchFloor() {\n List<Integer> values = new ArrayList<>();\n assertThat(binarySearchFloor(values, 0, false, false)).isEqualTo(-1);\n assertThat(binarySearchFloor(values, 0, false, true)).isEqualTo(0);\n\n values.add(1);\n values.add(3);\n values.add(5);...
{ "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_402
{ "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 setSingleDownloadStopReasonThenRemove_removesDownload() throws Throwable {\n DownloadRunner runner = new DownloadRunner(uri1).postDownloadRequest();\n TaskWrapper task = runner.getTask();\n\n task.assertDownloading();\n\n runOnMainThread(() -> downloadManager.setStopReason(...
{ "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_117
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/MimeTypesTest.java", "identifier": "MimeTypesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetMediaMimeType_fromValidCodecs_returnsCorrectMimeType() {\n assertThat(MimeTypes.getMediaMimeType(\"avc1\")).isEqualTo(MimeTypes.VIDEO_H264);\n assertThat(MimeTypes.getMediaMimeType(\"avc1.42E01E\")).isEqualTo(MimeTypes.VIDEO_H264);\n assertThat(MimeTypes.getMediaMimeTyp...
{ "fields": [ { "declarator": "BASE_TYPE_VIDEO = \"video\"", "modifier": "public static final", "original_string": "public static final String BASE_TYPE_VIDEO = \"video\";", "type": "String", "var_name": "BASE_TYPE_VIDEO" }, { "declarator": "BASE_TYPE_AUDIO = \"audio\""...
{ "body": "public static @Nullable String getMediaMimeType(@Nullable String codec) {\n if (codec == null) {\n return null;\n }\n codec = Util.toLowerInvariant(codec.trim());\n if (codec.startsWith(\"avc1\") || codec.startsWith(\"avc3\")) {\n return MimeTypes.VIDEO_H264;\n } else if (codec.sta...
{ "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_269
{ "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 testCacheThrowEOFException() 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 DataSpec(tes...
{ "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_455
{ "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_noIterator_returnsEmptyArray() {\n assertThat(\n TrackSelectionUtil.getBitratesUsingFutureInfo(\n new MediaChunkIterator[0], new Format[0], MAX_DURATION_US, /* bitrates= */ null))\n .hasLength(0);\n }", "class_method_sig...
{ "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" }
133447770_510
{ "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 testMapping() throws ExoPlaybackException {\n FakeMappingTrackSelector trackSelector = new FakeMappingTrackSelector();\n trackSelector.selectTracks(RENDERER_CAPABILITIES, TRACK_GROUPS, periodId, TIMELINE);\n trackSelector.assertMappedTrackGroups(0, VIDEO_TRACK_GROUP);\n tra...
{ "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_290
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/upstream/BaseDataSourceTest.java", "identifier": "BaseDataSourceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void dataTransfer_withLocalSource_isReported() throws IOException {\n TestSource testSource = new TestSource(/* isNetwork= */ false);\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_443
{ "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 public void testParcelable() {\n DrmInitData drmInitDataToParcel = new DrmInitData(DATA_1, DATA_2);\n\n Parcel parcel = Parcel.obtain();\n drmInitDataToParcel.writeToParcel(parcel, 0);\n parcel.setDataPosition(0);\n\n DrmInitData drmInitDataFromParcel = DrmInitData.CREATOR.createFro...
{ "fields": [ { "declarator": "schemeDatas", "modifier": "private final", "original_string": "private final SchemeData[] schemeDatas;", "type": "SchemeData[]", "var_name": "schemeDatas" }, { "declarator": "hashCode", "modifier": "private", "original_string":...
{ "body": "@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(schemeType);\n dest.writeTypedArray(schemeDatas, 0);\n }", "class_method_signature": "DrmInitData.writeToParcel(Parcel dest, int flags)", "constructor": false, "full_signature": "@Override public void writeToPa...
{ "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_156
{ "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 testShouldContinueLoadingWithMinBufferReached_inFastPlayback() {\n createDefaultLoadControl();\n\n // At normal playback speed, we stop buffering when the buffer reaches the minimum.\n assertThat(loadControl.shouldContinueLoading(MIN_BUFFER_US, SPEED)).isFalse();\n\n // At ...
{ "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_506
{ "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_futureMaxDurationSet_returnsEstimateUsingFutureChunks() {\n WindowedTrackBitrateEstimator estimator =\n new WindowedTrackBitrateEstimator(\n /* maxPastDurationMs= */ 0, MAX_DURATION_MS, /* useFormatBitrateAsLowerBound= */ false);\n MediaChunk chunk =...
{ "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_5
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/extractor/ogg/VorbisUtilTest.java", "identifier": "VorbisUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testVerifyVorbisHeaderCapturePatternInvalidHeader() {\n ParsableByteArray header = new ParsableByteArray(\n new byte[] {0x01, 'v', 'o', 'r', 'b', 'i', 's'});\n try {\n VorbisUtil.verifyVorbisHeaderCapturePattern(0x99, header, false);\n fail();\n } catch (Parse...
{ "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_85
{ "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 testSkipBitsByteAligned() {\n testArray.skipBits(16);\n assertReadBitsToEnd(16);\n }", "class_method_signature": "ParsableBitArrayTest.testSkipBitsByteAligned()", "constructor": false, "full_signature": "@Test public void testSkipBitsByteAligned()", "identifier": "testSk...
{ "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 skipBits(int numBits) {\n int numBytes = numBits / 8;\n byteOffset += numBytes;\n bitOffset += numBits - (numBytes * 8);\n if (bitOffset > 7) {\n byteOffset++;\n bitOffset -= 8;\n }\n assertValidOffset();\n }", "class_method_signature": "ParsableBitArray.skipBits(...
{ "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_228
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/metadata/emsg/EventMessageTest.java", "identifier": "EventMessageTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEventMessageParcelable() {\n EventMessage eventMessage =\n new EventMessage(\"urn:test\", \"123\", 3000, 1000403, new byte[] {0, 1, 2, 3, 4});\n // Write to parcel.\n Parcel parcel = Parcel.obtain();\n eventMessage.writeToParcel(parcel, 0);\n // Create from pa...
{ "fields": [ { "declarator": "schemeIdUri", "modifier": "public final", "original_string": "public final String schemeIdUri;", "type": "String", "var_name": "schemeIdUri" }, { "declarator": "value", "modifier": "public final", "original_string": "public fin...
{ "body": "@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(schemeIdUri);\n dest.writeString(value);\n dest.writeLong(durationMs);\n dest.writeLong(id);\n dest.writeByteArray(messageData);\n }", "class_method_signature": "EventMessage.writeToParcel(Parcel dest, int...
{ "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_382
{ "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 testDiscardUpstreamMulti() {\n writeTestData();\n sampleQueue.discardUpstreamSamples(4);\n assertAllocationCount(4);\n sampleQueue.discardUpstreamSamples(0);\n assertAllocationCount(0);\n assertReadFormat(false, FORMAT_2);\n assertNoSamplesToRead(FORMAT_2);\n }", ...
{ "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_414
{ "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 putDownload_setsVersion() throws DatabaseIOException {\n SQLiteDatabase readableDatabase = databaseProvider.getReadableDatabase();\n assertThat(VersionTable.getVersion(readableDatabase, VersionTable.FEATURE_OFFLINE, EMPTY_NAME))\n .isEqualTo(VersionTable.VERSION_UNSET);\n\...
{ "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 putDownload(Download download) throws DatabaseIOException {\n ensureInitialized();\n ContentValues values = new ContentValues();\n values.put(COLUMN_ID, download.request.id);\n values.put(COLUMN_TYPE, download.request.type);\n values.put(COLUMN_URI, download.request....
{ "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_101
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @Config(sdk = 21)\n public void testNormalizeLanguageCodeV21() {\n assertThat(Util.normalizeLanguageCode(\"es\")).isEqualTo(\"spa\");\n assertThat(Util.normalizeLanguageCode(\"spa\")).isEqualTo(\"spa\");\n assertThat(Util.normalizeLanguageCode(\"es-AR\")).isEqualTo(\"spa-ar\");\n asse...
{ "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 @PolyNull String normalizeLanguageCode(@PolyNull String language) {\n if (language == null) {\n return null;\n }\n try {\n Locale locale = getLocaleForLanguageTag(language);\n int localeLanguageLength = locale.getLanguage().length();\n String normLanguage = locale...
{ "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_316
{ "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_for4G_whileConnectedToOtherNetwork_doesNotSetInitialEstimate() {\n setActiveNetworkInfo(networkInfoWifi);\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_480
{ "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 testSelectTracksWithNoSampleRenderer() throws ExoPlaybackException {\n TrackSelectorResult result =\n trackSelector.selectTracks(\n RENDERER_CAPABILITIES_WITH_NO_SAMPLE_RENDERER, TRACK_GROUPS, periodId, TIMELINE);\n assertSelections(result, TRACK_SELECTIONS_WITH...
{ "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_195
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java", "identifier": "WebvttCueParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseEntitiesNotTerminated() throws Exception {\n Spanned text = parseCueText(\"&amp here comes text\");\n assertThat(text.toString()).isEqualTo(\"& here comes text\");\n }", "class_method_signature": "WebvttCueParserTest.testParseEntitiesNotTerminated()", "constructor":...
{ "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_341
{ "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 testCustomCallbackBeforePreparationAddSingle() {\n ConditionVariable runnableInvoked = new ConditionVariable();\n\n DummyMainThread dummyMainThread = new DummyMainThread();\n dummyMainThread.runOnMainThread(\n () ->\n mediaSource.addMediaSource(\n ...
{ "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_204
{ "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 testSimpleSubtitleText() {\n // Test before first subtitle\n assertSingleCueEmpty(simpleSubtitle.getCues(0));\n assertSingleCueEmpty(simpleSubtitle.getCues(500000));\n assertSingleCueEmpty(simpleSubtitle.getCues(999999));\n\n // Test first subtitle\n assertSingleCueTe...
{ "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_357
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/source/CompositeSequenceableLoaderTest.java", "identifier": "CompositeSequenceableLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetBufferedPositionUsReturnsMinimumLoaderBufferedPosition() {\n FakeSequenceableLoader loader1 =\n new FakeSequenceableLoader(/* bufferedPositionUs */ 1000, /* nextLoadPositionUs */ 2000);\n FakeSequenceableLoader loader2 =\n new FakeSequenceableLoader(/* buffer...
{ "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 getBufferedPositionUs() {\n long bufferedPositionUs = Long.MAX_VALUE;\n for (SequenceableLoader loader : loaders) {\n long loaderBufferedPositionUs = loader.getBufferedPositionUs();\n if (loaderBufferedPositionUs != C.TIME_END_OF_SOURCE) {\n bufferedPos...
{ "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_50
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/extractor/mp4/PsshAtomUtilTest.java", "identifier": "PsshAtomUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildPsshAtom() {\n byte[] schemeData = new byte[]{0, 1, 2, 3, 4, 5};\n byte[] psshAtom = PsshAtomUtil.buildPsshAtom(C.WIDEVINE_UUID, schemeData);\n // Read the PSSH atom back and assert its content is as expected.\n ParsableByteArray parsablePsshAtom = new ParsableByte...
{ "fields": [ { "declarator": "TAG = \"PsshAtomUtil\"", "modifier": "private static final", "original_string": "private static final String TAG = \"PsshAtomUtil\";", "type": "String", "var_name": "TAG" } ], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2...
{ "body": "public static byte[] buildPsshAtom(UUID systemId, @Nullable byte[] data) {\n return buildPsshAtom(systemId, null, data);\n }", "class_method_signature": "PsshAtomUtil.buildPsshAtom(UUID systemId, @Nullable byte[] data)", "constructor": false, "full_signature": "public static byte[] buildPsshAtom(...
{ "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_212
{ "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 testDecodeUtf16LeNoStyl() throws IOException, SubtitleDecoderException {\n Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList());\n byte[] bytes =\n TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), SAMPLE_UTF16_LE_NO_STYL);\n Subtitle subtitle...
{ "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_300
{ "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_forWifi_forFastCountry_isGreaterThanEstimateForSlowCountry() {\n setActiveNetworkInfo(networkInfoWifi);\n setNetworkCountryIso(FAST_COUNTRY_ISO);\n DefaultBandwidthMeter bandwidthMeterFast =\n new DefaultBandwidthMeter.Builder(Applic...
{ "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_496
{ "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 testSelectTracksExceedingCapabilitiesPreferLowerNumChannelBeforeSampleRate()\n throws Exception {\n Format lowerChannelHigherSampleRateFormat =\n Format.createAudioSampleFormat(\"audioFormat\", MimeTypes.AUDIO_AAC, null, Format.NO_VALUE,\n Format.NO_VALUE, 2, ...
{ "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_183
{ "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 testTwoCuesSample() throws SubtitleDecoderException {\n Mp4WebvttDecoder decoder = new Mp4WebvttDecoder();\n Subtitle result = decoder.decode(DOUBLE_CUE_SAMPLE, DOUBLE_CUE_SAMPLE.length, false);\n Cue firstExpectedCue = new Cue(\"Hello World\");\n Cue secondExpectedCue = ne...
{ "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_479
{ "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 getBitratesUsingPastAndFutureInfo_estimatesLowerAndUseFormatBitrateAsLowerBoundTrue_returnsBitratesOfFormats() {\n FakeMediaChunk chunk =\n createChunk(\n createFormatWithBitrate(10),\n /* length= */ 10,\n /* startTimeSec= */ 0,\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": "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_378
{ "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 testAdvanceToAfterBuffer() {\n writeTestData();\n int skipCount = sampleQueue.advanceTo(LAST_SAMPLE_TIMESTAMP + 1, true, false);\n // Should fail and have no effect.\n assertThat(skipCount).isEqualTo(ADVANCE_FAILED);\n assertReadTestData();\n assertNoSamplesToRead(FOR...
{ "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 int advanceTo(long timeUs, boolean toKeyframe, boolean allowTimeBeyondBuffer) {\n return metadataQueue.advanceTo(timeUs, toKeyframe, allowTimeBeyondBuffer);\n }", "class_method_signature": "SampleQueue.advanceTo(long timeUs, boolean toKeyframe, boolean allowTimeBeyondBuffer)", "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_90
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSubtrackWithOverflowDefault() {\n long res = Util.subtractWithOverflowDefault(5, 10, /* overflowResult= */ 0);\n assertThat(res).isEqualTo(-5);\n\n res = Util.subtractWithOverflowDefault(Long.MIN_VALUE + 1, 1, /* overflowResult= */ 12345);\n assertThat(res).isEqualTo(Lo...
{ "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 long subtractWithOverflowDefault(long x, long y, long overflowResult) {\n long result = x - y;\n // See Hacker's Delight 2-13 (H. Warren Jr).\n if (((x ^ y) & (x ^ result)) < 0) {\n return overflowResult;\n }\n return result;\n }", "class_method_signature": "Util.subtra...
{ "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_397
{ "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 postRemoveRequest_removes() throws Throwable {\n DownloadRunner runner = new DownloadRunner(uri1);\n TaskWrapper task = runner.postDownloadRequest().postRemoveRequest().getTask();\n task.assertRemoving();\n runner.getDownloader(1).unblock().assertReleased().assertStartCount...
{ "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 List<Download> getCurrentDownloads() {\n return downloads;\n }", "class_method_signature": "DownloadManager.getCurrentDownloads()", "constructor": false, "full_signature": "public List<Download> getCurrentDownloads()", "identifier": "getCurrentDownloads", "invocations": [], "modifier...
{ "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_401
{ "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 setAndClearSingleDownloadStopReason() throws Throwable {\n DownloadRunner runner = new DownloadRunner(uri1).postDownloadRequest();\n TaskWrapper task = runner.getTask();\n\n task.assertDownloading();\n\n runOnMainThread(() -> downloadManager.setStopReason(task.taskId, APP_S...
{ "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_143
{ "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 testReadSingleLineWithEndingLf() {\n byte[] bytes = new byte[] {\n 'f', 'o', 'o', '\\n'\n };\n ParsableByteArray parser = new ParsableByteArray(bytes);\n assertThat(parser.readLine()).isEqualTo(\"foo\");\n assertThat(parser.readLine()).isNull();\n }", "class_meth...
{ "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_456
{ "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_emptyIterator_returnsNoValue() {\n int[] bitrates =\n TrackSelectionUtil.getBitratesUsingFutureInfo(\n new MediaChunkIterator[] {MediaChunkIterator.EMPTY},\n new Format[] {createFormatWithBitrate(10)},\n MAX_DURATION...
{ "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" }
133447770_293
{ "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_forWifi_isGreaterThanEstimateFor3G() {\n setActiveNetworkInfo(networkInfoWifi);\n DefaultBandwidthMeter bandwidthMeterWifi =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext()).build();\n long initialEstimateWif...
{ "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_6
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/extractor/ogg/VorbisUtilTest.java", "identifier": "VorbisUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testVerifyVorbisHeaderCapturePatternInvalidHeaderQuite() throws ParserException {\n ParsableByteArray header = new ParsableByteArray(\n new byte[] {0x01, 'v', 'o', 'r', 'b', 'i', 's'});\n assertThat(verifyVorbisHeaderCapturePattern(0x99, header, true)).isFalse();\n }", ...
{ "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_155
{ "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 testShouldNeverContinueLoading_ifMaxBufferReachedAndNotPrioritizeTimeOverSize() {\n builder.setPrioritizeTimeOverSizeThresholds(false);\n createDefaultLoadControl();\n // Put loadControl in buffering state.\n assertThat(loadControl.shouldContinueLoading(/* bufferedDurationU...
{ "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_505
{ "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_zeroMaxDuration_returnsFormatBitrates() {\n WindowedTrackBitrateEstimator estimator =\n new WindowedTrackBitrateEstimator(\n /* maxPastDurationMs= */ 0,\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_69
{ "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 testGetSeekPointsAtStartOfStream() {\n SeekPoints seekPoints = seeker.getSeekPoints(0);\n SeekPoint seekPoint = seekPoints.first;\n assertThat(seekPoint).isEqualTo(seekPoints.second);\n assertThat(seekPoint.timeUs).isEqualTo(0);\n assertThat(seekPoint.position).isEqualTo...
{ "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 SeekPoints getSeekPoints(long timeUs) {\n if (!isSeekable()) {\n return new SeekPoints(new SeekPoint(0, dataStartPosition + xingFrameSize));\n }\n timeUs = Util.constrainValue(timeUs, 0, durationUs);\n double percent = (timeUs * 100d) / durationUs;\n double scaledPos...
{ "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_381
{ "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 testDiscardUpstream() {\n writeTestData();\n sampleQueue.discardUpstreamSamples(8);\n assertAllocationCount(10);\n sampleQueue.discardUpstreamSamples(7);\n assertAllocationCount(9);\n sampleQueue.discardUpstreamSamples(6);\n assertAllocationCount(7);\n sampleQue...
{ "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_86
{ "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 testSkipBitsNonByteAligned() {\n testArray.skipBits(5);\n assertReadBitsToEnd(5);\n }", "class_method_signature": "ParsableBitArrayTest.testSkipBitsNonByteAligned()", "constructor": false, "full_signature": "@Test public void testSkipBitsNonByteAligned()", "identifier": ...
{ "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 skipBits(int numBits) {\n int numBytes = numBits / 8;\n byteOffset += numBytes;\n bitOffset += numBits - (numBytes * 8);\n if (bitOffset > 7) {\n byteOffset++;\n bitOffset -= 8;\n }\n assertValidOffset();\n }", "class_method_signature": "ParsableBitArray.skipBits(...
{ "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_102
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @Config(sdk = 16)\n public void testNormalizeLanguageCode() {\n assertThat(Util.normalizeLanguageCode(\"es\")).isEqualTo(\"spa\");\n assertThat(Util.normalizeLanguageCode(\"spa\")).isEqualTo(\"spa\");\n assertThat(Util.normalizeLanguageCode(\"es-AR\")).isEqualTo(\"es-ar\");\n assertTh...
{ "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 @PolyNull String normalizeLanguageCode(@PolyNull String language) {\n if (language == null) {\n return null;\n }\n try {\n Locale locale = getLocaleForLanguageTag(language);\n int localeLanguageLength = locale.getLanguage().length();\n String normLanguage = locale...
{ "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_417
{ "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 getTrackGroups_returnsTrackGroups() throws Exception {\n prepareDownloadHelper(downloadHelper);\n\n TrackGroupArray trackGroupArrayPeriod0 = downloadHelper.getTrackGroups(/* periodIndex= */ 0);\n TrackGroupArray trackGroupArrayPeriod1 = downloadHelper.getTrackGroups(/* periodI...
{ "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": "public TrackGroupArray getTrackGroups(int periodIndex) {\n assertPreparedWithMedia();\n return trackGroupArrays[periodIndex];\n }", "class_method_signature": "DownloadHelper.getTrackGroups(int periodIndex)", "constructor": false, "full_signature": "public TrackGroupArray getTrackGroups(int per...
{ "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_315
{ "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_for4G_whileConnectedTo4G_setsInitialEstimate() {\n setActiveNetworkInfo(networkInfo4g);\n DefaultBandwidthMeter bandwidthMeter =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext())\n .setInitialBitrate...
{ "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_196
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java", "identifier": "WebvttCueParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseEntitiesNotTerminatedUnsupported() throws Exception {\n Spanned text = parseCueText(\"&surenot here comes text\");\n assertThat(text.toString()).isEqualTo(\" here comes text\");\n }", "class_method_signature": "WebvttCueParserTest.testParseEntitiesNotTerminatedUnsuppo...
{ "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_483
{ "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 testSetParameterWithSameParametersDoesNotNotifyInvalidationListenerAgain()\n throws Exception {\n ParametersBuilder builder = Parameters.DEFAULT.buildUpon().setPreferredAudioLanguage(\"eng\");\n trackSelector.setParameters(builder.build());\n trackSelector.setParameters(b...
{ "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_179
{ "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 testDecodeNoEndTimecodes() throws IOException {\n SsaDecoder decoder = new SsaDecoder();\n byte[] bytes =\n TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), NO_END_TIMECODES);\n SsaSubtitle subtitle = decoder.decode(bytes, bytes.length, false);\n\n ...
{ "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_207
{ "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 testDecodeNoSubtitle() throws IOException, SubtitleDecoderException {\n Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList());\n byte[] bytes = TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), NO_SUBTITLE);\n Subtitle subtitle = decoder.decode(bytes,...
{ "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_342
{ "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 testCustomCallbackBeforePreparationAddMultiple() {\n ConditionVariable runnableInvoked = new ConditionVariable();\n\n DummyMainThread dummyMainThread = new DummyMainThread();\n dummyMainThread.runOnMainThread(\n () ->\n mediaSource.addMediaSources(\n ...
{ "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_211
{ "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 testDecodeUtf16BeNoStyl() throws IOException, SubtitleDecoderException {\n Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList());\n byte[] bytes =\n TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), SAMPLE_UTF16_BE_NO_STYL);\n Subtitle subtitle...
{ "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_354
{ "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 testChildSourceWithLazyPreparationOnlyPreparesSourceOnce() throws IOException {\n FakeMediaSource[] childSources = createMediaSources(/* count= */ 2);\n mediaSource =\n new ConcatenatingMediaSource(\n /* isAtomic= */ false,\n /* useLazyPreparation= */...
{ "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": "@Override\n public final MediaPeriod createPeriod(\n MediaPeriodId id, Allocator allocator, long startPositionUs) {\n Object mediaSourceHolderUid = getMediaSourceHolderUid(id.periodUid);\n MediaSourceHolder holder = mediaSourceByUid.get(mediaSourceHolderUid);\n if (holder == null) {\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_303
{ "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_for3G_forFastCountry_isGreaterThanEstimateForSlowCountry() {\n setActiveNetworkInfo(networkInfo3g);\n setNetworkCountryIso(FAST_COUNTRY_ISO);\n DefaultBandwidthMeter bandwidthMeterFast =\n new DefaultBandwidthMeter.Builder(Applicatio...
{ "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_180
{ "fields": [ { "declarator": "parser", "modifier": "private", "original_string": "private CssParser parser;", "type": "CssParser", "var_name": "parser" } ], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/CssParserTest.java", "identifier":...
{ "body": "@Test\n public void testGetNextToken() {\n String stringInput = \" lorem:ipsum\\n{dolor}#sit,amet;lorem:ipsum\\r\\t\\f\\ndolor(())\\n\";\n ParsableByteArray input = new ParsableByteArray(Util.getUtf8Bytes(stringInput));\n StringBuilder builder = new StringBuilder();\n assertThat(parseNextToken...
{ "fields": [ { "declarator": "PROPERTY_BGCOLOR = \"background-color\"", "modifier": "private static final", "original_string": "private static final String PROPERTY_BGCOLOR = \"background-color\";", "type": "String", "var_name": "PROPERTY_BGCOLOR" }, { "declarator": "P...
{ "body": "static String parseNextToken(ParsableByteArray input, StringBuilder stringBuilder) {\n skipWhitespaceAndComments(input);\n if (input.bytesLeft() == 0) {\n return null;\n }\n String identifier = parseIdentifier(input, stringBuilder);\n if (!\"\".equals(identifier)) {\n return identi...
{ "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_495
{ "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 testSelectTracksExceedingCapabilitiesSelectLowerBitrate()\n throws Exception {\n Format lowerBitrateFormat =\n Format.createAudioSampleFormat(\"audioFormat\", MimeTypes.AUDIO_AAC, null, 15000,\n Format.NO_VALUE, 2, 44100, null, null, 0, null);\n Format high...
{ "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_118
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/MimeTypesTest.java", "identifier": "MimeTypesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetMimeTypeFromMp4ObjectType_forValidObjectType_returnsCorrectMimeType() {\n assertThat(MimeTypes.getMimeTypeFromMp4ObjectType(0x60)).isEqualTo(MimeTypes.VIDEO_MPEG2);\n assertThat(MimeTypes.getMimeTypeFromMp4ObjectType(0x61)).isEqualTo(MimeTypes.VIDEO_MPEG2);\n assertThat...
{ "fields": [ { "declarator": "BASE_TYPE_VIDEO = \"video\"", "modifier": "public static final", "original_string": "public static final String BASE_TYPE_VIDEO = \"video\";", "type": "String", "var_name": "BASE_TYPE_VIDEO" }, { "declarator": "BASE_TYPE_AUDIO = \"audio\""...
{ "body": "@Nullable\n public static String getMimeTypeFromMp4ObjectType(int objectType) {\n switch (objectType) {\n case 0x20:\n return MimeTypes.VIDEO_MP4V;\n case 0x21:\n return MimeTypes.VIDEO_H264;\n case 0x23:\n return MimeTypes.VIDEO_H265;\n case 0x60:\n case 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_374
{ "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 testAdvanceToEnd() {\n writeTestData();\n sampleQueue.advanceToEnd();\n assertAllocationCount(10);\n sampleQueue.discardToRead();\n assertAllocationCount(0);\n // Despite skipping all samples, we should still read the last format, since this is the\n // expected fo...
{ "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 int advanceToEnd() {\n return metadataQueue.advanceToEnd();\n }", "class_method_signature": "SampleQueue.advanceToEnd()", "constructor": false, "full_signature": "public int advanceToEnd()", "identifier": "advanceToEnd", "invocations": [ "advanceToEnd" ], "modifiers": "public",...
{ "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_231
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/metadata/emsg/EventMessageEncoderTest.java", "identifier": "EventMessageEncoderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEncodeDecodeEventStream() throws IOException {\n EventMessage expectedEmsg =\n new EventMessage(\"urn:test\", \"123\", 3000, 1000403, new byte[] {0, 1, 2, 3, 4});\n byte[] encodedByteArray = new EventMessageEncoder().encode(expectedEmsg);\n MetadataInputBuffer buffe...
{ "fields": [ { "declarator": "byteArrayOutputStream", "modifier": "private final", "original_string": "private final ByteArrayOutputStream byteArrayOutputStream;", "type": "ByteArrayOutputStream", "var_name": "byteArrayOutputStream" }, { "declarator": "dataOutputStream...
{ "body": "@Nullable\n public byte[] encode(EventMessage eventMessage) {\n byteArrayOutputStream.reset();\n try {\n writeNullTerminatedString(dataOutputStream, eventMessage.schemeIdUri);\n String nonNullValue = eventMessage.value != null ? eventMessage.value : \"\";\n writeNullTerminatedString(d...
{ "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_323
{ "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 @Config(maxSdk = 25)\n public void setAudioAttributes_withNullUsage_releasesAudioFocus() {\n // Create attributes and request audio focus.\n AudioAttributes media = new AudioAttributes.Builder().setUsage(C.USAGE_MEDIA).build();\n Shadows.shadowOf(audioManager)\n .setNextFocusReque...
{ "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_266
{ "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 testCacheUnknownLength() throws Exception {\n FakeDataSet fakeDataSet = new FakeDataSet().newData(\"test_data\")\n .setSimulateUnknownLength(true)\n .appendReadData(TestUtil.buildTestData(100)).endData();\n FakeDataSource dataSource = new FakeDataSource(fakeDataSet)...
{ "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_509
{ "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_bitratesArrayGiven_returnsTheSameArray() {\n WindowedTrackBitrateEstimator estimator =\n new WindowedTrackBitrateEstimator(\n MAX_DURATION_MS, MAX_DURATION_MS, /* useFormatBitrateAsLowerBound= */ true);\n MediaChunk chunk = createMediaChunk(/* format...
{ "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_32
{ "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 testLargeSkip() throws Exception {\n FakeDataSource testDataSource = buildLargeDataSource();\n DefaultExtractorInput input = new DefaultExtractorInput(testDataSource, 0, C.LENGTH_UNSET);\n // Check that skipping the entire data source succeeds.\n int bytesToSkip = LARGE_TES...
{ "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 skip(int length) throws IOException, InterruptedException {\n int bytesSkipped = skipFromPeekBuffer(length);\n if (bytesSkipped == 0) {\n bytesSkipped =\n readFromDataSource(scratchSpace, 0, Math.min(length, scratchSpace.length), 0, true);\n }\n commitBytes...
{ "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_335
{ "fields": [ { "declarator": "CHANNEL_COUNT_MONO = 1", "modifier": "private static final", "original_string": "private static final int CHANNEL_COUNT_MONO = 1;", "type": "int", "var_name": "CHANNEL_COUNT_MONO" }, { "declarator": "CHANNEL_COUNT_STEREO = 2", "modif...
{ "body": "@Config(minSdk = OLDEST_SDK, maxSdk = 20)\n @Test\n public void doesNotSupportFloatOutputBeforeApi21() {\n assertThat(defaultAudioSink.supportsOutput(CHANNEL_COUNT_STEREO, C.ENCODING_PCM_FLOAT))\n .isFalse();\n }", "class_method_signature": "DefaultAudioSinkTest.doesNotSupportFloatOutputBefo...
{ "fields": [ { "declarator": "MIN_BUFFER_DURATION_US = 250000", "modifier": "private static final", "original_string": "private static final long MIN_BUFFER_DURATION_US = 250000;", "type": "long", "var_name": "MIN_BUFFER_DURATION_US" }, { "declarator": "MAX_BUFFER_DURA...
{ "body": "@Override\n public boolean supportsOutput(int channelCount, @C.Encoding int encoding) {\n if (Util.isEncodingLinearPcm(encoding)) {\n // AudioTrack supports 16-bit integer PCM output in all platform API versions, and float\n // output from platform API version 21 only. Other integer PCM encod...
{ "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_270
{ "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 testCachePolling() throws Exception {\n final CachingCounters counters = new CachingCounters();\n FakeDataSet fakeDataSet =\n new FakeDataSet()\n .newData(\"test_data\")\n .appendReadData(TestUtil.buildTestData(100))\n .appendReadAction(() ...
{ "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_362
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/source/CompositeSequenceableLoaderTest.java", "identifier": "CompositeSequenceableLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetNextLoadPositionUsReturnsEndOfSourceWhenAllLoaderLoadingLastChunk() {\n FakeSequenceableLoader loader1 =\n new FakeSequenceableLoader(\n /* bufferedPositionUs */ 1000, /* nextLoadPositionUs */ C.TIME_END_OF_SOURCE);\n FakeSequenceableLoader loader2 =\n ...
{ "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_227
{ "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 enableRendererMediaClockWithFixedButSamePlaybackParameters_shouldNotTriggerCallback()\n throws ExoPlaybackException {\n FakeMediaClockRenderer mediaClockRenderer = new MediaClockRenderer(PlaybackParameters.DEFAULT,\n /* playbackParametersAreMutable= */ false);\n media...
{ "fields": [ { "declarator": "standaloneMediaClock", "modifier": "private final", "original_string": "private final StandaloneMediaClock standaloneMediaClock;", "type": "StandaloneMediaClock", "var_name": "standaloneMediaClock" }, { "declarator": "listener", "mod...
{ "body": "public void onRendererEnabled(Renderer renderer) throws ExoPlaybackException {\n MediaClock rendererMediaClock = renderer.getMediaClock();\n if (rendererMediaClock != null && rendererMediaClock != rendererClock) {\n if (rendererClock != null) {\n throw ExoPlaybackException.createForUnexpe...
{ "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_460
{ "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_emptyIterator_returnsEstimationUsingClosest() {\n FakeMediaChunkIterator iterator1 =\n new FakeMediaChunkIterator(\n /* chunkTimeBoundariesSec= */ new long[] {0, 5}, /* chunkLengths= */ new long[] {10});\n Format format1 = createFormat...
{ "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" }
133447770_175
{ "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 testDecodeEmpty() throws IOException {\n SsaDecoder decoder = new SsaDecoder();\n byte[] bytes = TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), EMPTY);\n SsaSubtitle subtitle = decoder.decode(bytes, bytes.length, false);\n\n assertThat(subtitle.getEventT...
{ "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_319
{ "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_forCountry_usesDefaultValuesForCountry() {\n setNetworkCountryIso(SLOW_COUNTRY_ISO);\n DefaultBandwidthMeter bandwidthMeterSlow =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext()).build();\n long initialEsti...
{ "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_437
{ "fields": [ { "declarator": "offlineLicenseHelper", "modifier": "private", "original_string": "private OfflineLicenseHelper<?> offlineLicenseHelper;", "type": "OfflineLicenseHelper<?>", "var_name": "offlineLicenseHelper" }, { "declarator": "mediaDrmCallback", "m...
{ "body": "@Test\n public void testGetLicenseDurationRemainingSec() throws Exception {\n long licenseDuration = 1000;\n int playbackDuration = 200;\n setStubLicenseAndPlaybackDurationValues(licenseDuration, playbackDuration);\n setDefaultStubKeySetId();\n\n byte[] offlineLicenseKeySetId = offlineLicen...
{ "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 Pair<Long, Long> getLicenseDurationRemainingSec(byte[] offlineLicenseKeySetId)\n throws DrmSessionException {\n Assertions.checkNotNull(offlineLicenseKeySetId);\n DrmSession<T> drmSession =\n openBlockingKeyRequest(\n DefaultDrmSessionManager.MODE_QUERY, off...
{ "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_358
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/source/CompositeSequenceableLoaderTest.java", "identifier": "CompositeSequenceableLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetBufferedPositionUsReturnsMinimumNonEndOfSourceLoaderBufferedPosition() {\n FakeSequenceableLoader loader1 =\n new FakeSequenceableLoader(/* bufferedPositionUs */ 1000, /* nextLoadPositionUs */ 2000);\n FakeSequenceableLoader loader2 =\n new FakeSequenceableLo...
{ "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 getBufferedPositionUs() {\n long bufferedPositionUs = Long.MAX_VALUE;\n for (SequenceableLoader loader : loaders) {\n long loaderBufferedPositionUs = loader.getBufferedPositionUs();\n if (loaderBufferedPositionUs != C.TIME_END_OF_SOURCE) {\n bufferedPos...
{ "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_476
{ "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_noFutureInfo_returnsBitratesUsingOnlyPastInfo() {\n FakeMediaChunk chunk =\n createChunk(\n createFormatWithBitrate(10),\n /* length= */ 10,\n /* startTimeSec= */ 0,\n /* endTimeSec= */ 10);\n\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": "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_499
{ "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 testSelectTracksWithMultipleAudioTracks() throws Exception {\n TrackGroupArray trackGroups = singleTrackGroup(buildAudioFormat(\"0\"), buildAudioFormat(\"1\"));\n TrackSelectorResult result =\n trackSelector.selectTracks(\n new RendererCapabilities[] {AUDIO_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_163
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtilTest.java", "identifier": "TtmlRenderUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testResolveMergeMultipleReferentialStylesIntoInlineStyle() {\n Map<String, TtmlStyle> globalStyles = getGlobalStyles();\n String[] styleIds = {\"s0\", \"s1\"};\n TtmlStyle style = new TtmlStyle();\n style.setBackgroundColor(Color.YELLOW);\n\n TtmlStyle resolved = TtmlRen...
{ "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_477
{ "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 getBitratesUsingPastAndFutureInfo_pastAndFutureInfo_returnsBitratesUsingOnlyFutureInfo() {\n FakeMediaChunk chunk =\n createChunk(\n createFormatWithBitrate(5),\n /* length= */ 10,\n /* startTimeSec= */ 0,\n /* endTimeSec= */...
{ "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" }