@Implementation
  protected static void nativeWriteSampleData(
      long nativeObject,
      int trackIndex,
      @NonNull ByteBuffer byteBuf,
      int offset,
      int size,
      long presentationTimeUs,
      @MediaCodec.BufferFlag int flags) {
    int toWrite = size - offset;
    byte[] bytes = new byte[toWrite];
    byteBuf.get(bytes, 0, toWrite);

    try {
      getStream(nativeObject).write(bytes);
    } catch (IOException e) {
      throw new RuntimeException("Unable to write to temporary file.", e);
    }
  }
@Implementation
  protected static void nativeWriteSampleData(
      long nativeObject,
      int trackIndex,
      @NonNull ByteBuffer byteBuf,
      int offset,
      int size,
      long presentationTimeUs,
      @MediaCodec.BufferFlag int flags) {
    int toWrite = size - offset;
    byte[] bytes = new byte[toWrite];
    byteBuf.get(bytes, 0, toWrite);

    try {
      getStream(nativeObject).write(bytes);
    } catch (IOException e) {
      throw new RuntimeException("Unable to write to temporary file.", e);
    }
  }
@ Implementation protected static void nativeWriteSampleData ( long nativeObject , int trackIndex , @ NonNull ByteBuffer byteBuf , int offset , int size , long presentationTimeUs , @ MediaCodec . BufferFlag int flags ) { int toWrite = size - offset ; byte [ ] bytes = new byte [ toWrite ] ; byteBuf . get ( bytes , 0 , toWrite ) ; try { getStream ( nativeObject ) . write ( bytes ) ; } catch ( IOException e ) { throw new RuntimeException ( "Unable to write to temporary file." , e ) ; } }
Writes the given data to the FileOutputStream for the associated muxer.
Writes the given data to the FileOutputStream for the associated muxer .