summaryrefslogtreecommitdiffstats
path: root/media/libnbaio
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-09-30 14:39:28 -0700
committerGlenn Kasten <gkasten@google.com>2013-12-05 13:47:07 -0800
commit481fb67a595f23c5b7f5be84b06db9b84a41a42f (patch)
tree095712959d22a6fdfaa101c262ccad183576cb6d /media/libnbaio
parent84acd489b93e04bea7aab06d8abb024eef2576fd (diff)
downloadframeworks_av-481fb67a595f23c5b7f5be84b06db9b84a41a42f.zip
frameworks_av-481fb67a595f23c5b7f5be84b06db9b84a41a42f.tar.gz
frameworks_av-481fb67a595f23c5b7f5be84b06db9b84a41a42f.tar.bz2
Add RecordThread media.log and deferred deallocation
This change allows a media.log buffer for RecordThread. Unlike playback threads which stick around forever, the RecordThread comes and goes for every capture session. This means that the media.log buffer for a RecordThread would disappear too, and so was useless. Now when a thread exits, it's associated media.log buffer is just marked for deferred deallocation. It is only actually freed when the memory is needed. Other changes: - Fix bug in unregistering comparison, it was comparing the wrong pointers - Increased size of log area so we can log for RecordThread also Change-Id: If45d4c03a793b86390a0112ec3acc5d41b2e3635
Diffstat (limited to 'media/libnbaio')
-rw-r--r--media/libnbaio/NBLog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libnbaio/NBLog.cpp b/media/libnbaio/NBLog.cpp
index 045bf64..ba8d0b4 100644
--- a/media/libnbaio/NBLog.cpp
+++ b/media/libnbaio/NBLog.cpp
@@ -441,7 +441,7 @@ void NBLog::Reader::dump(int fd, size_t indent)
bool NBLog::Reader::isIMemory(const sp<IMemory>& iMemory) const
{
- return iMemory.get() == mIMemory.get();
+ return iMemory != 0 && mIMemory != 0 && iMemory->pointer() == mIMemory->pointer();
}
} // namespace android