Loading media/libstagefright/Android.mk +15 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ LOCAL_SRC_FILES:= \ ESDS.cpp \ FileSource.cpp \ FLACExtractor.cpp \ HTTPBase.cpp \ HTTPStream.cpp \ JPEGSource.cpp \ MP3Extractor.cpp \ Loading Loading @@ -75,7 +76,12 @@ LOCAL_SHARED_LIBRARIES := \ libdrmframework \ libcrypto \ libssl \ libgui libgui \ liblog \ libicuuc \ libicui18n \ libz \ libdl \ LOCAL_STATIC_LIBRARIES := \ libstagefright_color_conversion \ Loading @@ -100,6 +106,14 @@ LOCAL_STATIC_LIBRARIES := \ libstagefright_id3 \ libstagefright_g711dec \ libFLAC \ libstagefright_chromium_http \ libchromium_net \ libwebcore \ ifneq ($(TARGET_SIMULATOR),true) LOCAL_SHARED_LIBRARIES += libstlport include external/stlport/libstlport.mk endif LOCAL_SHARED_LIBRARIES += \ libstagefright_amrnb_common \ Loading media/libstagefright/AwesomePlayer.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -1597,8 +1597,10 @@ status_t AwesomePlayer::finishSetDataSource_l() { if (!strncasecmp("http://", mUri.string(), 7) || !strncasecmp("https://", mUri.string(), 8)) { mConnectingDataSource = new NuHTTPDataSource( (mFlags & INCOGNITO) ? NuHTTPDataSource::kFlagIncognito : 0); mConnectingDataSource = HTTPBase::Create( (mFlags & INCOGNITO) ? HTTPBase::kFlagIncognito : 0); mLock.unlock(); status_t err = mConnectingDataSource->connect(mUri, &mUriHeaders); Loading media/libstagefright/DataSource.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ #include "include/OggExtractor.h" #include "include/MPEG2TSExtractor.h" #include "include/NuCachedSource2.h" #include "include/NuHTTPDataSource.h" #include "include/HTTPBase.h" #include "include/DRMExtractor.h" #include "include/FLACExtractor.h" #include "include/AACExtractor.h" Loading Loading @@ -127,7 +127,7 @@ sp<DataSource> DataSource::CreateFromURI( source = new FileSource(uri + 7); } else if (!strncasecmp("http://", uri, 7) || !strncasecmp("https://", uri, 8)) { sp<NuHTTPDataSource> httpSource = new NuHTTPDataSource; sp<HTTPBase> httpSource = HTTPBase::Create(); if (httpSource->connect(uri, headers) != OK) { return NULL; } Loading media/libstagefright/HTTPBase.cpp 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "include/HTTPBase.h" #include "include/ChromiumHTTPDataSource.h" #include "include/NuHTTPDataSource.h" #include <cutils/properties.h> namespace android { HTTPBase::HTTPBase() {} // static sp<HTTPBase> HTTPBase::Create(uint32_t flags) { char value[PROPERTY_VALUE_MAX]; if (!property_get("media.stagefright.use-chromium", value, NULL) || (strcasecmp("false", value) && strcmp("0", value))) { return new ChromiumHTTPDataSource(flags); } else { return new NuHTTPDataSource(flags); } } } // namespace android media/libstagefright/chromium_http/Android.mk 0 → 100644 +25 −0 Original line number Diff line number Diff line LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ ChromiumHTTPDataSource.cpp \ support.cpp \ LOCAL_C_INCLUDES:= \ $(JNI_H_INCLUDE) \ frameworks/base/media/libstagefright \ $(TOP)/frameworks/base/include/media/stagefright/openmax \ external/chromium \ external/chromium/android LOCAL_CFLAGS += -Wno-multichar ifneq ($(TARGET_SIMULATOR),true) LOCAL_SHARED_LIBRARIES += libstlport include external/stlport/libstlport.mk endif LOCAL_MODULE:= libstagefright_chromium_http include $(BUILD_STATIC_LIBRARY) Loading
media/libstagefright/Android.mk +15 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ LOCAL_SRC_FILES:= \ ESDS.cpp \ FileSource.cpp \ FLACExtractor.cpp \ HTTPBase.cpp \ HTTPStream.cpp \ JPEGSource.cpp \ MP3Extractor.cpp \ Loading Loading @@ -75,7 +76,12 @@ LOCAL_SHARED_LIBRARIES := \ libdrmframework \ libcrypto \ libssl \ libgui libgui \ liblog \ libicuuc \ libicui18n \ libz \ libdl \ LOCAL_STATIC_LIBRARIES := \ libstagefright_color_conversion \ Loading @@ -100,6 +106,14 @@ LOCAL_STATIC_LIBRARIES := \ libstagefright_id3 \ libstagefright_g711dec \ libFLAC \ libstagefright_chromium_http \ libchromium_net \ libwebcore \ ifneq ($(TARGET_SIMULATOR),true) LOCAL_SHARED_LIBRARIES += libstlport include external/stlport/libstlport.mk endif LOCAL_SHARED_LIBRARIES += \ libstagefright_amrnb_common \ Loading
media/libstagefright/AwesomePlayer.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -1597,8 +1597,10 @@ status_t AwesomePlayer::finishSetDataSource_l() { if (!strncasecmp("http://", mUri.string(), 7) || !strncasecmp("https://", mUri.string(), 8)) { mConnectingDataSource = new NuHTTPDataSource( (mFlags & INCOGNITO) ? NuHTTPDataSource::kFlagIncognito : 0); mConnectingDataSource = HTTPBase::Create( (mFlags & INCOGNITO) ? HTTPBase::kFlagIncognito : 0); mLock.unlock(); status_t err = mConnectingDataSource->connect(mUri, &mUriHeaders); Loading
media/libstagefright/DataSource.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ #include "include/OggExtractor.h" #include "include/MPEG2TSExtractor.h" #include "include/NuCachedSource2.h" #include "include/NuHTTPDataSource.h" #include "include/HTTPBase.h" #include "include/DRMExtractor.h" #include "include/FLACExtractor.h" #include "include/AACExtractor.h" Loading Loading @@ -127,7 +127,7 @@ sp<DataSource> DataSource::CreateFromURI( source = new FileSource(uri + 7); } else if (!strncasecmp("http://", uri, 7) || !strncasecmp("https://", uri, 8)) { sp<NuHTTPDataSource> httpSource = new NuHTTPDataSource; sp<HTTPBase> httpSource = HTTPBase::Create(); if (httpSource->connect(uri, headers) != OK) { return NULL; } Loading
media/libstagefright/HTTPBase.cpp 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "include/HTTPBase.h" #include "include/ChromiumHTTPDataSource.h" #include "include/NuHTTPDataSource.h" #include <cutils/properties.h> namespace android { HTTPBase::HTTPBase() {} // static sp<HTTPBase> HTTPBase::Create(uint32_t flags) { char value[PROPERTY_VALUE_MAX]; if (!property_get("media.stagefright.use-chromium", value, NULL) || (strcasecmp("false", value) && strcmp("0", value))) { return new ChromiumHTTPDataSource(flags); } else { return new NuHTTPDataSource(flags); } } } // namespace android
media/libstagefright/chromium_http/Android.mk 0 → 100644 +25 −0 Original line number Diff line number Diff line LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ ChromiumHTTPDataSource.cpp \ support.cpp \ LOCAL_C_INCLUDES:= \ $(JNI_H_INCLUDE) \ frameworks/base/media/libstagefright \ $(TOP)/frameworks/base/include/media/stagefright/openmax \ external/chromium \ external/chromium/android LOCAL_CFLAGS += -Wno-multichar ifneq ($(TARGET_SIMULATOR),true) LOCAL_SHARED_LIBRARIES += libstlport include external/stlport/libstlport.mk endif LOCAL_MODULE:= libstagefright_chromium_http include $(BUILD_STATIC_LIBRARY)