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

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

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

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

if (waitingForFirstSyncFrame && !buffer.isKeyFrame()) {
 buffer.clear();
 if (codecReconfigurationState == RECONFIGURATION_STATE_QUEUE_PENDING) {
com.google.android.exoplayer2.decoderDecoderInputBufferisKeyFrame

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.
  • isEncrypted
    Returns whether the C#BUFFER_FLAG_ENCRYPTED flag is set.
  • isDecodeOnly
  • newFlagsOnlyInstance
    Creates a new instance for which #isFlagsOnly() will return true.
  • addFlag
  • createReplacementByteBuffer
  • getFlag
  • createReplacementByteBuffer,
  • getFlag,
  • isFlagsOnly

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getApplicationContext (Context)
  • findViewById (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JList (javax.swing)
  • Top Vim plugins
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