summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp
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
commit9d876aca5ede85e6d9ccb82f11fae2834955c6f9 (patch)
treeac4b1269edeb321c2d96aa9e679a94e5b38078e9 /media/libstagefright/rtsp
parentc5c4286bebffa4c2a9539c8e09207c3130351531 (diff)
parentbf5606b983e203a916d4f687b81b6ebd047802ff (diff)
downloadframeworks_av-9d876aca5ede85e6d9ccb82f11fae2834955c6f9.zip
frameworks_av-9d876aca5ede85e6d9ccb82f11fae2834955c6f9.tar.gz
frameworks_av-9d876aca5ede85e6d9ccb82f11fae2834955c6f9.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/libstagefright/rtsp')
-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;