diff options
Diffstat (limited to 'media/libstagefright/chromium_http')
3 files changed, 53 insertions, 8 deletions
diff --git a/media/libstagefright/chromium_http/Android.mk b/media/libstagefright/chromium_http/Android.mk index 6ab2a00..2c6d84c 100644 --- a/media/libstagefright/chromium_http/Android.mk +++ b/media/libstagefright/chromium_http/Android.mk @@ -6,7 +6,8 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ DataUriSource.cpp \ ChromiumHTTPDataSource.cpp \ - support.cpp + support.cpp \ + chromium_http_stub.cpp LOCAL_C_INCLUDES:= \ $(TOP)/frameworks/av/media/libstagefright \ @@ -16,10 +17,20 @@ LOCAL_C_INCLUDES:= \ LOCAL_CFLAGS += -Wno-multichar -LOCAL_SHARED_LIBRARIES += libstlport +LOCAL_SHARED_LIBRARIES += \ + libstlport \ + libchromium_net \ + libutils \ + libcutils \ + libstagefright_foundation \ + libstagefright \ + libdrmframework + include external/stlport/libstlport.mk LOCAL_MODULE:= libstagefright_chromium_http -include $(BUILD_STATIC_LIBRARY) +LOCAL_MODULE_TAGS := optional + +include $(BUILD_SHARED_LIBRARY) endif diff --git a/media/libstagefright/chromium_http/ChromiumHTTPDataSource.cpp b/media/libstagefright/chromium_http/ChromiumHTTPDataSource.cpp index 3f0b2c2..91ce175 100644 --- a/media/libstagefright/chromium_http/ChromiumHTTPDataSource.cpp +++ b/media/libstagefright/chromium_http/ChromiumHTTPDataSource.cpp @@ -65,7 +65,10 @@ status_t ChromiumHTTPDataSource::connect( if (getUID(&uid)) { mDelegate->setUID(uid); } + +#if defined(LOG_NDEBUG) && !LOG_NDEBUG LOG_PRI(ANDROID_LOG_VERBOSE, LOG_TAG, "connect on behalf of uid %d", uid); +#endif return connect_l(uri, headers, offset); } @@ -78,12 +81,10 @@ status_t ChromiumHTTPDataSource::connect_l( disconnect_l(); } - if (!(mFlags & kFlagIncognito)) { - LOG_PRI(ANDROID_LOG_INFO, LOG_TAG, "connect to %s @%lld", uri, offset); - } else { - LOG_PRI(ANDROID_LOG_INFO, LOG_TAG, +#if defined(LOG_NDEBUG) && !LOG_NDEBUG + LOG_PRI(ANDROID_LOG_VERBOSE, LOG_TAG, "connect to <URL suppressed> @%lld", offset); - } +#endif mURI = uri; mContentType = String8("application/octet-stream"); diff --git a/media/libstagefright/chromium_http/chromium_http_stub.cpp b/media/libstagefright/chromium_http/chromium_http_stub.cpp new file mode 100644 index 0000000..560a61f --- /dev/null +++ b/media/libstagefright/chromium_http/chromium_http_stub.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2012 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 <dlfcn.h> + +#include <include/chromium_http_stub.h> +#include <include/ChromiumHTTPDataSource.h> +#include <include/DataUriSource.h> + +namespace android { + +HTTPBase *createChromiumHTTPDataSource(uint32_t flags) { + return new ChromiumHTTPDataSource(flags); +} + +DataSource *createDataUriSource(const char *uri) { + return new DataUriSource(uri); +} + +} |