summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-08-30 13:30:05 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-30 13:30:05 -0700
commit3678668997f81f49ac52ec4441254e57f322d010 (patch)
tree374aee23c106981f44221748ad1f0b65a3e4d324 /media
parent5366f26cdbe07d3023ce8e0c571f66c63a15318c (diff)
parent7ed9104c3acb172a480ebd7fd456fe69efd1ec3d (diff)
downloadframeworks_base-3678668997f81f49ac52ec4441254e57f322d010.zip
frameworks_base-3678668997f81f49ac52ec4441254e57f322d010.tar.gz
frameworks_base-3678668997f81f49ac52ec4441254e57f322d010.tar.bz2
am 7ed9104c: am f6639c46: Finetune some rtsp timeout constants.
Merge commit '7ed9104c3acb172a480ebd7fd456fe69efd1ec3d' * commit '7ed9104c3acb172a480ebd7fd456fe69efd1ec3d': Finetune some rtsp timeout constants.
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/rtsp/MyHandler.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h
index a4fa2b1..7c06db3 100644
--- a/media/libstagefright/rtsp/MyHandler.h
+++ b/media/libstagefright/rtsp/MyHandler.h
@@ -33,6 +33,14 @@
#define USE_TCP_INTERLEAVED 0
+// If no access units are received within 3 secs, assume that the rtp
+// stream has ended and signal end of stream.
+static int64_t kAccessUnitTimeoutUs = 3000000ll;
+
+// If no access units arrive for the first 10 secs after starting the
+// stream, assume none ever will and signal EOS or switch transports.
+static int64_t kStartupTimeoutUs = 10000000ll;
+
namespace android {
static bool GetAttribute(const char *s, const char *key, AString *value) {
@@ -322,7 +330,7 @@ struct MyHandler : public AHandler {
mDoneMsg = NULL;
sp<AMessage> timeout = new AMessage('tiou', id());
- timeout->post(10000000ll);
+ timeout->post(kStartupTimeoutUs);
} else {
sp<AMessage> reply = new AMessage('disc', id());
mConn->disconnect(reply);
@@ -389,7 +397,7 @@ struct MyHandler : public AHandler {
}
mNumAccessUnitsReceived = 0;
- msg->post(1000000);
+ msg->post(kAccessUnitTimeoutUs);
break;
}
@@ -400,7 +408,7 @@ struct MyHandler : public AHandler {
if (!mCheckPending) {
mCheckPending = true;
sp<AMessage> check = new AMessage('chek', id());
- check->post(1000000);
+ check->post(kAccessUnitTimeoutUs);
}
size_t trackIndex;