text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|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|>sendLevel); return result; } } <|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:/...
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
<|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_suffix|> ", size = " + sizeInBytes); } audioBuffer[nextBufferIndex] = new byte[sizeInBytes]; } System.arraycopy(audioData,offsetInBytes,audioBuffer[nextBufferIndex],0,sizeInBytes); Message msg = trackHandler.obtainMessage(MSG_WRITE_TO_TRACK, sizeInBytes, ne...
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|> * 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.audio; import...
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|>mple the little endian input and update the input/output buffers. ByteBuffer buffer = replaceOutputBuffer(resampledSize); switch (encoding) { case C.ENCODING_PCM_8BIT: // 8->16 bit resampling. Shift each byte from [0, 256) to [-128, 128) and scale up. for (int i = position; i...
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|>rInputBuffer inputBuffer; private SimpleOutputBuffer outputBuffer; @Nullable private DrmSession<ExoMediaCrypto> decoderDrmSession; @Nullable private DrmSession<ExoMediaCrypto> sourceDrmSession; @ReinitializationState private int decoderReinitializationState; private boolean decoderReceivedBuffe...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * Copyright (C) 2010 Bill Cox, Sonic Library * * 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....
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|>ffer.putInt(bytesPerSample * sampleRateHz); scratchByteBuffer.putShort((short) bytesPerSample); scratchByteBuffer.putShort((short) (8 * bytesPerSample / channelCount)); randomAccessFile.write(scratchBuffer, 0, scratchByteBuffer.position()); // Write the start of the data chunk as ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>tesToOutput; System.arraycopy(endBuffer, endBufferBytesToOutput, endBuffer, 0, endBufferSize); inputBuffer.get(endBuffer, endBufferSize, remaining); endBufferSize += remaining; buffer.flip(); } @SuppressWarnings("ReferenceEquality") @Override public ByteBuffer getOutput() { i...
fim
yuliskov/SmartTube
java
<|fim_suffix|>FOURCC = Util.getIntegerCodeForString("WAVE"); /** Four character code for "fmt ". */ public static final int FMT_FOURCC = Util.getIntegerCodeForString("fmt "); /** Four character code for "data". */ public static final int DATA_FOURCC = Util.getIntegerCodeForString("data"); /** WAVE type value...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * 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 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|>se.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; /** A {@link DatabaseProvider} that provides instances obtained from a {@link SQLiteOpenHelper}. */ public final class DefaultDatabaseProvider implements DatabaseProvider { private final SQLiteOpenHelper sqliteOpenHelper; /*...
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|> */ public static void setVersion( SQLiteDatabase writableDatabase, @Feature int feature, String instanceUid, int version) throws DatabaseIOException { try { writableDatabase.execSQL(SQL_CREATE_TABLE_IF_NOT_EXISTS); ContentValues values = new ContentValues(); values.put...
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|>odec.CryptoInfo.Pattern */ public int encryptedBlocks; /** * @see android.media.MediaCodec.CryptoInfo.Pattern */ public int clearBlocks; private final android.media.MediaCodec.CryptoInfo frameworkCryptoInfo; private final PatternHolderV24 patternHolder; public CryptoInfo() { fra...
fim
yuliskov/SmartTube
java
<|fim_suffix|> be called when the decoder is no longer needed. */ void release(); } <|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 c...
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|>/ public final void flip() { data.flip(); } @Override public void clear() { super.clear(); if (data != null) { data.clear(); } } private ByteBuffer createReplacementByteBuffer(int requiredCapacity) { if (bufferReplacementMode == BUFFER_REPLACEMENT_MODE_NORMAL) { ...
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|>utput buffer * to decode into. * <p> * Should only be called whilst synchronized on the lock object. */ private void maybeNotifyDecodeLoop() { if (canDecodeBuffer()) { lock.notify(); } } private void run() { try { while (decode()) { // Do nothing. }...
fim
yuliskov/SmartTube
java
<|fim_suffix|>meUs The presentation timestamp for the buffer, in microseconds. * @param size An upper bound on the size of the data that will be written to the buffer. * @return The {@link #data} buffer, for convenience. */ public ByteBuffer init(long timeUs, int size) { this.timeUs = timeUs; if (dat...
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|>is operation. * * <p>Must only be called as releasing counter-part of {@link #acquireReference()}. */ @SuppressWarnings("unchecked") public void releaseReference() { if (--referenceCount == 0) { owner.onLastReferenceReleased((T) this); } else if (referenceCount < 0) { thro...
fim
yuliskov/SmartTube
java
<|fim_suffix|>nManager.MODE_RELEASE) { Assertions.checkNotNull(offlineLicenseKeySetId); } this.uuid = uuid; this.provisioningManager = provisioningManager; this.mediaDrm = mediaDrm; this.mode = mode; if (offlineLicenseKeySetId != null) { this.offlineLicenseKeySetId = offlineLicenseKe...
fim
yuliskov/SmartTube
java
<|fim_suffix|> onDrmSessionReleased() {} } <|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.apa...
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|>sion * has been opened or after it's been released. * * <p>Since DRM license policies vary by vendor, the specific status field names are determined by * each DRM vendor. Refer to your DRM provider documentation for definitions of the field names * for a particular DRM engine plugin. * ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>kLooper The looper associated with the media playback thread. * @param drmInitData DRM initialization data. All contained {@link SchemeData}s must contain * non-null {@link SchemeData#data}. * @return The DRM session. */ DrmSession<T> acquireSession(Looper playbackLooper, DrmInitData drm...
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 <|fim_suffix|>; /** An opaque {@link android.media.MediaCrypto} equivalent. */ public interface ExoMediaCrypto {} <|fim...
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|>Key had to be accessed using the Common PSSH UUID prior to API level 27. return Util.SDK_INT < 27 && C.CLEARKEY_UUID.equals(uuid) ? C.COMMON_PSSH_UUID : uuid; } private static byte[] adjustRequestInitData(UUID uuid, byte[] initData) { // TODO: Add API level check once [Internal ref: b/1121420...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ID.equals(uuid)) { requestProperties.put("SOAPAction", "http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"); } // Add additional request properties. synchronized (keyRequestProperties) { requestProperties.putAll(keyRequestProperties); } return exec...
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 * *<|fim_suffix|>ed by applicable law or agreed to in writing, sof...
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"); <|fim_suffix|>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_suffix|>flineLicenseKeySetId(); drmSessionManager.releaseSession(drmSession); if (error != null) { throw error; } return Assertions.checkNotNull(keySetId); } private DrmSession<T> openBlockingKeyRequest( @Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, DrmInitData d...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ME, REASON_INSTANTIATION_ERROR}) public @interface Reason {} /** * The requested DRM scheme is unsupported by the device. */ public static final int REASON_UNSUPPORTED_SCHEME = 1; /** * There device advertises support for the requested DRM scheme, but there was an error * instantiating...
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|>; } /** Updates the floor constraints (inclusive) of the seek operation. */ private void updateSeekFloor(long floorTimePosition, long floorBytePosition) { this.floorTimePosition = floorTimePosition; this.floorBytePosition = floorBytePosition; updateNextSearchBytePosition(); ...
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) 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, 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.ap<|fim_suffix|>mDataSource(target, offset, le...
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|>ass DummyExtractorOutput implements ExtractorOutput { @Override public TrackOutput track(int id, int type) { return new DummyTrackOutput(); } @Override public void endTracks() { // Do nothing. } @Override public void seekMap(SeekMap seekMap) { // Do nothing. } } <|fim_pref...
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|>ing from the * position in the stream reached by the returning call. If the extractor requires data to be * provided from a different position, then that position is set in {@code seekPosition} and * {@link #RESULT_SEEK} is returned. If the extractor reached the end of the data provided by the ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ncountered. * @throws IOException If an error occurs peeking from the input. * @throws InterruptedException If the thread is interrupted. */ void peekFully(byte[] target, int offset, int length) throws IOException, InterruptedException; /** * Advances the peek position by {@code length} b...
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)<|fim_suffix|>tware * 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.g...
fim
yuliskov/SmartTube
java
<|fim_suffix|>, 16); int encoderPadding = Integer.parseInt(matcher.group(2), 16); if (encoderDelay > 0 || encoderPadding > 0) { this.encoderDelay = encoderDelay; this.encoderPadding = encoderPadding; return true; } } catch (NumberFormatException e) { /...
fim
yuliskov/SmartTube
java
<|fim_suffix|>reak; } scratch.setPosition(0); if (scratch.readUnsignedInt24() != Id3Decoder.ID3_TAG) { // Not an ID3 tag. break; } scratch.skipBytes(3); // Skip major version, minor version and flags. int framesLength = scratch.readSynchSafeInt(); int tagLength ...
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 Licens<|fim_suffix|> /** * The held position. */ public long position; } <|fim_middle|>e. * You may obtain a...
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 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|>read from the input. * @param allowEndOfInput True if encountering the end of the input having read no data is * allowed, and should result in {@link C#RESULT_END_OF_INPUT} being returned. False if it * should be considered an error, causing an {@link EOFException} to be thrown. * @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) 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|>} private long getCurrentTimestampUs() { return outputFirstSample ? (mediaTagTimestampOffsetUs + tagTimestampUs) : (metadataReader.getDurationUs() == C.TIME_UNSET ? 0 : tagTimestampUs); } } <|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under...
fim
yuliskov/SmartTube
java
<|fim_suffix|>Read a string from an AMF encoded buffer. * * @param data The buffer from which to read. * @return The value read from the buffer. */ private static String readAmfString(ParsableByteArray data) { int size = data.readUnsignedShort(); int position = data.getPosition(); data.skipByt...
fim
yuliskov/SmartTube
java
<|fim_suffix|> return parseHeader(data) && parsePayload(data, timeUs); } /** * Parses tag header. * * @param data Buffer where the tag header is stored. * @return Whether the header was parsed successfully. * @throws ParserException If an error occurs parsing the header. */ protected abstract...
fim
yuliskov/SmartTube
java
<|fim_suffix|>utputKeyframe = false; } @Override protected boolean parseHeader(ParsableByteArray data) throws UnsupportedFormatException { int header = data.readUnsignedByte(); int frameType = (header >> 4) & 0x0F; int videoCodec = (header & 0x0F); // Support just H.264 encoded content. if (v...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ntContentSize > Integer.MAX_VALUE) { throw new ParserException("String element size: " + elementContentSize); } processor.stringElement(elementId, readString(input, (int) elementContentSize)); elementState = ELEMENT_STATE_READ_ID; return true; ca...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ram contentsSize The element's content size. * @param input The {@link ExtractorInput} from which data should be read. * @throws ParserException If a parsing error occurs. * @throws IOException If an error occurs reading from the input. * @throws InterruptedException If the thread is interrupt...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ad(ExtractorInput)} will start reading a new EBML structure * from scratch. */ void reset(); /** * Reads from an {@link ExtractorInput}, invoking an event callback if possible. * * @param input The {@link ExtractorInput} from which data should be read. * @return True if data can con...
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|>r.bitrate, mpegAudioHeader.frameSize); } @Override public long getTimeUs(long position) { return getTimeUsAtPosition(position); } @Override public long getDataEndPosition() { return C.POSITION_UNSET; } } <|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * L...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ts getSeekPoints(long timeUs) { timeUs = Util.constrainValue(timeUs, 0, durationUs); Pair<Long, Long> timeMsAndPosition = linearlyInterpolate(C.usToMs(timeUs), referenceTimesMs, referencePositions); timeUs = C.msToUs(timeMsAndPosition.first); long position = timeMsAndPosition.secon...
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) 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 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|>t one to have been added is returned. * * @param type The container type. * @return The child container of the given type, or null if no such child exists. */ public @Nullable ContainerAtom getContainerAtomOfType(int type) { int childrenSize = containerChildren.size(); ...
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|>t sampleDescriptionIndex, int duration, int size, int flags) { this.sampleDescriptionIndex = sampleDescriptionIndex; this.duration = duration; this.size = size; this.flags = flags; } } <|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache...
fim
yuliskov/SmartTube
java
<|fim_suffix|> * @param fixedSampleSize Size in bytes of each sample. * @param chunkOffsets Chunk offsets in the MP4 stream to rechunk. * @param chunkSampleCounts Sample counts for each of the MP4 stream's chunks. * @param timestampDeltaInTimeUnits Timestamp delta between each sample in time units. */ pub...
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|>ndicator}. */ public final byte[] value; /** The four byte locale indicator. */ public final int localeIndicator; /** The four byte type indicator. */ public final int typeIndicator; /** Creates a new metadata entry for the specified metadata key/value. */ public MdtaMetadataEntry(String ke...
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|>ndroid.exoplayer2.util.ParsableByteArray; import java.nio.ByteBuffer; import java.util.UUID; /** * Utility methods for handling PSSH atoms. */ public final class PsshAtomUtil { private static final String TAG = "PsshAtomUtil"; private PsshAtomUtil() {} /** * Builds a version 0 PSSH atom 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|>eTimescale; /** * The duration of the track in microseconds, or {@link C#TIME_UNSET} if unknown. */ public final long durationUs; /** * The format. */ public final Format format; /** * One of {@code TRANSFORMATION_*}. Defines the transformation to apply before outputting 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
<|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