Loading include/media/stagefright/AMRWriter.h +1 −3 Original line number Diff line number Diff line Loading @@ -42,14 +42,12 @@ protected: virtual ~AMRWriter(); private: Mutex mLock; FILE *mFile; status_t mInitCheck; sp<MediaSource> mSource; bool mStarted; volatile bool mDone; bool mReachedEOS; volatile bool mReachedEOS; pthread_t mThread; static void *ThreadWrapper(void *); Loading media/libstagefright/AMRWriter.cpp +5 −21 Original line number Diff line number Diff line Loading @@ -53,8 +53,6 @@ status_t AMRWriter::initCheck() const { } status_t AMRWriter::addSource(const sp<MediaSource> &source) { Mutex::Autolock autoLock(mLock); if (mInitCheck != OK) { return mInitCheck; } Loading Loading @@ -95,8 +93,6 @@ status_t AMRWriter::addSource(const sp<MediaSource> &source) { } status_t AMRWriter::start() { Mutex::Autolock autoLock(mLock); if (mInitCheck != OK) { return mInitCheck; } Loading Loading @@ -127,15 +123,11 @@ status_t AMRWriter::start() { } void AMRWriter::stop() { { Mutex::Autolock autoLock(mLock); if (!mStarted) { return; } mDone = true; } void *dummy; pthread_join(mThread, &dummy); Loading @@ -153,13 +145,7 @@ void *AMRWriter::ThreadWrapper(void *me) { } void AMRWriter::threadFunc() { for (;;) { Mutex::Autolock autoLock(mLock); if (mDone) { break; } while (!mDone) { MediaBuffer *buffer; status_t err = mSource->read(&buffer); Loading @@ -184,12 +170,10 @@ void AMRWriter::threadFunc() { buffer = NULL; } Mutex::Autolock autoLock(mLock); mReachedEOS = true; } bool AMRWriter::reachedEOS() { Mutex::Autolock autoLock(mLock); return mReachedEOS; } Loading Loading
include/media/stagefright/AMRWriter.h +1 −3 Original line number Diff line number Diff line Loading @@ -42,14 +42,12 @@ protected: virtual ~AMRWriter(); private: Mutex mLock; FILE *mFile; status_t mInitCheck; sp<MediaSource> mSource; bool mStarted; volatile bool mDone; bool mReachedEOS; volatile bool mReachedEOS; pthread_t mThread; static void *ThreadWrapper(void *); Loading
media/libstagefright/AMRWriter.cpp +5 −21 Original line number Diff line number Diff line Loading @@ -53,8 +53,6 @@ status_t AMRWriter::initCheck() const { } status_t AMRWriter::addSource(const sp<MediaSource> &source) { Mutex::Autolock autoLock(mLock); if (mInitCheck != OK) { return mInitCheck; } Loading Loading @@ -95,8 +93,6 @@ status_t AMRWriter::addSource(const sp<MediaSource> &source) { } status_t AMRWriter::start() { Mutex::Autolock autoLock(mLock); if (mInitCheck != OK) { return mInitCheck; } Loading Loading @@ -127,15 +123,11 @@ status_t AMRWriter::start() { } void AMRWriter::stop() { { Mutex::Autolock autoLock(mLock); if (!mStarted) { return; } mDone = true; } void *dummy; pthread_join(mThread, &dummy); Loading @@ -153,13 +145,7 @@ void *AMRWriter::ThreadWrapper(void *me) { } void AMRWriter::threadFunc() { for (;;) { Mutex::Autolock autoLock(mLock); if (mDone) { break; } while (!mDone) { MediaBuffer *buffer; status_t err = mSource->read(&buffer); Loading @@ -184,12 +170,10 @@ void AMRWriter::threadFunc() { buffer = NULL; } Mutex::Autolock autoLock(mLock); mReachedEOS = true; } bool AMRWriter::reachedEOS() { Mutex::Autolock autoLock(mLock); return mReachedEOS; } Loading