Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WA for TOUTIAO APP #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Shao-Feng
Copy link
Contributor

Check /proc/PID/cmdline to see if the application is TouTiao. If yes, only use system memory to workaround the incorrect Bufferqueue.
Once APP fix Bufferqueue issue, please remove me.

Tracked-On: OAM-111768

@@ -222,6 +221,13 @@ MfxC2DecoderComponent::MfxC2DecoderComponent(const C2String name, const CreateCo
.withConstValue(AllocSharedString<C2PortMediaTypeSetting::output>("video/raw"))
.build());

addParameter(
DefineParam(m_outputUsage, C2_PARAMKEY_OUTPUT_STREAM_USAGE)
.withDefault(new C2StreamUsageTuning::output(0u, C2AndroidMemoryUsage::HW_CODEC_WRITE))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is defined for consumer usage. Could you please use HW_TEXTURE_READ and HW_COMPOSER_READ for the default usage here?

enum consumer_t : uint64_t {
RENDERSCRIPT_READ = GRALLOC_USAGE_RENDERSCRIPT,
HW_TEXTURE_READ = GRALLOC_USAGE_HW_TEXTURE,
HW_COMPOSER_READ = GRALLOC_USAGE_HW_COMPOSER,
// gralloc does not define a video decoder read usage flag, so use encoder for
// now
HW_CODEC_READ = GRALLOC_USAGE_HW_VIDEO_ENCODER,
READ_PROTECTED = GRALLOC_USAGE_PROTECTED,
};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@sysopenci
Copy link

Improper Commit Message
Improper Affects version

Add a parameter to AOSP for setting the buffer useage of output memory
Once it is set as CPU_READ, force to use system memory, instead of
video memory.
Remove the valiable m_consumerUsage which is only set as default.

Tracked-On: OAM-111768
Signed-off-by: Shaofeng Tang <[email protected]>
@sysopenci sysopenci added the Stale Stale label for inactive open prs label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid commit message Stale Stale label for inactive open prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants