text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|>.parseInt(format.id)) .setLastModified(format.lastModified) .build(); return formatId; } } <|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.models; import androidx.annotation.Nullable; import com.google.android.exoplayer2.Format; import c...
fim
yuliskov/SmartTube
java
<|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.models; import com.google.android.exoplayer2.source.sabr.protos.misc.FormatId; import com.google.android.exoplayer2.source.sabr.protos.videostreaming.MediaHeader; public class Segment { public final MediaHeader mediaHeader; public final Fo...
fim
yuliskov/SmartTube
java
<|fim_suffix|>s; public final long endTimeMs; public final String mimeType; public final String videoId; public final FormatSelector formatSelector; public long totalSegments; public final boolean discard; public long sequenceLmt = -1; public Segment currentSegment; public Segment in...
fim
yuliskov/SmartTube
java
<|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.models; import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.source.sabr.protos.misc.FormatId; public class VideoSelector extends FormatSelector { public VideoSe<|fim_suffix|>discardMedia) { super(displayNa...
fim
yuliskov/SmartTube
java
<|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.parts; import com.google.android.exoplayer2.source.sabr.<|fim_suffix|>public FormatInitializedSabrPart(FormatId formatId, FormatSelector formatSelector, long endTimeMs) { this.formatId = formatId; this.formatSelector = formatSelecto...
fim
yuliskov/SmartTube
java
<|fim_suffix|> formatId, FormatSelector formatSelector) { this.reason = reason; this.formatId = formatId; this.formatSelector = formatSelector; } // Lets the consumer know the media sequence for a format may change public enum Reason { UNKNOWN, SERVER_SEEK, /...
fim
yuliskov/SmartTube
java
<|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.parts; import com.google.android.exoplayer2.extractor.ExtractorInput; import com.google.android.exoplayer2.source.sabr.parser.models.FormatSelector; import com.google.android.exoplayer2.source.sabr.protos.misc.FormatId; public class MediaSegmentDa...
fim
yuliskov/SmartTube
java
<|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.parts; import com.google.android.exoplayer2.source.sabr.parser.models.FormatSelector; import com.google.android.exoplayer2.source.sabr.protos.misc.FormatId; public class MediaSegmentEndSabrPart implements SabrPart { public final FormatSelector...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ength; public final boolean contentLengthEstimate; public MediaSegmentInitSabrPart( FormatSelector formatSelector, FormatId formatId, long playerTimeMs, long sequenceNumber, long totalSegments, long durationMs, bo...
fim
yuliskov/SmartTube
java
<|fim_suffix|> public PoTokenStatusSabrPart(PoTokenStatus status) { this.status = status; } public enum PoTokenStatus { OK, // PO Token is provided and valid MISSING, // PO Token is not provided, and is required. A PO Token should be provi...
fim
yuliskov/SmartTube
java
<|fim_suffix|> SABR_RELOAD_PLAYER_RESPONSE } } <|fim_prefix|>package com.google.android.exoplay<|fim_middle|>er2.source.sabr.parser.parts; public class RefreshPlayerResponseSabrPart implements SabrPart { public final Reason reason; public final String reloadPlaybackToken; public RefreshPlayerRespons...
fim
yuliskov/SmartTube
java
<|fim_prefix|>pa<|fim_suffix|>urce.sabr.parser.parts; public interface SabrPart { } <|fim_middle|>ckage com.google.android.exoplayer2.so<|endoftext|>
fim
yuliskov/SmartTube
java
<|fim_suffix|>brPart sabrPart; } <|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.results; import com.google.<|fim_middle|>android.exoplayer2.source.sabr.parser.parts.FormatInitializedSabrPart; public class ProcessFormatInitializationMetadataResult { public FormatInitializedSa<|endoftext|>
fim
yuliskov/SmartTube
java
<|fim_suffix|>t { public final List<MediaSeekSabrPart> seekSabrParts = new ArrayList<>(); } <|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.results; imp<|fim_middle|>ort com.google.android.exoplayer2.source.sabr.parser.parts.MediaSeekSabrPart; import java.util.ArrayList; import java.util.Li...
fim
yuliskov/SmartTube
java
<|fim_prefix|>package com.google.android.exoplayer2.source.sab<|fim_suffix|>roid.exoplayer2.source.sabr.parser.parts.MediaSegmentEndSabrPart; public class ProcessMediaEndResult { public MediaSegmentEndSabrPart sabrPart; public boolean isNewSegment; // TODO: better name } <|fim_middle|>r.parser.results; import...
fim
yuliskov/SmartTube
java
<|fim_suffix|>source.sabr.parser.results; import com.google.android.exoplayer2.source.sabr.parser.parts.MediaSegmentInitSabrPart; public class ProcessMediaHeaderResult { public MediaSegmentInitSabrPart sabrPart; } <|fim_prefix|>package com.go<|fim_middle|>ogle.android.exoplayer2.<|endoftext|>
fim
yuliskov/SmartTube
java
<|fim_suffix|>SegmentDataSabrPart sabrPart; } <|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.results; import com.google.android.exoplayer2.source.sabr.parser.parts.MediaSegmentDataSabrPart; public class ProcessMedia<|fim_middle|>Result { public Media<|endoftext|>
fim
yuliskov/SmartTube
java
package com.google.android.exoplayer2.source.sabr.parser.results; import com.google.android.exoplayer2.source.sabr.parser.parts.MediaSeekSabrPart; import java.util.ArrayList; import java.util.List; public class ProcessSabrSeekResult { public final List<MediaSeekSabrPart> seekSabrParts = new ArrayList<>(); } <|en...
fim
yuliskov/SmartTube
java
<|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.results; import c<|fim_suffix|> public class ProcessStreamProtectionStatusResult { public PoTokenStatusSabrPart sabrPart; } <|fim_middle|>om.google.android.exoplayer2.source.sabr.parser.parts.PoTokenStatusSabrPart;<|endoftext|>
fim
yuliskov/SmartTube
java
<|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.ump; import androidx.annotation.NonNull; import com.google.android.exoplayer2.extractor.ExtractorInput; import com.liskovsoft.sharedutils.helpers.Helpers; import java.io.ByteArrayInputStream; import java.io.IOException; public class UMPDecoder {...
fim
yuliskov/SmartTube
java
<|fim_suffix|><|fim_prefix|>package com.google.android.exoplayer2.source.sabr.parser.ump; public class UMPE<|fim_middle|>ncoder { public void encode(UMPPart part) { } } <|endoftext|>
fim
yuliskov/SmartTube
java
<|fim_suffix|>rride public long skip(long n) throws IOException { int toSkip = (int) Math.min(n, part.size - position); int skipped; try { skipped = part.data.skip(toSkip); } catch (InterruptedException e) { Thread.currentThread().interrupt(); thro...
fim
yuliskov/SmartTube
java
<|fim_prefix|>package com.google.android.exoplayer2.source.<|fim_suffix|>ze: " + size, e); } } } <|fim_middle|>sabr.parser.ump; import com.google.android.exoplayer2.extractor.ExtractorInput; public class UMPPart { public final int partId; public final int size; public final ExtractorInput data...
fim
yuliskov/SmartTube
java
<|fim_suffix|>c final int REQUEST_CANCELLATION_POLICY = 53; public static final int ONESIE_PREFETCH_REJECTION = 54; public static final int TIMELINE_CONTEXT = 55; public static final int REQUEST_PIPELINING = 56; public static final int SABR_CONTEXT_UPDATE = 57; public static final int STREAM_PROTECT...
fim
yuliskov/SmartTube
java
<|fim_suffix|>onUs); long firstSyncUs = streamElement.getStartTimeUs(chunkIndex); long secondSyncUs = firstSyncUs < positionUs && chunkIndex < streamElement.chunkCount - 1 ? streamElement.getStartTimeUs(chunkIndex + 1) : firstSyncUs; return Util.resolveSeekPositionUs(position...
fim
yuliskov/SmartTube
java
<|fim_suffix|>n instance. Must be equivalent to the previous one. */ void updateTrackSelection(TrackSelection trackSelection); } <|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 compli...
fim
yuliskov/SmartTube
java
<|fim_suffix|> public long readDiscontinuity() { if (!notifiedReadingStarted) { eventDispatcher.readingStarted(); notifiedReadingStarted = true; } return C.TIME_UNSET; } @Override public long getBufferedPositionUs() { return compositeSequenceableLoader.getBufferedPositionUs(); } ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>inLoadableRetryCount, long livePresentationDelayMs, Handler eventHandler, MediaSourceEventListener eventListener) { this( /* manifest= */ null, manifestUri, manifestDataSourceFactory, manifestParser, chunkSourceFactory, new DefaultCompo...
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|> sampleMimeType, /* codecs= */ null, bitrate, /* selectionFlags= */ 0, /* roleFlags= */ 0, /* language= */ null); } } @Override public Object build() { return format; } private static...
fim
yuliskov/SmartTube
java
<|fim_suffix|>t 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 distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITI...
fim
yuliskov/SmartTube
java
<|fim_suffix|>questUri(i, j)))); } } } return segments; } } <|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 o...
fim
yuliskov/SmartTube
java
<|fim_suffix|> /* selectionFlags= */ 0, /* roleFlags= */ 0, /* language= */ null); } private static Format createAudioFormat(int bitrate) { return Format.createContainerFormat( /* id= */ null, /* label= */ null, MimeTypes.AUDIO_MP4, MimeTypes.AUDIO_AAC, ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>late"; private static final String TEST_SUB_TYPE = "subType"; private static final int TEST_MAX_WIDTH = 1024; private static final int TEST_MAX_HEIGHT = 768; private static final String TEST_LANGUAGE = "eng"; private static final ProtectionElement TEST_PROTECTION_ELEMENT = new ProtectionEl...
fim
yuliskov/SmartTube
java
<|fim_suffix|>e * 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 License. */ package com.google.android.exoplayer2.source.smoot...
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|> new Renderer[0], /* drmSessionManager= */ null, DownloadHelper.DEFAULT_TRACK_SELECTOR_PARAMETERS); } } <|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 comp...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Sou<|fim_suffix|> Collections.singletonList(new StreamKey(/* groupIndex= */ 0, /* trackIndex= */ 0)), /* customCacheKey= */ null, /* data= */ null)); assertThat(downloader).isInstanceOf(SsDownloader.class); } } <|fi...
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|>.annotation.SuppressLint; import android.os.Looper; import android.widget.TextView; import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.SimpleExoPlayer; import com.google.android.exoplayer2.decoder.DecoderCounters; import com.googl...
fim
yuliskov/SmartTube
java
<|fim_suffix|>nt barTop = progressBar.centerY() - progressBarHeight / 2; int barBottom = barTop + progressBarHeight; if (duration <= 0) { canvas.drawRect(progressBar.left, barTop, progressBar.right, barBottom, unplayedPaint); return; } int bufferedLeft = bufferedBar.left; int bufferedRig...
fim
yuliskov/SmartTube
java
<|fim_suffix|>String buildAudioChannelString(Format format) { int channelCount = format.channelCount; if (channelCount == Format.NO_VALUE || channelCount < 1) { return ""; } switch (channelCount) { case 1: return resources.getString(R.string.exo_track_mono); case 2: ret...
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/license<|fim_suffix|>se. */ packag...
fim
yuliskov/SmartTube
java
<|fim_suffix|> </ul> * </ul> * * <p>All child views are optional and so can be omitted if not required, however where defined they * must be of the expected type. * * <h3>Specifying a custom layout file</h3> * * Defining your own {@code exo_player_control_view.xml} is useful to customize the layout of * Play...
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|> } Player.TextComponent newTextComponent = player.getTextComponent(); if (newTextComponent != null) { newTextComponent.addTextOutput(componentListener); } player.addListener(componentListener); maybeShowController(false); } else { hideController(); ...
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|> textTop = cueLineAnchor == Cue.ANCHOR_TYPE_END ? anchorPosition - textHeight : cueLineAnchor == Cue.ANCHOR_TYPE_MIDDLE ? (anchorPosition * 2 - textHeight) / 2 : anchorPosition; if (textTop + textHeight > parentBottom) { textTop = parentBottom - textHeight; ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ningManager#getUserStyle()}, or to a default style before API level 19. */ public void setUserDefaultStyle() { setStyle( Util.SDK_INT >= 19 && isCaptionManagerEnabled() && !isInEditMode() ? getUserCaptionStyleV19() : CaptionStyleCompat.DEFAULT); } /** * Set...
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_suffix|>the target renderer to support adaptation between the available tracks. * * @param allowAdaptiveSelections Whether adaptive selection is enabled. * @return This builder, for convenience. */ public TrackSelectionDialogBuilder setAllowAdaptiveSelections(boolean allowAdaptiveSelections) { t...
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_suffix|> float yUnit, float widthUnit, float heightUnit, int widthPixel, int heightPixel) { if (yaw >= HALF_PI || yaw <= -HALF_PI || pitch >= HALF_PI || pitch <= -HALF_PI) { return null; } double clickXUnit = Math.tan(yaw) * DISTANCE_UNIT - xUnit; double clickYUni...
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
/* * 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_suffix|>llerOrientation(float[] rotationMatrix) { synchronized (controllerOrientationMatrix) { System.arraycopy(rotationMatrix, 0, controllerOrientationMatrix, 0, rotationMatrix.length); } } } <|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache Li...
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
/* * 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
/* * 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_suffix|>GREES)).isNull(); assertThat(translateClick((float) (Math.PI / 2), 0)).isNull(); assertThat(translateClick(0, (float) Math.PI)).isNull(); } private static PointF translateClick(float yaw, float pitch) { return CanvasRenderer.internalTranslateClick( yaw, pitch, /* x...
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<|fim_suffix|> } @Test public void testBigYaw() { swipe(tracker, 0, 0, -10 * SWIPE_PX, 0); assertThat(yaw).isEqualTo(10 * SWIPE_PX ...
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|>nstructorHelper = new DownloaderConstructorHelper(cache, httpDataSourceFactory); return new DashDownloader(MANIFEST_URI, keys, constructorHelper); } } <|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License");...
fim
yuliskov/SmartTube
java
<|fim_suffix|>MANIFEST) .setFullPlaybackNoSeeking(true) .setCanIncludeAdditionalVideoFormats(false) .setAudioVideoFormats(DashTestData.VP9_VORBIS_AUDIO_REPRESENTATION_ID, DashTestData.VP9_CDD_FIXED) .run(); } @Test public void testVp9AdaptiveV24() throws DecoderQueryEx...
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 appl...
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) 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 co<|fim_suffix|>enseDuration = offlineLicenseHelper.getLicenseDurationRemainingSe...
fim
yuliskov/SmartTube
java
<|fim_suffix|>apabilities) { boolean isVideo = MimeTypes.isVideo(requestedMimeType); boolean isAudio = MimeTypes.isAudio(requestedMimeType); StringBuilder result = new StringBuilder(); result.append("[requestedMimeType=").append(requestedMimeType); if (Util.SDK_INT >= 21) { result.append(", mi...
fim
yuliskov/SmartTube
java
<|fim_suffix|>for logging. * @param description A description to be logged when the action is executed, or null if no * logging is required. */ public Action(String tag, @Nullable String description) { this.tag = tag; this.description = description; } /** * Executes the action and schedul...
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|>* * http://www.apache.org/licenses/LICENSE-2.0 * * 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 specifi...
fim
yuliskov/SmartTube
java
<|fim_suffix|>psedRealtimeUs, MediaCodec codec, ByteBuffer buffer, int bufferIndex, int bufferFlags, long bufferPresentationTimeUs, boolean isDecodeOnlyBuffer, boolean isLastBuffer, Format format) throws ExoPlaybackException { if (skipToPosit...
fim
yuliskov/SmartTube
java
<|fim_suffix|> ") output " + actual + " buffers. Expected in range [" + minCount + ", " + maxCount + "].") .that(minCount <= actual && actual <= maxCount) .isTrue(); } public static void assertDroppedBuf...
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|>import com.google.android.exoplayer2.C; import java.util.Arrays; import java.util.Locale; /** * Helper utility to dump field values. */ public final class Dumper { /** * Provides custom dump method. */ public interface Dumpable { /** * Dumps the fields of the object using the {@code...
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) 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_suffix|>* @param simulateIOErrors If true simulates IOErrors. * @param simulateUnknownLength If true simulates unknown input length. * @param simulatePartialReads If true simulates partial reads. * @throws IOException If reading from the input fails. * @throws InterruptedException If interrupted while...
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) 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) 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) 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|>{ return handler.obtainMessage(what, arg1, arg2); } @Override public Message obtainMessage(int what, int arg1, int arg2, Object obj) { return handler.obtainMessage(what, arg1, arg2, obj); } @Override public boolean sendEmptyMessage(int what) { return handler.sen...
fim
yuliskov/SmartTube
java
<|fim_suffix|>le data added by {@link #appendReadData(byte[])}. */ public byte[] getData() { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); for (Segment segment : segments) { if (segment.data != null) { try { outputStream.write(segment.data); } ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>fake {@link DataSource} capable of simulating various scenarios. It uses a {@link FakeDataSet} * instance which determines the response to data access calls. */ public class FakeDataSource extends BaseDataSource { /** * Factory to create a {@link FakeDataSource}. */ public static class Factor...
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|>.valueAt(i)) .endBlock(); } dumper.add("tracksEnded", tracksEnded); } } <|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. * Y...
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|>ns.checkArgument(periodIndex != C.INDEX_UNSET); Period period = timeline.getPeriod(periodIndex, new Period()); EventDispatcher eventDispatcher = createEventDispatcher(period.windowIndex, id, period.getPositionInWindowMs()); FakeMediaPeriod mediaPeriod = createFakeMediaPeriod(id...
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|>te[] sampleData) { this.format = format; this.eventDispatcher = eventDispatcher; this.sampleData = sampleData; } @Override public boolean isReady() { return true; } @Override public int readData( FormatHolder formatHolder, DecoderInputBuffer buffer, boolean formatRequir...
fim
yuliskov/SmartTube
java
<|fim_suffix|> adPlaybackState = adPlaybackState.withAdDurationsUs(adDurationsUs); return adPlaybackState; } /** * Creates a fake timeline with the given number of seekable, non-dynamic windows with one period * with a duration of {@link TimelineWindowDefinition#DEFAULT_WINDOW_DURATION_US} each. * ...
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_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:/<|fim_suffix|>tag; public LogcatMetricsLogger(St...
fim
yuliskov/SmartTube
java