MediaRecorder:add note for setMaxFileSize/Duration

Added note about the side effects of setting a very large file size and duration using methods
setMaxFileSize and setMaxDuration respectively.

Bug: 62071579

Test: make offline-sdk-docs
      Added notes were visible in MediaRecorder.html

Change-Id: I7542da0bb55af286ac0c4c736ef783d8f4a4918a
This commit is contained in:
Gopalakrishnan Nallasamy
2018-12-27 10:36:28 -08:00
parent 53f0d06de5
commit 40056f4afd

View File

@@ -698,6 +698,12 @@ public class MediaRecorder implements AudioRouting,
* is no guarantee that the recorder will have stopped by the time the
* listener is notified.
*
* <p>When using MPEG-4 container ({@link #setOutputFormat(int)} with
* {@link OutputFormat#MPEG_4}), it is recommended to set maximum duration that fits the use
* case. Setting a larger than required duration may result in a larger than needed output file
* because of space reserved for MOOV box expecting large movie data in this recording session.
* Unused space of MOOV box is turned into FREE box in the output file.</p>
*
* @param max_duration_ms the maximum duration in ms (if zero or negative, disables the duration limit)
*
*/
@@ -713,6 +719,12 @@ public class MediaRecorder implements AudioRouting,
* is no guarantee that the recorder will have stopped by the time the
* listener is notified.
*
* <p>When using MPEG-4 container ({@link #setOutputFormat(int)} with
* {@link OutputFormat#MPEG_4}), it is recommended to set maximum filesize that fits the use
* case. Setting a larger than required filesize may result in a larger than needed output file
* because of space reserved for MOOV box expecting large movie data in this recording session.
* Unused space of MOOV box is turned into FREE box in the output file.</p>
*
* @param max_filesize_bytes the maximum filesize in bytes (if zero or negative, disables the limit)
*
*/