commit | 867d4dddfbdedd2041c3ba6a3927ac11ed3dfba4 | [log] [tgz] |
---|---|---|
author | Guillaume Chelfi <chelfi@google.com> | Thu Jul 01 18:38:45 2021 +0200 |
committer | Guillaume Chelfi <chelfi@google.com> | Fri Jul 02 13:37:59 2021 +0200 |
tree | 813d02bbbd8d3d5449280dd0ef2f6c0aa21a45ae | |
parent | 081efa4c4fda7728c765e9757b0d10114494d8ef [diff] [blame] |
Add support for video peek in Codec2 Video peek is a feature that enables displaying the first video frame of a video stream decoded by a codec configured in tunnel mode. This commit adds support for video peek to Codec2-based codecs. Test: atest android.media.cts.DecoderTest Merged-In: I74f0b6de2161f563a80b33f1bb3d6ff961de09b6 Merged-In: If8bc83f93d5cf12c1138c467e3152eafc3e92015 Merged-In: I298e27b1024440ea353f8a1db2afdabdb695f702 Change-Id: I533917908a7050c760374c7b607dd736ec173339
diff --git a/media/codec2/sfplugin/CCodecConfig.cpp b/media/codec2/sfplugin/CCodecConfig.cpp index 27e87e6..5646095 100644 --- a/media/codec2/sfplugin/CCodecConfig.cpp +++ b/media/codec2/sfplugin/CCodecConfig.cpp
@@ -938,6 +938,14 @@ return value == 0 ? C2_FALSE : C2_TRUE; })); + add(ConfigMapper("android._trigger-tunnel-peek", C2_PARAMKEY_TUNNEL_START_RENDER, "value") + .limitTo(D::PARAM & D::VIDEO & D::DECODER) + .withMapper([](C2Value v) -> C2Value { + int32_t value = 0; + (void)v.get(&value); + return value == 0 ? C2_FALSE : C2_TRUE; + })); + /* still to do constexpr char KEY_PUSH_BLANK_BUFFERS_ON_STOP[] = "push-blank-buffers-on-shutdown";