Tabnine Logo
DecoderInputBuffer.isEncrypted
Code IndexAdd Tabnine to your IDE (free)

How to use
isEncrypted
method
in
com.google.android.exoplayer2.decoder.DecoderInputBuffer

Best Java code snippets using com.google.android.exoplayer2.decoder.DecoderInputBuffer.isEncrypted (Showing top 7 results out of 315)

origin: google/ExoPlayer

int result = inputBuffer.isEncrypted()
  ? opusSecureDecode(nativeDecoderContext, inputBuffer.timeUs, inputData, inputData.limit(),
    outputBuffer, SAMPLE_RATE, exoMediaCrypto, cryptoInfo.mode,
origin: google/ExoPlayer

private void assertInputBufferHasNoDefaultFlagsSet() {
 assertThat(inputBuffer.isEndOfStream()).isFalse();
 assertThat(inputBuffer.isDecodeOnly()).isFalse();
 assertThat(inputBuffer.isEncrypted()).isFalse();
}
origin: google/ExoPlayer

if (buffer.isEncrypted()) {
 readEncryptionData(buffer, extrasHolder);
origin: google/ExoPlayer

/**
 * Asserts {@link SampleQueue#read} returns {@link C#RESULT_BUFFER_READ} and that the
 * {@link DecoderInputBuffer#isEndOfStream()} is set.
 *
 * @param formatRequired The value of {@code formatRequired} passed to readData.
 */
private void assertReadEndOfStream(boolean formatRequired) {
 clearFormatHolderAndInputBuffer();
 int result = sampleQueue.read(formatHolder, inputBuffer, formatRequired, true, 0);
 assertThat(result).isEqualTo(RESULT_BUFFER_READ);
 // formatHolder should not be populated.
 assertThat(formatHolder.format).isNull();
 // inputBuffer should not contain sample data, but end of stream flag should be set.
 assertInputBufferContainsNoSampleData();
 assertThat(inputBuffer.isEndOfStream()).isTrue();
 assertThat(inputBuffer.isDecodeOnly()).isFalse();
 assertThat(inputBuffer.isEncrypted()).isFalse();
}
origin: google/ExoPlayer

/**
 * Asserts {@link SampleQueue#read} returns {@link C#RESULT_BUFFER_READ} and that the buffer is
 * filled with the specified sample data.
 *
 * @param timeUs The expected buffer timestamp.
 * @param isKeyframe The expected keyframe flag.
 * @param sampleData An array containing the expected sample data.
 * @param offset The offset in {@code sampleData} of the expected sample data.
 * @param length The length of the expected sample data.
 */
private void assertReadSample(
  long timeUs, boolean isKeyframe, byte[] sampleData, int offset, int length) {
 clearFormatHolderAndInputBuffer();
 int result = sampleQueue.read(formatHolder, inputBuffer, false, false, 0);
 assertThat(result).isEqualTo(RESULT_BUFFER_READ);
 // formatHolder should not be populated.
 assertThat(formatHolder.format).isNull();
 // inputBuffer should be populated.
 assertThat(inputBuffer.timeUs).isEqualTo(timeUs);
 assertThat(inputBuffer.isKeyFrame()).isEqualTo(isKeyframe);
 assertThat(inputBuffer.isDecodeOnly()).isFalse();
 assertThat(inputBuffer.isEncrypted()).isFalse();
 inputBuffer.flip();
 assertThat(inputBuffer.data.limit()).isEqualTo(length);
 byte[] readData = new byte[length];
 inputBuffer.data.get(readData);
 assertThat(readData).isEqualTo(copyOfRange(sampleData, offset, offset + length));
}
origin: google/ExoPlayer

boolean bufferEncrypted = buffer.isEncrypted();
waitingForKeys = shouldWaitForKeys(bufferEncrypted);
if (waitingForKeys) {
origin: google/ExoPlayer

 return false;
boolean bufferEncrypted = inputBuffer.isEncrypted();
waitingForKeys = shouldWaitForKeys(bufferEncrypted);
if (waitingForKeys) {
com.google.android.exoplayer2.decoderDecoderInputBufferisEncrypted

Javadoc

Returns whether the C#BUFFER_FLAG_ENCRYPTED flag is set.

Popular methods of DecoderInputBuffer

  • <init>
  • clear
  • ensureSpaceForWrite
    Ensures that #data is large enough to accommodate a write of a given length at its current position.
  • isEndOfStream
  • setFlags
  • flip
    Flips #data in preparation for being queued to a decoder.
  • isDecodeOnly
  • isKeyFrame
  • newFlagsOnlyInstance
    Creates a new instance for which #isFlagsOnly() will return true.
  • addFlag
  • createReplacementByteBuffer
  • getFlag
  • createReplacementByteBuffer,
  • getFlag,
  • isFlagsOnly

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now