diff options
author | James Dong <jdong@google.com> | 2010-08-18 19:10:39 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-08-19 13:33:13 -0700 |
commit | 37187916a486504acaf83bea30147eb5fbf46ae5 (patch) | |
tree | b011eba352b6e60ae459f88ef590b45b2e351110 /include/media/stagefright/AMRWriter.h | |
parent | 34c9ad88d3d827cca0c7b5f2fb1b0d4a1a20a2d1 (diff) | |
download | frameworks_av-37187916a486504acaf83bea30147eb5fbf46ae5.zip frameworks_av-37187916a486504acaf83bea30147eb5fbf46ae5.tar.gz frameworks_av-37187916a486504acaf83bea30147eb5fbf46ae5.tar.bz2 |
Make MediaWriter stop and pause return errors if necessary
o Make the API consistent with SF framework, which the MediaSource
provides a return status for stop
o Also, helps to convey errors that occurred right when a
premature stop() is called, leading to a potentially
mal-formed output file.
Change-Id: I52a932345f38570fdf8ea04d67d73dd94ccd30ef
Diffstat (limited to 'include/media/stagefright/AMRWriter.h')
-rw-r--r-- | include/media/stagefright/AMRWriter.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/media/stagefright/AMRWriter.h b/include/media/stagefright/AMRWriter.h index 813dd43..aa965e1 100644 --- a/include/media/stagefright/AMRWriter.h +++ b/include/media/stagefright/AMRWriter.h @@ -37,8 +37,8 @@ struct AMRWriter : public MediaWriter { virtual status_t addSource(const sp<MediaSource> &source); virtual bool reachedEOS(); virtual status_t start(MetaData *params = NULL); - virtual void stop(); - virtual void pause(); + virtual status_t stop(); + virtual status_t pause(); protected: virtual ~AMRWriter(); @@ -57,7 +57,7 @@ private: int64_t mEstimatedDurationUs; static void *ThreadWrapper(void *); - void threadFunc(); + status_t threadFunc(); bool exceedsFileSizeLimit(); bool exceedsFileDurationLimit(); |