diff options
author | Andreas Huber <andih@google.com> | 2010-08-30 12:33:25 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-08-30 12:33:25 -0700 |
commit | bf5606b983e203a916d4f687b81b6ebd047802ff (patch) | |
tree | d7075d97650a44b81feeb0cf7521cc7e28916cd9 /media | |
parent | c28160fcf5fb785106e00fa5854929be8b49a98a (diff) | |
parent | e56121bc4cb29c91d736eab181b1f51c4f125e78 (diff) | |
download | frameworks_av-bf5606b983e203a916d4f687b81b6ebd047802ff.zip frameworks_av-bf5606b983e203a916d4f687b81b6ebd047802ff.tar.gz frameworks_av-bf5606b983e203a916d4f687b81b6ebd047802ff.tar.bz2 |
am f6639c46: Finetune some rtsp timeout constants.
Merge commit 'f6639c46e83a1ccab7b293192c208091d17c61be' into gingerbread-plus-aosp
* commit 'f6639c46e83a1ccab7b293192c208091d17c61be':
Finetune some rtsp timeout constants.
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/rtsp/MyHandler.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h index affacc8..f20dd6f 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; |