Loading include/media/stagefright/ACodec.h +6 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,12 @@ private: kFlagIsGrallocUsageProtected = 4, }; enum { kVideoGrallocUsage = (GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_COMPOSER | GRALLOC_USAGE_EXTERNAL_DISP), }; struct BufferInfo { enum Status { OWNED_BY_US, Loading media/libstagefright/ACodec.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -668,8 +668,7 @@ status_t ACodec::handleSetSurface(const sp<Surface> &surface) { return err; } int ignoredFlags = (GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_COMPOSER | GRALLOC_USAGE_EXTERNAL_DISP); int ignoredFlags = kVideoGrallocUsage; // New output surface is not allowed to add new usage flag except ignored ones. if ((usageBits & ~(mNativeWindowUsageBits | ignoredFlags)) != 0) { ALOGW("cannot change usage from %#x to %#x", mNativeWindowUsageBits, usageBits); Loading Loading @@ -905,7 +904,7 @@ status_t ACodec::setupNativeWindowSizeFormatAndUsage( usage |= GRALLOC_USAGE_PROTECTED; } usage |= GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP; usage |= kVideoGrallocUsage; *finalUsage = usage; ALOGV("gralloc usage: %#x(OMX) => %#x(ACodec)", omxUsage, usage); Loading Loading
include/media/stagefright/ACodec.h +6 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,12 @@ private: kFlagIsGrallocUsageProtected = 4, }; enum { kVideoGrallocUsage = (GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_COMPOSER | GRALLOC_USAGE_EXTERNAL_DISP), }; struct BufferInfo { enum Status { OWNED_BY_US, Loading
media/libstagefright/ACodec.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -668,8 +668,7 @@ status_t ACodec::handleSetSurface(const sp<Surface> &surface) { return err; } int ignoredFlags = (GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_COMPOSER | GRALLOC_USAGE_EXTERNAL_DISP); int ignoredFlags = kVideoGrallocUsage; // New output surface is not allowed to add new usage flag except ignored ones. if ((usageBits & ~(mNativeWindowUsageBits | ignoredFlags)) != 0) { ALOGW("cannot change usage from %#x to %#x", mNativeWindowUsageBits, usageBits); Loading Loading @@ -905,7 +904,7 @@ status_t ACodec::setupNativeWindowSizeFormatAndUsage( usage |= GRALLOC_USAGE_PROTECTED; } usage |= GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP; usage |= kVideoGrallocUsage; *finalUsage = usage; ALOGV("gralloc usage: %#x(OMX) => %#x(ACodec)", omxUsage, usage); Loading