diff options
author | Glenn Kasten <gkasten@google.com> | 2013-08-26 10:29:28 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-09-03 15:12:03 -0700 |
commit | 894d6be4f9b4721c77a01919ecf03b27cec90cc9 (patch) | |
tree | c0356613af3c5dc3451197f8781a43c5d9d4d36c /include/media | |
parent | a07a1c2c91dc7ee6ded319262499f20cd01edcf7 (diff) | |
download | frameworks_av-894d6be4f9b4721c77a01919ecf03b27cec90cc9.zip frameworks_av-894d6be4f9b4721c77a01919ecf03b27cec90cc9.tar.gz frameworks_av-894d6be4f9b4721c77a01919ecf03b27cec90cc9.tar.bz2 |
Add NBAIO_Source::onTimestamp()
with dummy default implementation, and implement in MonoPipeReader.
onTimestamp is meant to be called by the corresponding sink when it has
a new timestamp available.
Change-Id: I8a90d24d1061e4a592ce5bd8ee1c9fce6bdd8a84
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/nbaio/MonoPipeReader.h | 2 | ||||
-rw-r--r-- | include/media/nbaio/NBAIO.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/media/nbaio/MonoPipeReader.h b/include/media/nbaio/MonoPipeReader.h index 0e1c992..78fe867 100644 --- a/include/media/nbaio/MonoPipeReader.h +++ b/include/media/nbaio/MonoPipeReader.h @@ -49,6 +49,8 @@ public: virtual ssize_t read(void *buffer, size_t count, int64_t readPTS); + virtual void onTimestamp(const AudioTimestamp& timestamp); + // NBAIO_Source end #if 0 // until necessary diff --git a/include/media/nbaio/NBAIO.h b/include/media/nbaio/NBAIO.h index cc5b3e6..1da0c73 100644 --- a/include/media/nbaio/NBAIO.h +++ b/include/media/nbaio/NBAIO.h @@ -306,6 +306,10 @@ public: virtual ssize_t readVia(readVia_t via, size_t total, void *user, int64_t readPTS, size_t block = 0); + // Invoked asynchronously by corresponding sink when a new timestamp is available. + // Default implementation ignores the timestamp. + virtual void onTimestamp(const AudioTimestamp& timestamp) { } + protected: NBAIO_Source(NBAIO_Format format = Format_Invalid) : NBAIO_Port(format), mFramesRead(0) { } virtual ~NBAIO_Source() { } |