Loading media/libstagefright/rtsp/MyHandler.h +15 −17 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #endif #include <utils/Log.h> #include <cutils/properties.h> // for property_get #include "APacketSource.h" #include "ARTPConnection.h" Loading Loading @@ -807,11 +808,7 @@ struct MyHandler : public AHandler { result = UNKNOWN_ERROR; } else { parsePlayResponse(response); sp<AMessage> timeout = new AMessage('tiou', this); mCheckTimeoutGeneration++; timeout->setInt32("tioucheck", mCheckTimeoutGeneration); timeout->post(kStartupTimeoutUs); postTimeout(); } } Loading Loading @@ -1153,10 +1150,7 @@ struct MyHandler : public AHandler { // Post new timeout in order to make sure to use // fake timestamps if no new Sender Reports arrive sp<AMessage> timeout = new AMessage('tiou', this); mCheckTimeoutGeneration++; timeout->setInt32("tioucheck", mCheckTimeoutGeneration); timeout->post(kStartupTimeoutUs); postTimeout(); } } Loading Loading @@ -1248,10 +1242,7 @@ struct MyHandler : public AHandler { // Start new timeoutgeneration to avoid getting timeout // before PLAY response arrive sp<AMessage> timeout = new AMessage('tiou', this); mCheckTimeoutGeneration++; timeout->setInt32("tioucheck", mCheckTimeoutGeneration); timeout->post(kStartupTimeoutUs); postTimeout(); int64_t timeUs; CHECK(msg->findInt64("time", &timeUs)); Loading Loading @@ -1305,10 +1296,7 @@ struct MyHandler : public AHandler { // Post new timeout in order to make sure to use // fake timestamps if no new Sender Reports arrive sp<AMessage> timeout = new AMessage('tiou', this); mCheckTimeoutGeneration++; timeout->setInt32("tioucheck", mCheckTimeoutGeneration); timeout->post(kStartupTimeoutUs); postTimeout(); ssize_t i = response->mHeaders.indexOfKey("rtp-info"); CHECK_GE(i, 0); Loading Loading @@ -1960,6 +1948,16 @@ private: msg->post(); } void postTimeout() { sp<AMessage> timeout = new AMessage('tiou', this); mCheckTimeoutGeneration++; timeout->setInt32("tioucheck", mCheckTimeoutGeneration); int64_t startupTimeoutUs; startupTimeoutUs = property_get_int64("media.rtsp.timeout-us", kStartupTimeoutUs); timeout->post(startupTimeoutUs); } DISALLOW_EVIL_CONSTRUCTORS(MyHandler); }; Loading Loading
media/libstagefright/rtsp/MyHandler.h +15 −17 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #endif #include <utils/Log.h> #include <cutils/properties.h> // for property_get #include "APacketSource.h" #include "ARTPConnection.h" Loading Loading @@ -807,11 +808,7 @@ struct MyHandler : public AHandler { result = UNKNOWN_ERROR; } else { parsePlayResponse(response); sp<AMessage> timeout = new AMessage('tiou', this); mCheckTimeoutGeneration++; timeout->setInt32("tioucheck", mCheckTimeoutGeneration); timeout->post(kStartupTimeoutUs); postTimeout(); } } Loading Loading @@ -1153,10 +1150,7 @@ struct MyHandler : public AHandler { // Post new timeout in order to make sure to use // fake timestamps if no new Sender Reports arrive sp<AMessage> timeout = new AMessage('tiou', this); mCheckTimeoutGeneration++; timeout->setInt32("tioucheck", mCheckTimeoutGeneration); timeout->post(kStartupTimeoutUs); postTimeout(); } } Loading Loading @@ -1248,10 +1242,7 @@ struct MyHandler : public AHandler { // Start new timeoutgeneration to avoid getting timeout // before PLAY response arrive sp<AMessage> timeout = new AMessage('tiou', this); mCheckTimeoutGeneration++; timeout->setInt32("tioucheck", mCheckTimeoutGeneration); timeout->post(kStartupTimeoutUs); postTimeout(); int64_t timeUs; CHECK(msg->findInt64("time", &timeUs)); Loading Loading @@ -1305,10 +1296,7 @@ struct MyHandler : public AHandler { // Post new timeout in order to make sure to use // fake timestamps if no new Sender Reports arrive sp<AMessage> timeout = new AMessage('tiou', this); mCheckTimeoutGeneration++; timeout->setInt32("tioucheck", mCheckTimeoutGeneration); timeout->post(kStartupTimeoutUs); postTimeout(); ssize_t i = response->mHeaders.indexOfKey("rtp-info"); CHECK_GE(i, 0); Loading Loading @@ -1960,6 +1948,16 @@ private: msg->post(); } void postTimeout() { sp<AMessage> timeout = new AMessage('tiou', this); mCheckTimeoutGeneration++; timeout->setInt32("tioucheck", mCheckTimeoutGeneration); int64_t startupTimeoutUs; startupTimeoutUs = property_get_int64("media.rtsp.timeout-us", kStartupTimeoutUs); timeout->post(startupTimeoutUs); } DISALLOW_EVIL_CONSTRUCTORS(MyHandler); }; Loading