mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Rename "setSampleCopyEnabled" to "setSampleCopyingEnabled" in muxer
PiperOrigin-RevId: 708322440
This commit is contained in:
parent
684c394019
commit
1b0e2fb75e
@ -26,6 +26,8 @@
|
|||||||
* DRM:
|
* DRM:
|
||||||
* Effect:
|
* Effect:
|
||||||
* Muxers:
|
* Muxers:
|
||||||
|
* Renamed `setSampleCopyEnabled()` method to `setSampleCopyingEnabled()`
|
||||||
|
in both `Mp4Muxer.Builder` and `FragmentedMp4Muxer.Builder`.
|
||||||
* IMA extension:
|
* IMA extension:
|
||||||
* Session:
|
* Session:
|
||||||
* UI:
|
* UI:
|
||||||
|
@ -128,7 +128,7 @@ public final class FragmentedMp4Muxer implements Muxer {
|
|||||||
* <p>The default value is {@code true}.
|
* <p>The default value is {@code true}.
|
||||||
*/
|
*/
|
||||||
@CanIgnoreReturnValue
|
@CanIgnoreReturnValue
|
||||||
public Builder setSampleCopyEnabled(boolean enabled) {
|
public Builder setSampleCopyingEnabled(boolean enabled) {
|
||||||
this.sampleCopyEnabled = enabled;
|
this.sampleCopyEnabled = enabled;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -163,17 +163,17 @@ public final class FragmentedMp4Muxer implements Muxer {
|
|||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
* <p>Samples are written to the disk in batches. If {@link Builder#setSampleCopyEnabled(boolean)
|
* <p>Samples are written to the disk in batches. If {@link
|
||||||
* sample copying} is disabled, the {@code byteBuffer} and the {@code bufferInfo} must not be
|
* Builder#setSampleCopyingEnabled(boolean) sample copying} is disabled, the {@code byteBuffer}
|
||||||
* modified after calling this method. Otherwise, they are copied and it is safe to modify them
|
* and the {@code bufferInfo} must not be modified after calling this method. Otherwise, they are
|
||||||
* after this method returns.
|
* copied and it is safe to modify them after this method returns.
|
||||||
*
|
*
|
||||||
* <p>Note: Out of order B-frames are currently not supported.
|
* <p>Note: Out of order B-frames are currently not supported.
|
||||||
*
|
*
|
||||||
* @param trackToken The {@link TrackToken} for which this sample is being written.
|
* @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
|
* @param byteBuffer The encoded sample. The muxer takes ownership of the buffer if {@link
|
||||||
* Builder#setSampleCopyEnabled(boolean) sample copying} is disabled. Otherwise, the position
|
* Builder#setSampleCopyingEnabled(boolean) sample copying} is disabled. Otherwise, the
|
||||||
* of the buffer is updated but the caller retains ownership.
|
* position of the buffer is updated but the caller retains ownership.
|
||||||
* @param bufferInfo The {@link BufferInfo} related to this sample.
|
* @param bufferInfo The {@link BufferInfo} related to this sample.
|
||||||
* @throws MuxerException If there is any error while writing data to the disk.
|
* @throws MuxerException If there is any error while writing data to the disk.
|
||||||
*/
|
*/
|
||||||
|
@ -259,7 +259,7 @@ public final class Mp4Muxer implements Muxer {
|
|||||||
* <p>The default value is {@code true}.
|
* <p>The default value is {@code true}.
|
||||||
*/
|
*/
|
||||||
@CanIgnoreReturnValue
|
@CanIgnoreReturnValue
|
||||||
public Mp4Muxer.Builder setSampleCopyEnabled(boolean enabled) {
|
public Mp4Muxer.Builder setSampleCopyingEnabled(boolean enabled) {
|
||||||
this.sampleCopyEnabled = enabled;
|
this.sampleCopyEnabled = enabled;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -442,15 +442,15 @@ public final class Mp4Muxer implements Muxer {
|
|||||||
* <p>When sample batching is {@linkplain Mp4Muxer.Builder#setSampleBatchingEnabled(boolean)
|
* <p>When sample batching is {@linkplain Mp4Muxer.Builder#setSampleBatchingEnabled(boolean)
|
||||||
* enabled}, provide sample data ({@link ByteBuffer}, {@link BufferInfo}) that won't be modified
|
* enabled}, provide sample data ({@link ByteBuffer}, {@link BufferInfo}) that won't be modified
|
||||||
* after calling the {@link #writeSampleData(TrackToken, ByteBuffer, BufferInfo)} method, unless
|
* 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
|
* 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
|
* Mp4Muxer.Builder#setSampleCopyingEnabled(boolean) enabled}, it's safe to modify the data after
|
||||||
* method returns, as the muxer internally creates a sample copy.
|
* the method returns, as the muxer internally creates a sample copy.
|
||||||
*
|
*
|
||||||
* @param trackToken The {@link TrackToken} for which this sample is being written.
|
* @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
|
* @param byteBuffer The encoded sample. The muxer takes ownership of the buffer if {@link
|
||||||
* Builder#setSampleCopyEnabled(boolean) sample copying} is disabled. Otherwise, the position
|
* Builder#setSampleCopyingEnabled(boolean) sample copying} is disabled. Otherwise, the
|
||||||
* of the buffer is updated but the caller retains ownership.
|
* position of the buffer is updated but the caller retains ownership.
|
||||||
* @param bufferInfo The {@link BufferInfo} related to this sample.
|
* @param bufferInfo The {@link BufferInfo} related to this sample.
|
||||||
* @throws MuxerException If an error occurs while writing data to the output file.
|
* @throws MuxerException If an error occurs while writing data to the output file.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user