text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|>= C.TRACK_TYPE_CUSTOM_BASE ? "custom (" + trackType + ")" : "?";
}
}
}
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a ... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>e;
this.channels = channels;
this.bitsPerSample = bitsPerSample;
this.totalSamples = totalSamples;
this.metadata = buildMetadata(vorbisComments, pictureFrames);
}
/** Returns the maximum size for a decoded frame from the FLAC stream. */
public int maxDecodedFrameSize() {
return ... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>ag = tag;
mModule = module.ordinal();
}
/**
* Configures the log levels for a specific module
* @param module The module to which this file belongs to. One of the
* MOD_xxx values
* Setting All enables logging in all modules.
* Setting AudioVideo enables logg... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>ize * 2);
}
values[size++] = value;
}
/**
* Returns the value at a specified index.
*
* @param index The index.
* @return The corresponding value.
* @throws IndexOutOfBoundsException If the index is less than zero, or greater than or equal to
* {@link #size()}.
*/
p... | fim | yuliskov/SmartTube | java |
<|fim_suffix|> /**
* Returns the current media position in microseconds.
*/
long getPositionUs();
/**
* Attempts to set the playback parameters and returns the active playback parameters, which may
* differ from those passed in.
*
* @param playbackParameters The playback parameters.
* @return ... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>nResourceId != 0) {
channel.setDescription(context.getString(descriptionResourceId));
}
notificationManager.createNotificationChannel(channel);
}
}
/**
* Post a notification to be shown in the status bar. If a notification with the same id has
* already been posted by yo... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | fim | yuliskov/SmartTube | java |
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | fim | yuliskov/SmartTube | java |
<|fim_suffix|> 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distribut... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>LowException extends IOException {
public PriorityTooLowException(int priority, int highestPriority) {
super("Priority too low [priority=" + priority + ", highest=" + highestPriority + "]");
}
}
private final Object lock = new Object();
// Guarded by lock.
private final PriorityQ... | fim | yuliskov/SmartTube | java |
<|fim_prefix|><|fim_suffix|>de int currentMode,
int enabledModes) {
for (int offset = 1; offset <= 2; offset++) {
@Player.RepeatMode int proposedMode = (currentMode + offset) % 3;
if (isRepeatModeEnabled(proposedMode, enabledModes)) {
return proposedMode;
}
}
return currentMo... | fim | yuliskov/SmartTube | java |
<|fim_suffix|> */
package com.google.android.exoplayer2.util;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.OutputStream;
/**
* This is a subclass of {@link BufferedOutputStream} with a {@link #reset(OutputStream)} method
* that allows an instance to be re-used with another underly... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>thm</a>
*/
public class SlidingPercentile {
// Orderings.
private static final Comparator<Sample> INDEX_COMPARATOR = (a, b) -> a.index - b.index;
private static final Comparator<Sample> VALUE_COMPARATOR =
(a, b) -> Float.compare(a.value, b.value);
private static final int SORT_ORDER_NONE ... | fim | yuliskov/SmartTube | java |
<|fim_suffix|> getPlaybackParameters() {
return playbackParameters;
}
}
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the ... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apa<|fim_suffix|>se");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Ver<|fim_suffix|>eturn handler.obtainMessage(what, arg1, arg2, obj);
}
@Override
public boolean sendEmptyMessage(int what) {
return handler.sendEmptyMessage(what);
}
@Override
public boolean... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in com<|fim_suffix|>eginSection(sectionName);
}
@TargetApi(18)
private static void endSectionV18() {
android.os.Trace.endSection();
... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>x = -1;
}
// Determine hier-part structure: hier-part = "//" authority path / path
// This block can also cope with schemeIndex == -1.
boolean hasAuthority = schemeIndex + 2 < queryIndex
&& uriString.charAt(schemeIndex + 1) == '/'
&& uriString.charAt(schemeIndex + 2) == '/... | fim | yuliskov/SmartTube | java |
<|fim_suffix|> }
} else if (divisor < multiplier && (multiplier % divisor) == 0) {
long multiplicationFactor = multiplier / divisor;
for (int i = 0; i < timestamps.length; i++) {
timestamps[i] *= multiplicationFactor;
}
} else {
double multiplicationFactor = (double) multiplie... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>droid.exoplayer2.C;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.util.Util;
import java.util.Arrays;
/**
* Stores color info.
*/
public final class ColorInfo implements Parcelable {
/**
* The color space of the video. Valid values are {@link C#COLOR_SPACE_BT60... | fim | yuliskov/SmartTube | java |
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | fim | yuliskov/SmartTube | java |
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>Changed(Format[] formats, long offsetUs) throws ExoPlaybackException {
if (outputStreamOffsetUs == C.TIME_UNSET) {
outputStreamOffsetUs = offsetUs;
} else {
if (pendingOutputStreamOffsetCount == pendingOutputStreamOffsetsUs.length) {
Log.w(TAG, "Too many stream changes, so drop... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with t<|fim_suffix|>s than 21, then this is the best effort.
* @param format The format associated with the frame.
*/
voi... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>size of the surface onto which the video is being
* rendered.
*
* @param width The surface width in pixels. May be {@link
* com.google.android.exoplayer2.C#LENGTH_UNSET} if unknown, or 0 if the video is not rendered
* onto a surface.
* @param height The surface height in pixels. ... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>inal boolean singleMesh;
/**
* Creates a Projection with single mesh.
*
* @param mesh the Mesh for both eyes.
* @param stereoMode A {@link StereoMode} value.
*/
public Projection(Mesh mesh, int stereoMode) {
this(mesh, mesh, stereoMode);
}
/**
* Creates a Projection with du... | fim | yuliskov/SmartTube | java |
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Ve<|fim_suffix|>nstants() {
// Sanity check that constant values match those defined by the platform.
assertThat(C.BUFFER_FLAG_KEY_FRAME).isEqualTo(MediaCodec.BUFFER_FLAG_KEY_FRAME);
assertThat(C.... | fim | yuliskov/SmartTube | java |
<|fim_suffix|> private void createDefaultLoadControl() {
builder.setAllocator(allocator);
builder.setTargetBufferBytes(TARGET_BUFFER_BYTES);
loadControl = builder.createDefaultLoadControl();
loadControl.onTracksSelected(new Renderer[0], null, null);
}
private void makeSureTargetBufferBytesReached()... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|> initDataList.add(initData1);
initDataList.add(initData2);
initData = Collections.unmodifiableList(initDataList);
}
@Test
public void testParcelable() {
DrmInitData.SchemeData drmData1 = new DrmInitData.SchemeData(WIDEVINE_UUID, VIDEO_MP4,
TestUtil.buildTestData(128, 1 /* data ... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>quest request =
Shadows.shadowOf(audioManager).getLastAudioFocusRequest();
assertThat(request).isNull();
audioFocusManager.handleStop();
assertThat(Shadows.shadowOf(audioManager).getLastAbandonedAudioFocusListener()).isNull();
}
@Test
@Config(minSdk = 26)
public void handleSt... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>nTimeUs= */ 8 * C.MICROS_PER_SECOND);
assertThat(defaultAudioSink.getCurrentPositionUs(/* sourceEnded= */ false))
.isEqualTo(8 * C.MICROS_PER_SECOND);
}
@Config(minSdk = OLDEST_SDK, maxSdk = 20)
@Test
public void doesNotSupportFloatOutputBeforeApi21() {
assertThat(defaultAudioSink... | fim | yuliskov/SmartTube | java |
<|fim_suffix|> {
ByteBuffer inputBuffer = ByteBuffer.allocate(sizeBytes).order(ByteOrder.nativeOrder());
ShortBuffer inputBufferAsShortBuffer = inputBuffer.asShortBuffer();
int limit = buffer.limit();
buffer.limit(Math.min(buffer.position() + sizeBytes / 2, limit));
inputBufferAsShortBuffe... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>xoplayer2.drm.ExoMediaCrypto;
import com.google.android.exoplayer2.testutil.FakeSampleStream;
import com.google.android.exoplayer2.util.MimeTypes;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.rob... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the L<|fim_suffix|>ing.
sonicAudioProcessor.configure(48000, 2, C.ENCODING_PCM_... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>AdjustRequestDataV26() {
// We expect "+" and "/" to be replaced with "-" and "_" respectively, for "kids".
byte[] expected =
Util.getUtf8Bytes(
"{"
+ "\"kids\":["
+ "\"abc-def_\","
+ "\"ab-cde_f\""
+ "],"
... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>UUID)).isTrue();
assertThat(DATA_1.matches(PLAYREADY_UUID)).isFalse();
assertThat(DATA_2.matches(UUID_NIL)).isFalse();
assertThat(DATA_2.matches(WIDEVINE_UUID)).isFalse();
assertThat(DATA_2.matches(PLAYREADY_UUID)).isTrue();
assertThat(DATA_2.matches(UUID_NIL)).isFalse();
assertT... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>flineLicenseHelper.releaseLicense(offlineLicenseKeySetId2);
}
@Test
public void testDownloadLicenseFailsIfNullInitData() throws Exception {
try {
offlineLicenseHelper.downloadLicense(null);
fail();
} catch (IllegalArgumentException e) {
// Expected.
}
}
@Test
pu... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.android.exoplayer2.C;
import org.junit.Test;
import org.junit.runner.RunWith;
/** Unit test for {@link ConstantBitrateSeekMap}. */
@RunWith(AndroidJUnit4.class)
public final class ConstantBitrateSeekMapTest {
private ConstantBi... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>ataSource buildDataSource() throws Exception {
FakeDataSource testDataSource = new FakeDataSource();
testDataSource.getDataSet().newDefaultData()
.appendReadData(Arrays.copyOfRange(TEST_DATA, 0, 3))
.appendReadData(Arrays.copyOfRange(TEST_DATA, 3, 6))
.appendReadData(Arrays... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>ue();
}
}
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>g contentSize) {
events.add(formatEvent(id, "start contentPosition=" + contentPosition
+ " contentSize=" + contentSize));
}
@Override
public void endMasterElement(int id) {
events.add(formatEvent(id, "end"));
}
@Override
public void integerElement(int id, lo... | fim | yuliskov/SmartTube | java |
<|fim_suffix|> Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under ... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>tReadVarintFlaky(reader, true, DATA_6_BYTE_64, 6, 64);
testReadVarintFlaky(reader, true, DATA_7_BYTE_64, 7, 64);
testReadVarintFlaky(reader, true, DATA_8_BYTE_64, 8, 64);
testReadVarintFlaky(reader, true, DATA_1_BYTE_MAX, 1, VALUE_1_BYTE_MAX);
testReadVarintFlaky(reader, true, DATA_2_BYTE_... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>ess required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the ... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>orAsserts.assertBehavior(extractorFactory, "mp4/sample_fragmented_sei.mp4");
}
private static ExtractorFactory getExtractorFactory(final List<Format> closedCaptionFormats) {
return () -> new FragmentedMp4Extractor(0, null, null, null, closedCaptionFormats);
}
}
<|fim_prefix|>/*
* Copyright (C)... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 201<|fim_suffix|>on.truth.Truth.assertThat;
import android.os.Parcel;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
/** Test for {@link MdtaMetadataEntry}. */
@RunWith(AndroidJUnit4.class)
public final class MdtaMetadata... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>_UUID);
assertThat(parsablePsshAtom.readUnsignedIntToInt()).isEqualTo(schemeData.length);
byte[] psshSchemeData = new byte[schemeData.length];
parsablePsshAtom.readBytes(psshSchemeData, 0, schemeData.length);
assertThat(psshSchemeData).isEqualTo(schemeData);
}
}
<|fim_prefix|>/*
* Copy... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>put)
throws IOException, InterruptedException {
DefaultOggSeeker oggSeeker =
new DefaultOggSeeker(
/* streamReader= */ new FlacReader(),
/* payloadStartPosition= */ 0,
/* payloadEndPosition= */ extractorInput.getLength(),
/* firstPayloadPag... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>th a single packet.
OggTestData.buildOggHeader(0x00, 16, 1001, 0x02),
TestUtil.createByteArray(0xFF, 0x11), // Laces
secondPacket,
// Third page with zero packets.
OggTestData.buildOggHeader(0x00, 16, 1002, 0x00),
... | fim | yuliskov/SmartTube | java |
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>y bitArray = new VorbisBitArray(TestUtil.createByteArray(0xF0, 0x0F, 0xF0, 0x0F));
assertThat(bitArray.readBits(32)).isEqualTo(0x0FF00FF0);
bitArray = new VorbisBitArray(TestUtil.createByteArray(0x0F, 0xF0, 0x0F, 0xF0));
assertThat(bitArray.readBits(32)).isEqualTo(0xF00FF00F);
}
@Test
p... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>framingFlag).isTrue();
assertThat(vorbisIdHeader.channels).isEqualTo(2);
assertThat(vorbisIdHeader.blockSize0).isEqualTo(512);
assertThat(vorbisIdHeader.blockSize1).isEqualTo(1024);
assertThat(vorbisIdHeader.bitrateMax).isEqualTo(-1);
assertThat(vorbisIdHeader.bitrateMin).isEqualTo(-1)... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>port androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.android.exoplayer2.testutil.ExtractorAsserts;
import org.junit.Test;
import org.junit.runner.RunWith;
/** Unit test for {@link Ac4Extractor}. */
@RunWith(AndroidJUnit4.class)
public final class Ac4ExtractorTest {
@Test
public void... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>eption {
ExtractorAsserts.assertBehavior(
() ->
new AdtsExtractor(
/* firstStreamSampleTimestampUs= */ 0,
/* flags= */ AdtsExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING),
"ts/sample_cbs.adts");
}
}
<|fim_prefix|>/*
* Copyright (C) 2016 Th... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
<|fim_suffix|>id.exoplayer2.testutil.FakeTrackOutput;
import com.google.android.exoplayer2.testutil.TestUtil;
import com.google.android.exoplayer2.util.ParsableByteArray;
import java.util.Arrays;
import org.junit.Before;
import org.junit.Test;
i... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>lder = new PositionHolder();
}
@Test
public void testIsDurationReadPending_returnFalseByDefault() {
assertThat(tsDurationReader.isDurationReadFinished()).isFalse();
}
@Test
public void testReadDuration_returnsCorrectDuration() throws IOException, InterruptedException {
FakeExtractorI... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>l.ExtractorAsserts;
import org.junit.Test;
import org.junit.runner.RunWith;
/** Unit test for {@link PsExtractor}. */
@RunWith(AndroidJUnit4.class)
public final class PsExtractorTest {
@Test
public void testSample() throws Exception {
ExtractorAsserts.assertBehavior(PsExtractor::new, "ts/sample.... | fim | yuliskov/SmartTube | java |
<|fim_suffix|>.length);
// Crc field is incorrect, and should not be passed to the payload reader.
incorrectCrcPat[16]--;
reader.consume(new ParsableByteArray(correctCrcPat), FLAG_PAYLOAD_UNIT_START_INDICATOR);
assertThat(payloadReader.parsedTableIds).isEqualTo(singletonList(0));
reader.consume(new ... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
<|fim_prefix|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | fim | yuliskov/SmartTube | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.