Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19203eb6 authored by Brian Lindahl's avatar Brian Lindahl
Browse files

Allow the default mode for video peek to be undefined

Forcing the default mode for video peek to be defined to on has broken
use cases for Broadcom devices.

See go/video-peek-legacy-mode for more details.

Bug: 220266078
Test: atest android.media.decoder.cts.DecoderTest
Change-Id: Ib5c9c7c232645509022f3aaebf89f90010a76b0b
parent 1a003aa9
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ struct C2Config {

struct C2PlatformConfig {
    enum encoding_quality_level_t : uint32_t; ///< encoding quality level
    enum tunnel_peek_mode_t: uint32_t;      ///< tunnel peek mode
};

namespace {
@@ -280,6 +281,9 @@ enum C2ParamIndexKind : C2Param::type_index_t {

    // channel mask for decoded audio
    kParamIndexAndroidChannelMask, // uint32

    // allow tunnel peek behavior to be unspecified for app compatibility
    kParamIndexTunnelPeekMode, // tunnel mode, enum
};

}
@@ -2482,6 +2486,28 @@ typedef C2StreamParam<C2Info, C2EasyBoolValue, kParamIndexTunnelStartRender>
        C2StreamTunnelStartRender;
constexpr char C2_PARAMKEY_TUNNEL_START_RENDER[] = "output.tunnel-start-render";

/** Tunnel Peek Mode. */
C2ENUM(C2PlatformConfig::tunnel_peek_mode_t, uint32_t,
    UNSPECIFIED_PEEK = 0,
    SPECIFIED_PEEK = 1
);

/**
 * Tunnel Peek Mode Tuning parameter.
 *
 * If set to UNSPECIFIED_PEEK_MODE, the decoder is free to ignore the
 * C2StreamTunnelHoldRender and C2StreamTunnelStartRender flags and associated
 * features. Additionally, it becomes up to the decoder to display any frame
 * before receiving synchronization information.
 *
 * Note: This parameter allows a decoder to ignore the video peek machinery and
 * to revert to its preferred behavior.
 */
typedef C2StreamParam<C2Tuning, C2EasyEnum<C2PlatformConfig::tunnel_peek_mode_t>,
        kParamIndexTunnelPeekMode> C2StreamTunnelPeekModeTuning;
constexpr char C2_PARAMKEY_TUNNEL_PEEK_MODE[] =
        "output.tunnel-peek-mode";

/**
 * Encoding quality level signaling.
 *