Clarify the stream closing responsibility in muxer

PiperOrigin-RevId: 708359779
This commit is contained in:
sheenachhabra 2024-12-20 10:21:31 -08:00 committed by Copybara-Service
parent 8188f7a865
commit f22d91d9e5
2 changed files with 5 additions and 2 deletions

View File

@ -95,7 +95,9 @@ public final class FragmentedMp4Muxer implements Muxer {
/** /**
* Creates a {@link Builder} instance with default values. * Creates a {@link Builder} instance with default values.
* *
* @param fileOutputStream The {@link FileOutputStream} to write the media data to. * @param fileOutputStream The {@link FileOutputStream} to write the media data to. This stream
* will be automatically closed by the muxer when {@link FragmentedMp4Muxer#close()} is
* called.
*/ */
public Builder(FileOutputStream fileOutputStream) { public Builder(FileOutputStream fileOutputStream) {
this.fileOutputStream = fileOutputStream; this.fileOutputStream = fileOutputStream;

View File

@ -210,7 +210,8 @@ public final class Mp4Muxer implements Muxer {
/** /**
* Creates a {@link Builder} instance with default values. * Creates a {@link Builder} instance with default values.
* *
* @param outputStream The {@link FileOutputStream} to write the media data to. * @param outputStream The {@link FileOutputStream} to write the media data to. This stream will
* be automatically closed by the muxer when {@link Mp4Muxer#close()} is called.
*/ */
public Builder(FileOutputStream outputStream) { public Builder(FileOutputStream outputStream) {
this.outputStream = outputStream; this.outputStream = outputStream;