Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22bf7a7e authored by James Dong's avatar James Dong
Browse files

Add some comment to MediaRecorder.stop() about the stop() failure (-1007)

o The intended failure happens if stop() call comes immediately after start() call
  before any media data from the output of the encoder is received.

Change-Id: I62fad123ac67e2f566ba555e84c0c3faf2adfd99
parent f9187df6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -716,6 +716,12 @@ public class MediaRecorder
    /**
     * Stops recording. Call this after start(). Once recording is stopped,
     * you will have to configure it again as if it has just been constructed.
     * Note that a RuntimeException is intentionally thrown to the
     * application, if no valid audio/video data has been received when stop()
     * is called. This happens if stop() is called immediately after
     * start(). The failure lets the application take action accordingly to
     * clean up the output file (delete the output file, for instance), since
     * the output file is not properly constructed when this happens.
     *
     * @throws IllegalStateException if it is called before start()
     */