text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|>a {@link FileDataSourceFactory} will be used. * @param cacheWriteDataSinkFactory A {@link DataSink.Factory} for creating {@link DataSource}s * for writing data to the cache. If null then a {@link CacheDataSinkFactory} will be used. * @param priorityTaskManager A {@link PriorityTaskManager} to...
fim
yuliskov/SmartTube
java
<|fim_suffix|>quest}. * * @param action The action. * @return The downloader. */ Downloader createDownloader(DownloadRequest action); } <|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 ...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2<|fim_suffix|>rmissions and * limitations under the License. */ package com.google.android.exoplayer2.offline; import java.util.List; /** * A manifest that can generate copies of itself including only the streams specified by the given * keys. * * @param <T> The manifest type....
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|>? C.PERCENTAGE_UNSET : ((bytesCached * 100f) / contentLength); progessListener.onProgress(contentLength, bytesCached, percentDownloaded); } } } <|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "Licens...
fim
yuliskov/SmartTube
java
<|fim_suffix|>wnloader; private final Segment segment; private final ProgressNotifier progressNotifier; private final AbortableCountDownLatch countDownLatch; SegmentDownloadTask( SegmentDownloader<M> downloader, Segment segment, ProgressNotifier progressNotifier, Abortab...
fim
yuliskov/SmartTube
java
<|fim_suffix|>s on the type of media for which the * stream key is used. */ public final class StreamKey implements Comparable<StreamKey>, Parcelable { /** The period index. */ public final int periodIndex; /** The group index. */ public final int groupIndex; /** The track index. */ public final int trac...
fim
yuliskov/SmartTube
java
<|fim_suffix|> reason. * @throws IOException If an error occurs updating the state. */ void setStopReason(int stopReason) throws IOException; /** * Sets the stop reason of the download with the given ID in a terminal state ({@link * Download#STATE_COMPLETED}, {@link Download#STATE_FAILED}). Does nothin...
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|>l.SDK_INT < 23) { // TODO Check internet connectivity using http://clients3.google.com/generate_204 on API // levels prior to 23. return true; } Network activeNetwork = connectivityManager.getActiveNetwork(); if (activeNetwork == null) { return false; } NetworkC...
fim
yuliskov/SmartTube
java
<|fim_suffix|>is.notMetRequirements = notMetRequirements; listener.onRequirementsStateChanged(this, notMetRequirements); } } private class DeviceStatusChangeReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (!isInitialStickyBroadcast()...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ou 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 distributed on an "AS IS" BASIS, *...
fim
yuliskov/SmartTube
java
<|fim_suffix|>uffleModeEnabled); if (firstChildIndex == C.INDEX_UNSET) { // All children are empty. return C.INDEX_UNSET; } } return getFirstWindowIndexByChildIndex(firstChildIndex) + getTimelineByChildIndex(firstChildIndex).getFirstWindowIndex(shuffleModeEnabled); } @Ov...
fim
yuliskov/SmartTube
java
<|fim_suffix|>S 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; /** * Interface for callbacks to be notified of {@link MediaSource} events. * * @deprecated Use {@link Me...
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|>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; import java.io.IOException; /** * Thrown when a live playback fal...
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_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|>E : nextLoadPositionUs; } @Override public final void reevaluateBuffer(long positionUs) { for (SequenceableLoader loader : loaders) { loader.reevaluateBuffer(positionUs); } } @Override public boolean continueLoading(long positionUs) { boolean madeProgress = false; boole...
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 * * <|fim_suffix|> to be built. * @return A composite {@link Se...
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) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may <|fim_suffix|>w.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distribute...
fim
yuliskov/SmartTube
java
<|fim_suffix|>adData mediaLoadData) { // Do nothing. } @Override public void onLoadCanceled( int windowIndex, @Nullable MediaPeriodId mediaPeriodId, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) { // Do nothing. } @Override public void onLoadError( int win...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ideUs : preparePositionUs; } } <|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 * * ht...
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 u<|fim_suffix|>able law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS O...
fim
yuliskov/SmartTube
java
<|fim_suffix|>player2.source; import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.FormatHolder; import com.google.android.exoplayer2.decoder.DecoderInputBuffer; import java.io.IOException; /** * An empty {@link SampleStream}. */ public final class EmptySampleStream implements SampleStream {...
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|>rdingTimeline(Timeline timeline) { this.timeline = timeline; } @Override public int getWindowCount() { return timeline.getWindowCount(); } @Override public int getNextWindowIndex(int windowIndex, @Player.RepeatMode int repeatMode, boolean shuffleModeEnabled) { return timeli...
fim
yuliskov/SmartTube
java
<|fim_suffix|>metadataIntervalBytes; } else { return C.RESULT_END_OF_INPUT; } } int bytesRead = upstream.read(buffer, offset, Math.min(bytesUntilMetadata, readLength)); if (bytesRead != C.RESULT_END_OF_INPUT) { bytesUntilMetadata -= bytesRead; } return bytesRead; } @Nu...
fim
yuliskov/SmartTube
java
<|fim_suffix|> Assertions.checkState(loopCount <= Integer.MAX_VALUE / childPeriodCount, "LoopingMediaSource contains too many periods"); } } @Override public int getWindowCount() { return childWindowCount * loopCount; } @Override public int getPeriodCount() { ...
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|> buffered sequence of * windows this media period is part of. */ public MediaPeriodId( Object periodUid, int adGroupIndex, int adIndexInAdGroup, long windowSequenceNumber) { this( periodUid, adGroupIndex, adIndexInAdGroup, windowSeque...
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) 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_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|>amp(int length) { if (length == 0) { return Long.MIN_VALUE; } long largestTimestampUs = Long.MIN_VALUE; int relativeSampleIndex = getRelativeIndex(length - 1); for (int i = 0; i < length; i++) { largestTimestampUs = Math.max(largestTimestampUs, timesUs[relativeSampleIndex])...
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_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) 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|>ER_READ; } @Override public int skipData(long positionUs) { long oldPositionBytes = positionBytes; seekTo(positionUs); return (int) ((positionBytes - oldPositionBytes) / SILENCE_SAMPLE.length); } } private static long getAudioByteCount(long durationUs) { long au...
fim
yuliskov/SmartTube
java
<|fim_suffix|>. * @param isSeekable Whether seeking is supported within the window. * @param isDynamic Whether the window may change when the timeline is updated. * @param tag A tag used for {@link Timeline.Window#tag}. */ public SinglePeriodTimeline( long periodDurationUs, long windowDuration...
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|>etween multiple tracks * within the group. */ public final class TrackGroup implements Parcelable { /** * The number of tracks in the group. */ public final int length; private final Format[] formats; // Lazily initialized hashcode. private int hashCode; /** * @param formats The...
fim
yuliskov/SmartTube
java
<|fim_suffix|>e public void writeToParcel(Parcel dest, int flags) { dest.writeInt(length); for (int i = 0; i < length; i++) { dest.writeParcelable(trackGroups[i], 0); } } public static final Parcelable.Creator<TrackGroupArray> CREATOR = new Parcelable.Creator<TrackGroupArray>() { ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>f the input format was not recognized. */ public class UnrecognizedInputFormatException extends ParserException { /** * The {@link Uri} from which the unrecognized data was read. */ public final Uri uri; /** * @param message The detail message for the exception. * @param uri The {@lin...
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|>edia. Each element must be one of * {@link C#TYPE_DASH}, {@link C#TYPE_HLS}, {@link C#TYPE_SS} and {@link C#TYPE_OTHER}. */ void setSupportedContentTypes(@C.ContentType int... contentTypes); /** * Starts using the ads loader for playback. Called on the main thread by {@link AdsMediaSourc...
fim
yuliskov/SmartTube
java
<|fim_suffix|>c, dataSpec.uri, /* responseHeaders= */ Collections.emptyMap(), C.DATA_TYPE_AD, C.TRACK_TYPE_UNKNOWN, /* loadDurationMs= */ 0, /* bytesLoaded= */ 0, error, /* wasCanceled= */ true); } } ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>durationUs, period.getPositionInWindowUs(), adPlaybackState); return period; } @Override public Window getWindow( int windowIndex, Window window, boolean setTag, long defaultPositionProjectionUs) { window = super.getWindow(windowIndex, window, setTag, defaultPositionPr...
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|> to a valid element. * * @throws NoSuchElementException If the iterator does not point to a valid element. */ protected final void checkInBounds() { if (currentIndex < fromIndex || currentIndex > toIndex) { throw new NoSuchElementException(); } } /** Returns the current index...
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_suffix|>ndTimeUs) { this.dataSource = new StatsDataSource(dataSource); this.dataSpec = Assertions.checkNotNull(dataSpec); this.type = type; this.trackFormat = trackFormat; this.trackSelectionReason = trackSelectionReason; this.trackSelectionData = trackSelectionData; this.startTimeUs =...
fim
yuliskov/SmartTube
java
<|fim_suffix|>, bindingTrackOutput); } return bindingTrackOutput; } @Override public void endTracks() { Format[] sampleFormats = new Format[bindingTrackOutputs.size()]; for (int i = 0; i < bindingTrackOutputs.size(); i++) { sampleFormats[i] = bindingTrackOutputs.valueAt(i).sampleFormat; ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>iting, 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 License. */ package com.google.android.exoplayer...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ge(mediaChunks, /* fromIndex= */ chunkIndex, /* toIndex= */ mediaChunks.size()); nextNotifyPrimaryFormatMediaChunkIndex = Math.max(nextNotifyPrimaryFormatMediaChunkIndex, mediaChunks.size()); primarySampleQueue.discardUpstreamSamples(firstRemovedChunk.getFirstSampleIndex(0)); for (int ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>the associated track may be blacklisted, or * {@link C#TIME_UNSET} if the track may not be blacklisted. * @return Whether the load should be canceled. Must be false if {@code cancelable} is false. */ boolean onChunkLoadError(Chunk chunk, boolean cancelable, Exception e, long blacklistDurati...
fim
yuliskov/SmartTube
java
<|fim_suffix|> clippedStartTimeUs == C.TIME_UNSET ? C.TIME_UNSET : (clippedStartTimeUs - sampleOffsetUs), clippedEndTimeUs == C.TIME_UNSET ? C.TIME_UNSET : (clippedEndTimeUs - sampleOffsetUs)); } // Load and decode the sample data. try { Extracto...
fim
yuliskov/SmartTube
java
<|fim_suffix|>by {@link #load()}. Implementations should override this method to consume the loaded * data. * * @param data An array containing the data. * @param limit The limit of the data. * @throws IOException If an error occurs consuming the loaded data. */ protected abstract void consume(byte[...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ormat See {@link #trackFormat}. * @param trackSelectionReason See {@link #trackSelectionReason}. * @param trackSelectionData See {@link #trackSelectionData}. * @param extractorWrapper A wrapped extractor to use for parsing the initialization data. */ public InitializationChunk( DataSou...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Sourc<|fim_suffix|>ed 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 ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>tException If the method is called before the first call to * {@link #next()} or when {@link #isEnded()} is true. */ long getChunkStartTimeUs(); /** * Returns the media end time of the chunk, in microseconds. * * @throws java.util.NoSuchElementException If the method is called befo...
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
/* * 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_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
/* * 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|> Thrown when an error occurs decoding subtitle data. */ public class SubtitleDecoderException extends Exception { /** * @param message The detail message for this exception. */ public SubtitleDecoderException(String message) { super(message); } /** @param cause The cause of this excep...
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|>icense 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 CONDITIONS OF ANY KIND, either express or implied. * See the License for ...
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}s. May be empty. */ void onCues(List<Cue> cues); } <|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 Licens...
fim
yuliskov/SmartTube
java
<|fim_suffix|>aceDecoder() { releaseDecoder(); decoder = decoderFactory.createDecoder(streamFormat); } private long getNextEventTime() { return nextSubtitleEventIndex == C.INDEX_UNSET || nextSubtitleEventIndex >= subtitle.getEventTimeCount() ? Long.MAX_VALUE : subtitle.getEventTime(next...
fim
yuliskov/SmartTube
java
<|fim_suffix|>; currentCueBuilder = new CueBuilder(CC_MODE_UNKNOWN, DEFAULT_CAPTIONS_ROW_COUNT); currentChannel = NTSC_CC_CHANNEL_1; packetLength = MimeTypes.APPLICATION_MP4CEA608.equals(mimeType) ? 2 : 3; switch (accessibilityChannel) { case 1: selectedChannel = NTSC_CC_CHANNEL_1; ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ority) { super(text, textAlignment, line, lineType, lineAnchor, position, positionAnchor, size, windowColorSet, windowColor); this.priority = priority; } @Override public int compareTo(@NonNull Cea708Cue other) { if (other.priority < priority) { return -1; } else if (o...
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|>inal boolean isWideAspectRatio; private Cea708InitializationData(List<byte[]> initializationData) { isWideAspectRatio = initializationData.get(0)[0] != 0; } /** * Returns an object representation of CEA-708 initialization data * * @param initializationData Binary CEA-708 initializatio...
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|>ublic int getNextEventTimeIndex(long timeUs) { return timeUs < 0 ? 0 : C.INDEX_UNSET; } @Override public int getEventTimeCount() { return 1; } @Override public long getEventTime(int index) { Assertions.checkArgument(index == 0); return 0; } @Override public List<Cue> g...
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 re...
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 re...
fim
yuliskov/SmartTube
java
<|fim_suffix|>int t; if ((entryFlags & 0x01) != 0) { y = data.readBits(8); cr = data.readBits(8); cb = data.readBits(8); t = data.readBits(8); remainingLength -= 4; } else { y = data.readBits(6) << 2; cr = data.readBits(4) << 4; cb = data.readB...
fim
yuliskov/SmartTube
java
<|fim_suffix|>g getEventTime(int index) { return 0; } @Override public List<Cue> getCues(long timeUs) { return cues; } } <|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 c...
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|>btitle(List<Cue> cues) { this.cues = cues; } @Override public int getNextEventTimeIndex(long timeUs) { return C.INDEX_UNSET; } @Override public int getEventTimeCount() { return 1; } @Override public long getEventTime(int index) { return 0; } @Override public Lis...
fim
yuliskov/SmartTube
java
<|fim_suffix|> .replaceAll("\\{.*?\\}", "") .replaceAll("\\\\N", "\n") .replaceAll("\\\\n", "\n"); cues.add(new Cue(text)); cueTimesUs.add(startTimeUs); if (endTimeUs != C.TIME_UNSET) { cues.add(Cue.EMPTY); cueTimesUs.add(endTimeUs); } } /** * Parses an SSA ti...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ic List<Cue> getCues(long timeUs) { int index = Util.binarySearchFloor(cueTimesUs, timeUs, true, false); if (index == -1 || cues[index] == Cue.EMPTY) { // timeUs is earlier than the start of the first cue, or we have an empty cue. return Collections.emptyList(); } else { retu...
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_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 <|fim_suffix|>e"; public static final String TAG_STYLING = "styling"; public static final String TAG_LAYOUT = "layout"; public static final String TAG_REGION = "region"; public static final String TAG_METADATA...
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