Loading media/libstagefright/AwesomePlayer.cpp +0 −13 Original line number Diff line number Diff line Loading @@ -68,8 +68,6 @@ #include "QCMetaData.h" #endif #include "include/ExtendedUtils.h" #define USE_SURFACE_ALLOC 1 #define FRAME_DROP_FREQ 0 Loading Loading @@ -2545,17 +2543,6 @@ status_t AwesomePlayer::finishSetDataSource_l() { &mUriHeaders, &cacheConfig, &disconnectAtHighwatermark); mLock.unlock(); int32_t port = 0; if (ExtendedUtils::ShellProp::getSTAProxyConfig(port)) { String8 portString = String8("127.0.0.1"); portString.appendFormat(":%d", port); ALOGI("getSTAProxyConfig Proxy IPportString %s", portString.string()); mUriHeaders.add(String8("use-proxy"), portString); } else { ALOGV("getSTAProxyConfig failed or disabled"); } status_t err = mConnectingDataSource->connect(mUri, &mUriHeaders); // force connection at this point, to avoid a race condition between getMIMEType and the // caching datasource constructed below, which could result in multiple requests to the Loading media/libstagefright/ExtendedUtils.cpp +0 −47 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ #include <sys/types.h> #include <ctype.h> #include <unistd.h> #include <dlfcn.h> #include <media/stagefright/MetaData.h> #include <media/stagefright/foundation/ABitReader.h> Loading Loading @@ -828,48 +827,6 @@ void ExtendedUtils::ShellProp::getRtpPortRange(unsigned *start, unsigned *end) { ALOGV("rtp port_start = %u, port_end = %u", *start, *end); } bool ExtendedUtils::ShellProp::getSTAProxyConfig(int32_t &port) { void* staLibHandle = NULL; char value[PROPERTY_VALUE_MAX]; property_get("persist.mm.sta.disable", value, "0"); // Return false if persist.disable.staproxy is set to 1 if (atoi(value)) { ALOGW("Proxy is disabled using persist.disable.staproxy"); return false; } staLibHandle = dlopen("libstaapi.so", RTLD_NOW); if (staLibHandle == NULL) { ALOGW("libstaapi.so open dll error :%s", dlerror()); return false; } typedef bool (*fnIsProxySupported)(); typedef int (*fnGetPort)(); fnIsProxySupported isProxySupported = (fnIsProxySupported) dlsym(staLibHandle, "isSTAProxySupported"); if (isProxySupported == NULL) { ALOGW("Not able to load the symbol"); return false; } if (isProxySupported()) { fnGetPort getPort = (fnGetPort)dlsym(staLibHandle, "getSTAProxyAlwaysAccelerateServicePort"); if (getPort == NULL) { ALOGW("Not able to load the symbol to get the STA proxy port"); return false; } port = getPort(); ALOGI("The STA proxy is running at port:%d", port ); } else { ALOGW("STA Proxy is not supported"); return false; } if (staLibHandle != NULL) { dlclose(staLibHandle); } return true; } void ExtendedUtils::setBFrames( OMX_VIDEO_PARAM_MPEG4TYPE &mpeg4type, const char* componentName) { //ignore non QC components Loading Loading @@ -1735,10 +1692,6 @@ void ExtendedUtils::ShellProp::getRtpPortRange(unsigned *start, unsigned *end) { *end = kDefaultRtpPortRangeEnd; } bool ExtendedUtils::ShellProp::getSTAProxyConfig(int32_t &port) { return false; } void ExtendedUtils::setBFrames( OMX_VIDEO_PARAM_MPEG4TYPE &mpeg4type, const char* componentName) { ARG_TOUCH(mpeg4type); Loading media/libstagefright/include/ExtendedUtils.h +1 −2 Original line number Diff line number Diff line Loading @@ -167,8 +167,6 @@ struct ExtendedUtils { //helper function to parse rtp port range form system property static void getRtpPortRange(unsigned *start, unsigned *end); static bool getSTAProxyConfig(int32_t &port); }; struct RTSPStream { Loading Loading @@ -203,6 +201,7 @@ struct ExtendedUtils { static const int32_t kNumBFramesPerPFrame = 1; static bool mIsQCHWAACEncoder; //set B frames for MPEG4 static void setBFrames(OMX_VIDEO_PARAM_MPEG4TYPE &mpeg4type, const char* componentName); Loading Loading
media/libstagefright/AwesomePlayer.cpp +0 −13 Original line number Diff line number Diff line Loading @@ -68,8 +68,6 @@ #include "QCMetaData.h" #endif #include "include/ExtendedUtils.h" #define USE_SURFACE_ALLOC 1 #define FRAME_DROP_FREQ 0 Loading Loading @@ -2545,17 +2543,6 @@ status_t AwesomePlayer::finishSetDataSource_l() { &mUriHeaders, &cacheConfig, &disconnectAtHighwatermark); mLock.unlock(); int32_t port = 0; if (ExtendedUtils::ShellProp::getSTAProxyConfig(port)) { String8 portString = String8("127.0.0.1"); portString.appendFormat(":%d", port); ALOGI("getSTAProxyConfig Proxy IPportString %s", portString.string()); mUriHeaders.add(String8("use-proxy"), portString); } else { ALOGV("getSTAProxyConfig failed or disabled"); } status_t err = mConnectingDataSource->connect(mUri, &mUriHeaders); // force connection at this point, to avoid a race condition between getMIMEType and the // caching datasource constructed below, which could result in multiple requests to the Loading
media/libstagefright/ExtendedUtils.cpp +0 −47 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ #include <sys/types.h> #include <ctype.h> #include <unistd.h> #include <dlfcn.h> #include <media/stagefright/MetaData.h> #include <media/stagefright/foundation/ABitReader.h> Loading Loading @@ -828,48 +827,6 @@ void ExtendedUtils::ShellProp::getRtpPortRange(unsigned *start, unsigned *end) { ALOGV("rtp port_start = %u, port_end = %u", *start, *end); } bool ExtendedUtils::ShellProp::getSTAProxyConfig(int32_t &port) { void* staLibHandle = NULL; char value[PROPERTY_VALUE_MAX]; property_get("persist.mm.sta.disable", value, "0"); // Return false if persist.disable.staproxy is set to 1 if (atoi(value)) { ALOGW("Proxy is disabled using persist.disable.staproxy"); return false; } staLibHandle = dlopen("libstaapi.so", RTLD_NOW); if (staLibHandle == NULL) { ALOGW("libstaapi.so open dll error :%s", dlerror()); return false; } typedef bool (*fnIsProxySupported)(); typedef int (*fnGetPort)(); fnIsProxySupported isProxySupported = (fnIsProxySupported) dlsym(staLibHandle, "isSTAProxySupported"); if (isProxySupported == NULL) { ALOGW("Not able to load the symbol"); return false; } if (isProxySupported()) { fnGetPort getPort = (fnGetPort)dlsym(staLibHandle, "getSTAProxyAlwaysAccelerateServicePort"); if (getPort == NULL) { ALOGW("Not able to load the symbol to get the STA proxy port"); return false; } port = getPort(); ALOGI("The STA proxy is running at port:%d", port ); } else { ALOGW("STA Proxy is not supported"); return false; } if (staLibHandle != NULL) { dlclose(staLibHandle); } return true; } void ExtendedUtils::setBFrames( OMX_VIDEO_PARAM_MPEG4TYPE &mpeg4type, const char* componentName) { //ignore non QC components Loading Loading @@ -1735,10 +1692,6 @@ void ExtendedUtils::ShellProp::getRtpPortRange(unsigned *start, unsigned *end) { *end = kDefaultRtpPortRangeEnd; } bool ExtendedUtils::ShellProp::getSTAProxyConfig(int32_t &port) { return false; } void ExtendedUtils::setBFrames( OMX_VIDEO_PARAM_MPEG4TYPE &mpeg4type, const char* componentName) { ARG_TOUCH(mpeg4type); Loading
media/libstagefright/include/ExtendedUtils.h +1 −2 Original line number Diff line number Diff line Loading @@ -167,8 +167,6 @@ struct ExtendedUtils { //helper function to parse rtp port range form system property static void getRtpPortRange(unsigned *start, unsigned *end); static bool getSTAProxyConfig(int32_t &port); }; struct RTSPStream { Loading Loading @@ -203,6 +201,7 @@ struct ExtendedUtils { static const int32_t kNumBFramesPerPFrame = 1; static bool mIsQCHWAACEncoder; //set B frames for MPEG4 static void setBFrames(OMX_VIDEO_PARAM_MPEG4TYPE &mpeg4type, const char* componentName); Loading