Rename "setSampleCopyEnabled" to "setSampleCopyingEnabled" in muxer

PiperOrigin-RevId: 708322440
This commit is contained in:
sheenachhabra 2024-12-20 07:55:32 -08:00 committed by Copybara-Service
parent 684c394019
commit 1b0e2fb75e
3 changed files with 15 additions and 13 deletions

View File

@ -26,6 +26,8 @@
* DRM:
* Effect:
* Muxers:
* Renamed `setSampleCopyEnabled()` method to `setSampleCopyingEnabled()`
in both `Mp4Muxer.Builder` and `FragmentedMp4Muxer.Builder`.
* IMA extension:
* Session:
* UI:

View File

@ -128,7 +128,7 @@ public final class FragmentedMp4Muxer implements Muxer {
* <p>The default value is {@code true}.
*/
@CanIgnoreReturnValue
public Builder setSampleCopyEnabled(boolean enabled) {
public Builder setSampleCopyingEnabled(boolean enabled) {
this.sampleCopyEnabled = enabled;
return this;
}
@ -163,17 +163,17 @@ public final class FragmentedMp4Muxer implements Muxer {
/**
* {@inheritDoc}
*
* <p>Samples are written to the disk in batches. If {@link Builder#setSampleCopyEnabled(boolean)
* sample copying} is disabled, the {@code byteBuffer} and the {@code bufferInfo} must not be
* modified after calling this method. Otherwise, they are copied and it is safe to modify them
* after this method returns.
* <p>Samples are written to the disk in batches. If {@link
* Builder#setSampleCopyingEnabled(boolean) sample copying} is disabled, the {@code byteBuffer}
* and the {@code bufferInfo} must not be modified after calling this method. Otherwise, they are
* copied and it is safe to modify them after this method returns.
*
* <p>Note: Out of order B-frames are currently not supported.
*
* @param trackToken The {@link TrackToken} for which this sample is being written.
* @param byteBuffer The encoded sample. The muxer takes ownership of the buffer if {@link
* Builder#setSampleCopyEnabled(boolean) sample copying} is disabled. Otherwise, the position
* of the buffer is updated but the caller retains ownership.
* Builder#setSampleCopyingEnabled(boolean) sample copying} is disabled. Otherwise, the
* position of the buffer is updated but the caller retains ownership.
* @param bufferInfo The {@link BufferInfo} related to this sample.
* @throws MuxerException If there is any error while writing data to the disk.
*/

View File

@ -259,7 +259,7 @@ public final class Mp4Muxer implements Muxer {
* <p>The default value is {@code true}.
*/
@CanIgnoreReturnValue
public Mp4Muxer.Builder setSampleCopyEnabled(boolean enabled) {
public Mp4Muxer.Builder setSampleCopyingEnabled(boolean enabled) {
this.sampleCopyEnabled = enabled;
return this;
}
@ -442,15 +442,15 @@ public final class Mp4Muxer implements Muxer {
* <p>When sample batching is {@linkplain Mp4Muxer.Builder#setSampleBatchingEnabled(boolean)
* enabled}, provide sample data ({@link ByteBuffer}, {@link BufferInfo}) that won't be modified
* after calling the {@link #writeSampleData(TrackToken, ByteBuffer, BufferInfo)} method, unless
* sample copying is also {@linkplain Mp4Muxer.Builder#setSampleCopyEnabled(boolean) enabled}.
* sample copying is also {@linkplain Mp4Muxer.Builder#setSampleCopyingEnabled(boolean) enabled}.
* This ensures data integrity within the batch. If sample copying is {@linkplain
* Mp4Muxer.Builder#setSampleCopyEnabled(boolean) enabled}, it's safe to modify the data after the
* method returns, as the muxer internally creates a sample copy.
* Mp4Muxer.Builder#setSampleCopyingEnabled(boolean) enabled}, it's safe to modify the data after
* the method returns, as the muxer internally creates a sample copy.
*
* @param trackToken The {@link TrackToken} for which this sample is being written.
* @param byteBuffer The encoded sample. The muxer takes ownership of the buffer if {@link
* Builder#setSampleCopyEnabled(boolean) sample copying} is disabled. Otherwise, the position
* of the buffer is updated but the caller retains ownership.
* Builder#setSampleCopyingEnabled(boolean) sample copying} is disabled. Otherwise, the
* position of the buffer is updated but the caller retains ownership.
* @param bufferInfo The {@link BufferInfo} related to this sample.
* @throws MuxerException If an error occurs while writing data to the output file.
*/