Loading media/libmediaplayerservice/StagefrightPlayer.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ status_t StagefrightPlayer::initCheck() { status_t StagefrightPlayer::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { LOGI("setDataSource('%s')", url); return mPlayer->setDataSource(url, headers); } Loading media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -33,8 +33,9 @@ namespace android { NuPlayer::HTTPLiveSource::HTTPLiveSource(const char *url) NuPlayer::HTTPLiveSource::HTTPLiveSource(const char *url, uint32_t flags) : mURL(url), mFlags(flags), mEOS(false), mOffset(0) { } Loading @@ -49,7 +50,9 @@ void NuPlayer::HTTPLiveSource::start() { mLiveLooper->setName("http live"); mLiveLooper->start(); mLiveSession = new LiveSession; mLiveSession = new LiveSession( (mFlags & kFlagIncognito) ? LiveSession::kFlagIncognito : 0); mLiveLooper->registerHandler(mLiveSession); mLiveSession->connect(mURL.c_str()); Loading media/libmediaplayerservice/nuplayer/HTTPLiveSource.h +6 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,11 @@ struct ATSParser; struct LiveSession; struct NuPlayer::HTTPLiveSource : public NuPlayer::Source { HTTPLiveSource(const char *url); enum Flags { // Don't log any URLs. kFlagIncognito = 1, }; HTTPLiveSource(const char *url, uint32_t flags = 0); virtual void start(); Loading @@ -46,6 +50,7 @@ protected: private: AString mURL; uint32_t mFlags; bool mEOS; off64_t mOffset; sp<ALooper> mLiveLooper; Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +11 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,17 @@ void NuPlayer::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { sp<AMessage> msg = new AMessage(kWhatSetDataSource, id()); msg->setObject("source", new HTTPLiveSource(url)); uint32_t flags = 0; if (headers) { ssize_t index = headers->indexOfKey(String8("x-hide-urls-from-log")); if (index >= 0) { flags |= HTTPLiveSource::kFlagIncognito; } } msg->setObject("source", new HTTPLiveSource(url, flags)); msg->post(); } Loading media/libstagefright/AwesomePlayer.cpp +18 −1 Original line number Diff line number Diff line Loading @@ -247,6 +247,22 @@ status_t AwesomePlayer::setDataSource_l( if (headers) { mUriHeaders = *headers; ssize_t index = mUriHeaders.indexOfKey(String8("x-hide-urls-from-log")); if (index >= 0) { // Browser is in "incognito" mode, suppress logging URLs. // This isn't something that should be passed to the server. mUriHeaders.removeItemsAt(index); mFlags |= INCOGNITO; } } if (!(mFlags & INCOGNITO)) { LOGI("setDataSource_l('%s')", mUri.string()); } else { LOGI("setDataSource_l(URL suppressed)"); } // The actual work will be done during preparation in the call to Loading Loading @@ -1538,7 +1554,8 @@ status_t AwesomePlayer::finishSetDataSource_l() { if (!strncasecmp("http://", mUri.string(), 7) || !strncasecmp("https://", mUri.string(), 8)) { mConnectingDataSource = new NuHTTPDataSource; mConnectingDataSource = new NuHTTPDataSource( (mFlags & INCOGNITO) ? NuHTTPDataSource::kFlagIncognito : 0); mLock.unlock(); status_t err = mConnectingDataSource->connect(mUri, &mUriHeaders); Loading Loading
media/libmediaplayerservice/StagefrightPlayer.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ status_t StagefrightPlayer::initCheck() { status_t StagefrightPlayer::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { LOGI("setDataSource('%s')", url); return mPlayer->setDataSource(url, headers); } Loading
media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -33,8 +33,9 @@ namespace android { NuPlayer::HTTPLiveSource::HTTPLiveSource(const char *url) NuPlayer::HTTPLiveSource::HTTPLiveSource(const char *url, uint32_t flags) : mURL(url), mFlags(flags), mEOS(false), mOffset(0) { } Loading @@ -49,7 +50,9 @@ void NuPlayer::HTTPLiveSource::start() { mLiveLooper->setName("http live"); mLiveLooper->start(); mLiveSession = new LiveSession; mLiveSession = new LiveSession( (mFlags & kFlagIncognito) ? LiveSession::kFlagIncognito : 0); mLiveLooper->registerHandler(mLiveSession); mLiveSession->connect(mURL.c_str()); Loading
media/libmediaplayerservice/nuplayer/HTTPLiveSource.h +6 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,11 @@ struct ATSParser; struct LiveSession; struct NuPlayer::HTTPLiveSource : public NuPlayer::Source { HTTPLiveSource(const char *url); enum Flags { // Don't log any URLs. kFlagIncognito = 1, }; HTTPLiveSource(const char *url, uint32_t flags = 0); virtual void start(); Loading @@ -46,6 +50,7 @@ protected: private: AString mURL; uint32_t mFlags; bool mEOS; off64_t mOffset; sp<ALooper> mLiveLooper; Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +11 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,17 @@ void NuPlayer::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { sp<AMessage> msg = new AMessage(kWhatSetDataSource, id()); msg->setObject("source", new HTTPLiveSource(url)); uint32_t flags = 0; if (headers) { ssize_t index = headers->indexOfKey(String8("x-hide-urls-from-log")); if (index >= 0) { flags |= HTTPLiveSource::kFlagIncognito; } } msg->setObject("source", new HTTPLiveSource(url, flags)); msg->post(); } Loading
media/libstagefright/AwesomePlayer.cpp +18 −1 Original line number Diff line number Diff line Loading @@ -247,6 +247,22 @@ status_t AwesomePlayer::setDataSource_l( if (headers) { mUriHeaders = *headers; ssize_t index = mUriHeaders.indexOfKey(String8("x-hide-urls-from-log")); if (index >= 0) { // Browser is in "incognito" mode, suppress logging URLs. // This isn't something that should be passed to the server. mUriHeaders.removeItemsAt(index); mFlags |= INCOGNITO; } } if (!(mFlags & INCOGNITO)) { LOGI("setDataSource_l('%s')", mUri.string()); } else { LOGI("setDataSource_l(URL suppressed)"); } // The actual work will be done during preparation in the call to Loading Loading @@ -1538,7 +1554,8 @@ status_t AwesomePlayer::finishSetDataSource_l() { if (!strncasecmp("http://", mUri.string(), 7) || !strncasecmp("https://", mUri.string(), 8)) { mConnectingDataSource = new NuHTTPDataSource; mConnectingDataSource = new NuHTTPDataSource( (mFlags & INCOGNITO) ? NuHTTPDataSource::kFlagIncognito : 0); mLock.unlock(); status_t err = mConnectingDataSource->connect(mUri, &mUriHeaders); Loading