summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2014-03-07 02:26:02 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-07 02:26:02 +0000
commitdd955ce438749bd138cdd3feae78545bc94881ee (patch)
tree157fd7b4da18eb01962845921dc1e2c233e98723 /media/libstagefright
parenta753e4ead38e1cc14484ad5e3bf523bbaf2298b0 (diff)
parent61bdaaa18a1d52666827e31bb7980a5784443835 (diff)
downloadframeworks_av-dd955ce438749bd138cdd3feae78545bc94881ee.zip
frameworks_av-dd955ce438749bd138cdd3feae78545bc94881ee.tar.gz
frameworks_av-dd955ce438749bd138cdd3feae78545bc94881ee.tar.bz2
am 61bdaaa1: Merge "ChromiumHTTPDataSource: Keep track of the redirected URL"
* commit '61bdaaa18a1d52666827e31bb7980a5784443835': ChromiumHTTPDataSource: Keep track of the redirected URL
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/chromium_http/ChromiumHTTPDataSource.cpp5
-rw-r--r--media/libstagefright/chromium_http/support.cpp1
-rw-r--r--media/libstagefright/include/ChromiumHTTPDataSource.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/media/libstagefright/chromium_http/ChromiumHTTPDataSource.cpp b/media/libstagefright/chromium_http/ChromiumHTTPDataSource.cpp
index a862d8b..7e5c280 100644
--- a/media/libstagefright/chromium_http/ChromiumHTTPDataSource.cpp
+++ b/media/libstagefright/chromium_http/ChromiumHTTPDataSource.cpp
@@ -108,6 +108,11 @@ status_t ChromiumHTTPDataSource::connect_l(
return mState == CONNECTED ? OK : mIOResult;
}
+void ChromiumHTTPDataSource::onRedirect(const char *url) {
+ Mutex::Autolock autoLock(mLock);
+ mURI = url;
+}
+
void ChromiumHTTPDataSource::onConnectionEstablished(
int64_t contentSize, const char *contentType) {
Mutex::Autolock autoLock(mLock);
diff --git a/media/libstagefright/chromium_http/support.cpp b/media/libstagefright/chromium_http/support.cpp
index 0a8e3e3..3b33212 100644
--- a/media/libstagefright/chromium_http/support.cpp
+++ b/media/libstagefright/chromium_http/support.cpp
@@ -269,6 +269,7 @@ bool SfDelegate::getUID(uid_t *uid) const {
void SfDelegate::OnReceivedRedirect(
net::URLRequest *request, const GURL &new_url, bool *defer_redirect) {
MY_LOGV("OnReceivedRedirect");
+ mOwner->onRedirect(new_url.spec().c_str());
}
void SfDelegate::OnAuthRequired(
diff --git a/media/libstagefright/include/ChromiumHTTPDataSource.h b/media/libstagefright/include/ChromiumHTTPDataSource.h
index 785f939..da188dd 100644
--- a/media/libstagefright/include/ChromiumHTTPDataSource.h
+++ b/media/libstagefright/include/ChromiumHTTPDataSource.h
@@ -113,6 +113,7 @@ private:
void onConnectionFailed(status_t err);
void onReadCompleted(ssize_t size);
void onDisconnectComplete();
+ void onRedirect(const char *url);
void clearDRMState_l();