diff options
author | James Dong <jdong@google.com> | 2011-10-26 23:32:13 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-10-26 23:35:01 -0700 |
commit | 02b32fc33aca18e6a91a6216ce5d932d348d184c (patch) | |
tree | 09aa829b23e7ab7981207590e663f96c11e788fe /media | |
parent | 27812a8f14ca22f0a709320e5a41d200ac59b63b (diff) | |
download | frameworks_base-02b32fc33aca18e6a91a6216ce5d932d348d184c.zip frameworks_base-02b32fc33aca18e6a91a6216ce5d932d348d184c.tar.gz frameworks_base-02b32fc33aca18e6a91a6216ce5d932d348d184c.tar.bz2 |
Report call status from AudioSource::start() to file writer
Change-Id: I5109dc87a92170dede4eaa58b039efe6d8b7c330
related-to-bug: 5514288
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp | 6 | ||||
-rw-r--r-- | media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp index 94a79ab..d361ef4 100644 --- a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp +++ b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp @@ -82,7 +82,11 @@ status_t AMRNBEncoder::start(MetaData *params) { &mEncState, &mSidState, false /* dtx_enable */), 0); - mSource->start(params); + status_t err = mSource->start(params); + if (err != OK) { + LOGE("AudioSource is not available"); + return err; + } mAnchorTimeUs = 0; mNumFramesOutput = 0; diff --git a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp index 002f055..5eacc16 100644 --- a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp +++ b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp @@ -137,8 +137,12 @@ status_t AMRWBEncoder::start(MetaData *params) { CHECK_EQ(OK, initCheck()); mNumFramesOutput = 0; - mSource->start(params); + status_t err = mSource->start(params); + if (err != OK) { + LOGE("AudioSource is not available"); + return err; + } mStarted = true; return OK; |