summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/mpeg2ts/AnotherPacketSource.cpp')
-rw-r--r--media/libstagefright/mpeg2ts/AnotherPacketSource.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
index 3f76820..ea747c8 100644
--- a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
+++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
@@ -91,6 +91,10 @@ void AnotherPacketSource::queueAccessUnit(const sp<ABuffer> &buffer) {
return;
}
+ int64_t timeUs;
+ CHECK(buffer->meta()->findInt64("time", &timeUs));
+ LOGV("queueAccessUnit timeUs=%lld us (%.2f secs)", timeUs, timeUs / 1E6);
+
Mutex::Autolock autoLock(mLock);
mBuffers.push_back(buffer);
mCondition.signal();
@@ -101,10 +105,17 @@ void AnotherPacketSource::queueDiscontinuity() {
buffer->meta()->setInt32("discontinuity", true);
Mutex::Autolock autoLock(mLock);
+
mBuffers.push_back(buffer);
mCondition.signal();
}
+void AnotherPacketSource::clear() {
+ Mutex::Autolock autoLock(mLock);
+ mBuffers.clear();
+ mEOSResult = OK;
+}
+
void AnotherPacketSource::signalEOS(status_t result) {
CHECK(result != OK);