diff options
author | Glenn Kasten <gkasten@google.com> | 2012-12-07 14:13:35 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-12-07 16:19:09 -0800 |
commit | ef5abc369823f634c460c8f24d3cbf310542fe3b (patch) | |
tree | 429519b3bd4fbc7f47ee2be82f2778ef1545fbdd /include/media | |
parent | 7ecb63d26cc5a45e66248a7abb69f99a76114e07 (diff) | |
download | frameworks_av-ef5abc369823f634c460c8f24d3cbf310542fe3b.zip frameworks_av-ef5abc369823f634c460c8f24d3cbf310542fe3b.tar.gz frameworks_av-ef5abc369823f634c460c8f24d3cbf310542fe3b.tar.bz2 |
Logging to investigate a crash
Bug: 6490974
Change-Id: Ib926a9258bde4ee05ed42eea662dff68e426a997
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/AudioBufferProvider.h | 12 |
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; }; // ---------------------------------------------------------------------------- |