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

Commit a7c38e4f authored by Brian Lindahl's avatar Brian Lindahl Committed by Automerger Merge Worker
Browse files

Allow the default mode for video peek to be undefined am: 19203eb6 am: 4b0e365b

parents 46a22968 4b0e365b
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.
 *