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

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

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

origin: google/ExoPlayer

@Override
public int readData(FormatHolder formatHolder, DecoderInputBuffer buffer,
  boolean formatRequired) {
 buffer.setFlags(C.BUFFER_FLAG_END_OF_STREAM);
 return C.RESULT_BUFFER_READ;
}
origin: google/ExoPlayer

@Override
public int readData(FormatHolder formatHolder, DecoderInputBuffer buffer,
  boolean formatRequired) {
 if (formatRequired || !isFormatSentDownstream) {
  formatHolder.format = upstreamFormat;
  isFormatSentDownstream = true;
  return C.RESULT_FORMAT_READ;
 }
 if (currentIndex == eventTimesUs.length) {
  if (!eventStreamAppendable) {
   buffer.setFlags(C.BUFFER_FLAG_END_OF_STREAM);
   return C.RESULT_BUFFER_READ;
  } else {
   return C.RESULT_NOTHING_READ;
  }
 }
 int sampleIndex = currentIndex++;
 byte[] serializedEvent = eventMessageEncoder.encode(eventStream.events[sampleIndex],
   eventStream.timescale);
 if (serializedEvent != null) {
  buffer.ensureSpaceForWrite(serializedEvent.length);
  buffer.setFlags(C.BUFFER_FLAG_KEY_FRAME);
  buffer.data.put(serializedEvent);
  buffer.timeUs = eventTimesUs[sampleIndex];
  return C.RESULT_BUFFER_READ;
 } else {
  return C.RESULT_NOTHING_READ;
 }
}
origin: google/ExoPlayer

if (!hasNextSample()) {
 if (loadingFinished || isLastSampleQueued) {
  buffer.setFlags(C.BUFFER_FLAG_END_OF_STREAM);
  return C.RESULT_BUFFER_READ;
 } else if (upstreamFormat != null
buffer.setFlags(flags[relativeReadIndex]);
extrasHolder.size = sizes[relativeReadIndex];
extrasHolder.offset = offsets[relativeReadIndex];
origin: google/ExoPlayer

@Override
public int readData(FormatHolder formatHolder, DecoderInputBuffer buffer,
  boolean formatRequired) {
 if (eventDispatcher != null && !notifiedDownstreamFormat) {
  eventDispatcher.downstreamFormatChanged(
    C.TRACK_TYPE_UNKNOWN,
    format,
    C.SELECTION_REASON_UNKNOWN,
    /* trackSelectionData= */ null,
    /* mediaTimeUs= */ 0);
  notifiedDownstreamFormat = true;
 }
 if (formatRequired || !readFormat) {
  formatHolder.format = format;
  readFormat = true;
  return C.RESULT_FORMAT_READ;
 } else if (!readSample) {
  buffer.timeUs = 0;
  buffer.ensureSpaceForWrite(1);
  buffer.data.put((byte) 0);
  buffer.flip();
  readSample = true;
  return C.RESULT_BUFFER_READ;
 } else {
  buffer.setFlags(C.BUFFER_FLAG_END_OF_STREAM);
  return C.RESULT_BUFFER_READ;
 }
}
origin: google/ExoPlayer

buffer.setFlags(C.BUFFER_FLAG_END_OF_STREAM);
return C.RESULT_BUFFER_READ;
     && getBufferedPositionUs() == C.TIME_END_OF_SOURCE))) {
buffer.clear();
buffer.setFlags(C.BUFFER_FLAG_END_OF_STREAM);
sentEos = true;
return C.RESULT_BUFFER_READ;
origin: google/ExoPlayer

@Override
public int readData(FormatHolder formatHolder, DecoderInputBuffer buffer,
  boolean formatRequired) {
 if (eventDispatcher != null && !notifiedDownstreamFormat) {
  eventDispatcher.downstreamFormatChanged(
    C.TRACK_TYPE_UNKNOWN,
    format,
    C.SELECTION_REASON_UNKNOWN,
    /* trackSelectionData= */ null,
    /* mediaTimeUs= */ 0);
  notifiedDownstreamFormat = true;
 }
 if (formatRequired || !readFormat) {
  formatHolder.format = format;
  readFormat = true;
  return C.RESULT_FORMAT_READ;
 } else if (!readSample) {
  buffer.timeUs = 0;
  buffer.ensureSpaceForWrite(1);
  buffer.data.put((byte) 0);
  buffer.flip();
  readSample = true;
  return C.RESULT_BUFFER_READ;
 } else {
  buffer.setFlags(C.BUFFER_FLAG_END_OF_STREAM);
  return C.RESULT_BUFFER_READ;
 }
}
origin: google/ExoPlayer

inputBuffer.setFlags(C.BUFFER_FLAG_END_OF_STREAM);
decoder.queueInputBuffer(inputBuffer);
inputBuffer = null;
com.google.android.exoplayer2.decoderDecoderInputBuffersetFlags

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
  • flip
    Flips #data in preparation for being queued to a decoder.
  • isEncrypted
    Returns whether the C#BUFFER_FLAG_ENCRYPTED flag is set.
  • isDecodeOnly
  • isKeyFrame
  • newFlagsOnlyInstance
    Creates a new instance for which #isFlagsOnly() will return true.
  • addFlag
  • createReplacementByteBuffer
  • getFlag
  • createReplacementByteBuffer,
  • getFlag,
  • isFlagsOnly

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Join (org.hibernate.mapping)
  • Top 12 Jupyter Notebook extensions
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