summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/mpeg2ts
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-01-05 16:24:27 -0800
committerAndreas Huber <andih@google.com>2011-01-05 16:24:27 -0800
commit22fc52f6f72f39e33c3970d0291de3569118aa5c (patch)
tree3f446d7a2aa1e0e701b0ce33a10175547eb29bdf /media/libstagefright/mpeg2ts
parent43c3e6ce02215ca99d506458f596cb1211639f29 (diff)
downloadframeworks_av-22fc52f6f72f39e33c3970d0291de3569118aa5c.zip
frameworks_av-22fc52f6f72f39e33c3970d0291de3569118aa5c.tar.gz
frameworks_av-22fc52f6f72f39e33c3970d0291de3569118aa5c.tar.bz2
Some more fixes regarding HTTP live in NuPlayer.
Change-Id: I9e29615fa8ee6c7bd4189373a75c20caef3fd2b1
Diffstat (limited to 'media/libstagefright/mpeg2ts')
-rw-r--r--media/libstagefright/mpeg2ts/ATSParser.cpp1
-rw-r--r--media/libstagefright/mpeg2ts/AnotherPacketSource.cpp19
-rw-r--r--media/libstagefright/mpeg2ts/AnotherPacketSource.h2
3 files changed, 13 insertions, 9 deletions
diff --git a/media/libstagefright/mpeg2ts/ATSParser.cpp b/media/libstagefright/mpeg2ts/ATSParser.cpp
index 84a3860..d8ab080 100644
--- a/media/libstagefright/mpeg2ts/ATSParser.cpp
+++ b/media/libstagefright/mpeg2ts/ATSParser.cpp
@@ -351,7 +351,6 @@ void ATSParser::Stream::signalDiscontinuity(DiscontinuityType type) {
mQueue.clear(!isASeek);
if (mSource != NULL) {
- mSource->clear();
mSource->queueDiscontinuity(type);
}
break;
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
index c6edf0a..0ad883b 100644
--- a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
+++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
@@ -142,16 +142,23 @@ void AnotherPacketSource::queueDiscontinuity(
Mutex::Autolock autoLock(mLock);
+#if 0
+ if (type == ATSParser::DISCONTINUITY_SEEK
+ || type == ATSParser::DISCONTINUITY_FORMATCHANGE) {
+ // XXX Fix this: This will also clear any pending discontinuities,
+ // If there's a pending DISCONTINUITY_FORMATCHANGE and the new
+ // discontinuity is "just" a DISCONTINUITY_SEEK, this will effectively
+ // downgrade the type of discontinuity received by the client.
+
+ mBuffers.clear();
+ mEOSResult = OK;
+ }
+#endif
+
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);
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.h b/media/libstagefright/mpeg2ts/AnotherPacketSource.h
index c20fca3..6fe93f8 100644
--- a/media/libstagefright/mpeg2ts/AnotherPacketSource.h
+++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.h
@@ -49,8 +49,6 @@ struct AnotherPacketSource : public MediaSource {
void queueDiscontinuity(ATSParser::DiscontinuityType type);
void signalEOS(status_t result);
- void clear();
-
status_t dequeueAccessUnit(sp<ABuffer> *buffer);
protected: