WebmMuxer.Builder


public final class WebmMuxer.Builder


A builder for WebmMuxer instances.

Summary

Public constructors

Builder(SeekableMuxerOutput seekableMuxerOutput)

Creates an instance.

Public methods

WebmMuxer

Builds a WebmMuxer instance.

WebmMuxer.Builder

Sets whether to enable the sample copy.

Public constructors

Builder

public Builder(SeekableMuxerOutput seekableMuxerOutput)

Creates an instance.

Parameters
SeekableMuxerOutput seekableMuxerOutput

The SeekableMuxerOutput to write the media data to. It will be automatically closed by the muxer when close is called.

Public methods

build

public WebmMuxer build()

Builds a WebmMuxer instance.

setSampleCopyEnabled

@CanIgnoreReturnValue
public WebmMuxer.Builder setSampleCopyEnabled(boolean enabled)

Sets whether to enable the sample copy.

If the sample copy is enabled, writeSampleData copies the input ByteBuffer and BufferInfo before it returns, so it is safe to reuse them immediately. Otherwise, the muxer takes ownership of the ByteBuffer and the BufferInfo and the caller must not modify them.

The default value is true.