summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/AMRWriter.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-01-25 15:30:31 -0800
committerAndreas Huber <andih@google.com>2010-01-26 09:10:33 -0800
commit2dce41ad26cb3e9e15c9e456a84bcf5309548ca0 (patch)
tree5a4a3bcffcde8652b6ba8f97117ef30f0816e710 /media/libstagefright/AMRWriter.cpp
parente7dc360f6fcb4d5348e72ba57e936254216ae399 (diff)
downloadframeworks_av-2dce41ad26cb3e9e15c9e456a84bcf5309548ca0.zip
frameworks_av-2dce41ad26cb3e9e15c9e456a84bcf5309548ca0.tar.gz
frameworks_av-2dce41ad26cb3e9e15c9e456a84bcf5309548ca0.tar.bz2
Support for audio recording into AMR NB/WB files as well as audio tracks in MPEG4 files.
related-to-bug: 2295449
Diffstat (limited to 'media/libstagefright/AMRWriter.cpp')
-rw-r--r--media/libstagefright/AMRWriter.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/media/libstagefright/AMRWriter.cpp b/media/libstagefright/AMRWriter.cpp
index 7b681f1..caff452 100644
--- a/media/libstagefright/AMRWriter.cpp
+++ b/media/libstagefright/AMRWriter.cpp
@@ -115,6 +115,7 @@ status_t AMRWriter::start() {
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+ mReachedEOS = false;
mDone = false;
pthread_create(&mThread, &attr, ThreadWrapper, this);
@@ -179,6 +180,14 @@ void AMRWriter::threadFunc() {
break;
}
}
+
+ Mutex::Autolock autoLock(mLock);
+ mReachedEOS = true;
+}
+
+bool AMRWriter::reachedEOS() {
+ Mutex::Autolock autoLock(mLock);
+ return mReachedEOS;
}
} // namespace android