heifwriter/src/main/java/androidx/heifwriter/HeifEncoder.java
private void addYuvBufferInternal(@Nullable byte[] data) {
        ByteBuffer buffer = acquireEmptyBuffer();
        if (buffer == null) {
            return;
        }
        buffer.clear();
        if (data != null) {
            buffer.put(data);
        }
        buffer.flip();
        synchronized (mFilledBuffers) {
            mFilledBuffers.add(buffer);
        }
        mHandler.post(new Runnable() {
            @Override
            public void run() {
                maybeCopyOneTileYUV();
            }
        });
    }
/**
     * Obtains one empty input buffer and copies the data into it. Before input
     * EOS is sent, this would block until the data is copied. After input EOS
     * is sent, this would return immediately.
     */
Obtains one empty input buffer and copies the data into it. Before input
EOS is sent, this would block until the data is copied. After input EOS
is sent, this would return immediately.
Obtains one empty input buffer and copies the data into it . Before input EOS is sent this would block until the data is copied . After input EOS is sent this would return immediately .
private void addYuvBufferInternal(@Nullable byte[] data) {
        ByteBuffer buffer = acquireEmptyBuffer();
        if (buffer == null) {
            return;
        }
        buffer.clear();
        if (data != null) {
            buffer.put(data);
        }
        buffer.flip();
        synchronized (mFilledBuffers) {
            mFilledBuffers.add(buffer);
        }
        mHandler.post(new Runnable() {
            @Override
            public void run() {
                maybeCopyOneTileYUV();
            }
        });
    }
private void addYuvBufferInternal ( @ Nullable byte [ ] data ) { ByteBuffer buffer = acquireEmptyBuffer ( ) ; if ( buffer == null ) { return ; } buffer . clear ( ) ; if ( data != null ) { buffer . put ( data ) ; } buffer . flip ( ) ; synchronized ( mFilledBuffers ) { mFilledBuffers . add ( buffer ) ; } mHandler . post ( new Runnable ( ) { @ Override public void run ( ) { maybeCopyOneTileYUV ( ) ; } } ) ; }
Obtains one empty input buffer and copies the data into it.
Obtains one empty input buffer and copies the data into it .