Loading drm/libmediadrm/CryptoHal.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -223,10 +223,14 @@ bool CryptoHal::requiresSecureDecoderComponent(const char *mime) const { Mutex::Autolock autoLock(mLock); if (mInitCheck != OK) { return mInitCheck; return false; } return mPlugin->requiresSecureDecoderComponent(hidl_string(mime)); Return<bool> hResult = mPlugin->requiresSecureDecoderComponent(hidl_string(mime)); if (!hResult.isOk()) { return false; } return hResult; } Loading media/libaudioclient/AudioTrack.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -806,7 +806,7 @@ void AudioTrack::flush() return; } AutoMutex lock(mLock); if (mState == STATE_ACTIVE || mState == STATE_FLUSHED) { if (mState == STATE_ACTIVE) { return; } flush_l(); Loading media/libaudioclient/IAudioPolicyService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -876,7 +876,8 @@ status_t BnAudioPolicyService::onTransact( case SET_DEVICE_CONNECTION_STATE: case HANDLE_DEVICE_CONFIG_CHANGE: case SET_PHONE_STATE: case SET_FORCE_USE: //FIXME: Allow SET_FORCE_USE calls from system apps until a better use case routing API is available // case SET_FORCE_USE: case INIT_STREAM_VOLUME: case SET_STREAM_VOLUME: case REGISTER_POLICY_MIXES: Loading media/libmediametrics/MediaAnalyticsItem.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -248,12 +248,17 @@ MediaAnalyticsItem::Prop *MediaAnalyticsItem::findProp(const char *name) { } void MediaAnalyticsItem::Prop::setName(const char *name, size_t len) { mNameLen = len; free((void *)mName); mName = (const char *) malloc(len+1); LOG_ALWAYS_FATAL_IF(mName == NULL, "failed malloc() for property '%s' (len %zu)", name, len); memcpy ((void *)mName, name, len+1); mNameLen = len; } // used only as part of a storing operation // consider this "find-or-allocate". // caller validates type and uses clearPropValue() accordingly MediaAnalyticsItem::Prop *MediaAnalyticsItem::allocateProp(const char *name) { size_t len = strlen(name); size_t i = findPropIndex(name, len); Loading @@ -271,7 +276,6 @@ MediaAnalyticsItem::Prop *MediaAnalyticsItem::allocateProp(const char *name) { i = mPropCount++; prop = &mProps[i]; prop->setName(name, len); prop->mType = kTypeNone; // make caller set type info } return prop; Loading Loading @@ -299,6 +303,7 @@ bool MediaAnalyticsItem::removeProp(const char *name) { void MediaAnalyticsItem::setInt32(MediaAnalyticsItem::Attr name, int32_t value) { Prop *prop = allocateProp(name); if (prop != NULL) { clearPropValue(prop); prop->mType = kTypeInt32; prop->u.int32Value = value; } Loading @@ -307,6 +312,7 @@ void MediaAnalyticsItem::setInt32(MediaAnalyticsItem::Attr name, int32_t value) void MediaAnalyticsItem::setInt64(MediaAnalyticsItem::Attr name, int64_t value) { Prop *prop = allocateProp(name); if (prop != NULL) { clearPropValue(prop); prop->mType = kTypeInt64; prop->u.int64Value = value; } Loading @@ -315,6 +321,7 @@ void MediaAnalyticsItem::setInt64(MediaAnalyticsItem::Attr name, int64_t value) void MediaAnalyticsItem::setDouble(MediaAnalyticsItem::Attr name, double value) { Prop *prop = allocateProp(name); if (prop != NULL) { clearPropValue(prop); prop->mType = kTypeDouble; prop->u.doubleValue = value; } Loading @@ -325,6 +332,7 @@ void MediaAnalyticsItem::setCString(MediaAnalyticsItem::Attr name, const char *v Prop *prop = allocateProp(name); // any old value will be gone if (prop != NULL) { clearPropValue(prop); prop->mType = kTypeCString; prop->u.CStringValue = strdup(value); } Loading @@ -333,6 +341,7 @@ void MediaAnalyticsItem::setCString(MediaAnalyticsItem::Attr name, const char *v void MediaAnalyticsItem::setRate(MediaAnalyticsItem::Attr name, int64_t count, int64_t duration) { Prop *prop = allocateProp(name); if (prop != NULL) { clearPropValue(prop); prop->mType = kTypeRate; prop->u.rate.count = count; prop->u.rate.duration = duration; Loading Loading @@ -585,6 +594,9 @@ void MediaAnalyticsItem::copyProp(Prop *dst, const Prop *src) // fix any pointers that we blindly copied, so we have our own copies if (dst->mName) { void *p = malloc(dst->mNameLen + 1); LOG_ALWAYS_FATAL_IF(p == NULL, "failed malloc() duping property '%s' (len %zu)", dst->mName, dst->mNameLen); memcpy (p, src->mName, dst->mNameLen + 1); dst->mName = (const char *) p; } Loading media/libstagefright/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -162,7 +162,6 @@ cc_library_shared { "libmedia_helper", "libstagefright_codecbase", "libstagefright_foundation", "libstagefright_omx", "libstagefright_omx_utils", "libstagefright_xmlparser", "libRScpp", Loading Loading
drm/libmediadrm/CryptoHal.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -223,10 +223,14 @@ bool CryptoHal::requiresSecureDecoderComponent(const char *mime) const { Mutex::Autolock autoLock(mLock); if (mInitCheck != OK) { return mInitCheck; return false; } return mPlugin->requiresSecureDecoderComponent(hidl_string(mime)); Return<bool> hResult = mPlugin->requiresSecureDecoderComponent(hidl_string(mime)); if (!hResult.isOk()) { return false; } return hResult; } Loading
media/libaudioclient/AudioTrack.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -806,7 +806,7 @@ void AudioTrack::flush() return; } AutoMutex lock(mLock); if (mState == STATE_ACTIVE || mState == STATE_FLUSHED) { if (mState == STATE_ACTIVE) { return; } flush_l(); Loading
media/libaudioclient/IAudioPolicyService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -876,7 +876,8 @@ status_t BnAudioPolicyService::onTransact( case SET_DEVICE_CONNECTION_STATE: case HANDLE_DEVICE_CONFIG_CHANGE: case SET_PHONE_STATE: case SET_FORCE_USE: //FIXME: Allow SET_FORCE_USE calls from system apps until a better use case routing API is available // case SET_FORCE_USE: case INIT_STREAM_VOLUME: case SET_STREAM_VOLUME: case REGISTER_POLICY_MIXES: Loading
media/libmediametrics/MediaAnalyticsItem.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -248,12 +248,17 @@ MediaAnalyticsItem::Prop *MediaAnalyticsItem::findProp(const char *name) { } void MediaAnalyticsItem::Prop::setName(const char *name, size_t len) { mNameLen = len; free((void *)mName); mName = (const char *) malloc(len+1); LOG_ALWAYS_FATAL_IF(mName == NULL, "failed malloc() for property '%s' (len %zu)", name, len); memcpy ((void *)mName, name, len+1); mNameLen = len; } // used only as part of a storing operation // consider this "find-or-allocate". // caller validates type and uses clearPropValue() accordingly MediaAnalyticsItem::Prop *MediaAnalyticsItem::allocateProp(const char *name) { size_t len = strlen(name); size_t i = findPropIndex(name, len); Loading @@ -271,7 +276,6 @@ MediaAnalyticsItem::Prop *MediaAnalyticsItem::allocateProp(const char *name) { i = mPropCount++; prop = &mProps[i]; prop->setName(name, len); prop->mType = kTypeNone; // make caller set type info } return prop; Loading Loading @@ -299,6 +303,7 @@ bool MediaAnalyticsItem::removeProp(const char *name) { void MediaAnalyticsItem::setInt32(MediaAnalyticsItem::Attr name, int32_t value) { Prop *prop = allocateProp(name); if (prop != NULL) { clearPropValue(prop); prop->mType = kTypeInt32; prop->u.int32Value = value; } Loading @@ -307,6 +312,7 @@ void MediaAnalyticsItem::setInt32(MediaAnalyticsItem::Attr name, int32_t value) void MediaAnalyticsItem::setInt64(MediaAnalyticsItem::Attr name, int64_t value) { Prop *prop = allocateProp(name); if (prop != NULL) { clearPropValue(prop); prop->mType = kTypeInt64; prop->u.int64Value = value; } Loading @@ -315,6 +321,7 @@ void MediaAnalyticsItem::setInt64(MediaAnalyticsItem::Attr name, int64_t value) void MediaAnalyticsItem::setDouble(MediaAnalyticsItem::Attr name, double value) { Prop *prop = allocateProp(name); if (prop != NULL) { clearPropValue(prop); prop->mType = kTypeDouble; prop->u.doubleValue = value; } Loading @@ -325,6 +332,7 @@ void MediaAnalyticsItem::setCString(MediaAnalyticsItem::Attr name, const char *v Prop *prop = allocateProp(name); // any old value will be gone if (prop != NULL) { clearPropValue(prop); prop->mType = kTypeCString; prop->u.CStringValue = strdup(value); } Loading @@ -333,6 +341,7 @@ void MediaAnalyticsItem::setCString(MediaAnalyticsItem::Attr name, const char *v void MediaAnalyticsItem::setRate(MediaAnalyticsItem::Attr name, int64_t count, int64_t duration) { Prop *prop = allocateProp(name); if (prop != NULL) { clearPropValue(prop); prop->mType = kTypeRate; prop->u.rate.count = count; prop->u.rate.duration = duration; Loading Loading @@ -585,6 +594,9 @@ void MediaAnalyticsItem::copyProp(Prop *dst, const Prop *src) // fix any pointers that we blindly copied, so we have our own copies if (dst->mName) { void *p = malloc(dst->mNameLen + 1); LOG_ALWAYS_FATAL_IF(p == NULL, "failed malloc() duping property '%s' (len %zu)", dst->mName, dst->mNameLen); memcpy (p, src->mName, dst->mNameLen + 1); dst->mName = (const char *) p; } Loading
media/libstagefright/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -162,7 +162,6 @@ cc_library_shared { "libmedia_helper", "libstagefright_codecbase", "libstagefright_foundation", "libstagefright_omx", "libstagefright_omx_utils", "libstagefright_xmlparser", "libRScpp", Loading