From 481fb67a595f23c5b7f5be84b06db9b84a41a42f Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 30 Sep 2013 14:39:28 -0700 Subject: 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 --- media/libnbaio/NBLog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media/libnbaio') 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) const { - return iMemory.get() == mIMemory.get(); + return iMemory != 0 && mIMemory != 0 && iMemory->pointer() == mIMemory->pointer(); } } // namespace android -- cgit v1.1