summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Huber <andih@google.com> 2010-08-05 12:09:22 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2010-08-05 12:09:22 -0700
commit2184abfead330a209a9c15eb80d214d0b5985ebb (patch)
tree69bc728931db434a1ef8c0dae41a5af04880952e
parent8776781c89bda0dc000020b9a8446a1be24a9940 (diff)
parent870678a954e1e2a96caf76453c20de808253ffd1 (diff)
am 870678a9: am 2c37f3d3: Merge "Better support for fake timestamps in RTP, H.263 video now also requests FIR." into gingerbread
Merge commit '870678a954e1e2a96caf76453c20de808253ffd1' * commit '870678a954e1e2a96caf76453c20de808253ffd1': Better support for fake timestamps in RTP, H.263 video now also requests FIR.
-rw-r--r--media/libstagefright/AwesomePlayer.cpp5
-rw-r--r--media/libstagefright/rtsp/ARTPConnection.cpp14
-rw-r--r--media/libstagefright/rtsp/ARTPSource.cpp1
-rw-r--r--media/libstagefright/rtsp/ARTPSource.h4
4 files changed, 17 insertions, 7 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 86a02f6ea06b..e426fca16314 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -1225,7 +1225,10 @@ status_t AwesomePlayer::finishSetDataSource_l() {
} else if (!strcmp("rtsp://gtalk", mUri.string())) {
if (mLooper == NULL) {
mLooper = new ALooper;
- mLooper->start();
+ mLooper->start(
+ false /* runOnCallingThread */,
+ false /* canCallJava */,
+ PRIORITY_HIGHEST);
}
#if 0
diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp
index 9abdab43ec33..5bd306b41a08 100644
--- a/media/libstagefright/rtsp/ARTPConnection.cpp
+++ b/media/libstagefright/rtsp/ARTPConnection.cpp
@@ -405,6 +405,14 @@ status_t ARTPConnection::parseRTP(StreamInfo *s, const sp<ABuffer> &buffer) {
buffer->setInt32Data(u16at(&data[2]));
buffer->setRange(payloadOffset, size - payloadOffset);
+#if IGNORE_RTCP_TIME
+ if (!source->timeEstablished()) {
+ source->timeUpdate(rtpTime, 0);
+ source->timeUpdate(rtpTime + 20, 0x100000000ll);
+ CHECK(source->timeEstablished());
+ }
+#endif
+
source->processRTPPacket(buffer);
return OK;
@@ -541,12 +549,6 @@ sp<ARTPSource> ARTPConnection::findSource(StreamInfo *info, uint32_t srcId) {
source = new ARTPSource(
srcId, info->mSessionDesc, info->mIndex, info->mNotifyMsg);
-#if IGNORE_RTCP_TIME
- // For H.263 gtalk to work...
- source->timeUpdate(0, 0);
- source->timeUpdate(30, 0x100000000ll);
-#endif
-
info->mSources.add(srcId, source);
} else {
source = info->mSources.valueAt(index);
diff --git a/media/libstagefright/rtsp/ARTPSource.cpp b/media/libstagefright/rtsp/ARTPSource.cpp
index 2aa0c1fff26e..e08183e50259 100644
--- a/media/libstagefright/rtsp/ARTPSource.cpp
+++ b/media/libstagefright/rtsp/ARTPSource.cpp
@@ -58,6 +58,7 @@ ARTPSource::ARTPSource(
} else if (!strncmp(desc.c_str(), "H263-1998/", 10)
|| !strncmp(desc.c_str(), "H263-2000/", 10)) {
mAssembler = new AH263Assembler(notify);
+ mIssueFIRRequests = true;
} else if (!strncmp(desc.c_str(), "AMR/", 4)) {
mAssembler = new AAMRAssembler(notify, false /* isWide */, params);
} else if (!strncmp(desc.c_str(), "AMR-WB/", 7)) {
diff --git a/media/libstagefright/rtsp/ARTPSource.h b/media/libstagefright/rtsp/ARTPSource.h
index 8e483a8bb0f5..252d6d67a389 100644
--- a/media/libstagefright/rtsp/ARTPSource.h
+++ b/media/libstagefright/rtsp/ARTPSource.h
@@ -46,6 +46,10 @@ struct ARTPSource : public RefBase {
void addReceiverReport(const sp<ABuffer> &buffer);
void addFIR(const sp<ABuffer> &buffer);
+ bool timeEstablished() const {
+ return mNumTimes == 2;
+ }
+
private:
uint32_t mID;
uint32_t mHighestSeqNumber;