summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-12-10 15:34:56 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-12-10 15:34:56 -0800
commita4f324673f615d604362d86e1878e85c126847af (patch)
tree41d0b30039b3048ff965e49e61b0b95c3ae6ab74 /include
parent917279c99c7677a02a120909dc4f9092339f2827 (diff)
parentef5abc369823f634c460c8f24d3cbf310542fe3b (diff)
downloadframeworks_av-a4f324673f615d604362d86e1878e85c126847af.zip
frameworks_av-a4f324673f615d604362d86e1878e85c126847af.tar.gz
frameworks_av-a4f324673f615d604362d86e1878e85c126847af.tar.bz2
am f0ff908d: Logging to investigate a crash
* commit 'f0ff908da019a44115109f1b4d1b6864b35a8a29': Logging to investigate a crash
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioBufferProvider.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/media/AudioBufferProvider.h b/include/media/AudioBufferProvider.h
index 43e4de7..865ed7e 100644
--- a/include/media/AudioBufferProvider.h
+++ b/include/media/AudioBufferProvider.h
@@ -36,8 +36,11 @@ public:
size_t frameCount;
};
- virtual ~AudioBufferProvider() {}
+protected:
+ AudioBufferProvider() : mValid(kValid) { }
+ virtual ~AudioBufferProvider() { mValid = kDead; }
+public:
// value representing an invalid presentation timestamp
static const int64_t kInvalidPTS = 0x7FFFFFFFFFFFFFFFLL; // <stdint.h> is too painful
@@ -47,6 +50,13 @@ public:
virtual status_t getNextBuffer(Buffer* buffer, int64_t pts = kInvalidPTS) = 0;
virtual void releaseBuffer(Buffer* buffer) = 0;
+
+ int getValid() const { return mValid; }
+ static const int kValid = 'GOOD';
+ static const int kDead = 'DEAD';
+
+private:
+ int mValid;
};
// ----------------------------------------------------------------------------