Loading media/libstagefright/MediaCodec.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -1659,10 +1659,12 @@ void MediaCodec::requestCpuBoostIfNeeded() { return; } int32_t colorFormat; if (mSoftRenderer != NULL && mOutputFormat->contains("hdr-static-info") if (mOutputFormat->contains("hdr-static-info") && mOutputFormat->findInt32("color-format", &colorFormat) && (colorFormat == OMX_COLOR_FormatYUV420Planar16)) { // check format for OMX only, for C2 the format is always opaque since the // software rendering doesn't go through client && ((mSoftRenderer != NULL && colorFormat == OMX_COLOR_FormatYUV420Planar16) || mOwnerName.equalsIgnoreCase("codec2::software"))) { int32_t left, top, right, bottom, width, height; int64_t totalPixel = 0; if (mOutputFormat->findRect("crop", &left, &top, &right, &bottom)) { Loading Loading @@ -1958,6 +1960,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { } else { mFlags &= ~kFlagUsesSoftwareRenderer; } mOwnerName = owner; MediaResource::Type resourceType; if (mComponentName.endsWith(".secure")) { Loading media/libstagefright/include/media/stagefright/MediaCodec.h +1 −0 Original line number Diff line number Diff line Loading @@ -313,6 +313,7 @@ private: sp<ALooper> mCodecLooper; sp<CodecBase> mCodec; AString mComponentName; AString mOwnerName; sp<MediaCodecInfo> mCodecInfo; sp<AReplyToken> mReplyID; uint32_t mFlags; Loading services/mediacodec/main_swcodecservice.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -33,11 +33,12 @@ static const char kVendorSeccompPolicyPath[] = extern "C" void RegisterCodecServices(); int main(int argc __unused, char** /*argv*/) int main(int argc __unused, char** argv) { LOG(INFO) << "media swcodec service starting"; signal(SIGPIPE, SIG_IGN); SetUpMinijail(kSystemSeccompPolicyPath, kVendorSeccompPolicyPath); strcpy(argv[0], "media.swcodec"); ::android::hardware::configureRpcThreadpool(64, false); Loading Loading
media/libstagefright/MediaCodec.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -1659,10 +1659,12 @@ void MediaCodec::requestCpuBoostIfNeeded() { return; } int32_t colorFormat; if (mSoftRenderer != NULL && mOutputFormat->contains("hdr-static-info") if (mOutputFormat->contains("hdr-static-info") && mOutputFormat->findInt32("color-format", &colorFormat) && (colorFormat == OMX_COLOR_FormatYUV420Planar16)) { // check format for OMX only, for C2 the format is always opaque since the // software rendering doesn't go through client && ((mSoftRenderer != NULL && colorFormat == OMX_COLOR_FormatYUV420Planar16) || mOwnerName.equalsIgnoreCase("codec2::software"))) { int32_t left, top, right, bottom, width, height; int64_t totalPixel = 0; if (mOutputFormat->findRect("crop", &left, &top, &right, &bottom)) { Loading Loading @@ -1958,6 +1960,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { } else { mFlags &= ~kFlagUsesSoftwareRenderer; } mOwnerName = owner; MediaResource::Type resourceType; if (mComponentName.endsWith(".secure")) { Loading
media/libstagefright/include/media/stagefright/MediaCodec.h +1 −0 Original line number Diff line number Diff line Loading @@ -313,6 +313,7 @@ private: sp<ALooper> mCodecLooper; sp<CodecBase> mCodec; AString mComponentName; AString mOwnerName; sp<MediaCodecInfo> mCodecInfo; sp<AReplyToken> mReplyID; uint32_t mFlags; Loading
services/mediacodec/main_swcodecservice.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -33,11 +33,12 @@ static const char kVendorSeccompPolicyPath[] = extern "C" void RegisterCodecServices(); int main(int argc __unused, char** /*argv*/) int main(int argc __unused, char** argv) { LOG(INFO) << "media swcodec service starting"; signal(SIGPIPE, SIG_IGN); SetUpMinijail(kSystemSeccompPolicyPath, kVendorSeccompPolicyPath); strcpy(argv[0], "media.swcodec"); ::android::hardware::configureRpcThreadpool(64, false); Loading