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

Commit aa1dddd6 authored by Amy Zhang's avatar Amy Zhang
Browse files

Add extended RecordSetting ScIndexMask in Android 12

Test: atest FilterTest
Bug: 158816517
Change-Id: I64f7835e3dba12a2b9bdcb9d2d54b906bc7beeee
parent 6e59ac63
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5430,9 +5430,14 @@ package android.media.tv.tuner.filter {
    field public static final int SC_HEVC_INDEX_SLICE_TRAIL_CRA = 128; // 0x80
    field public static final int SC_HEVC_INDEX_SPS = 1; // 0x1
    field public static final int SC_INDEX_B_FRAME = 4; // 0x4
    field public static final int SC_INDEX_B_SLICE = 64; // 0x40
    field public static final int SC_INDEX_I_FRAME = 1; // 0x1
    field public static final int SC_INDEX_I_SLICE = 16; // 0x10
    field public static final int SC_INDEX_P_FRAME = 2; // 0x2
    field public static final int SC_INDEX_P_SLICE = 32; // 0x20
    field public static final int SC_INDEX_SEQUENCE = 8; // 0x8
    field public static final int SC_INDEX_SI_SLICE = 128; // 0x80
    field public static final int SC_INDEX_SP_SLICE = 256; // 0x100
    field public static final int TS_INDEX_ADAPTATION_EXTENSION_FLAG = 4096; // 0x1000
    field public static final int TS_INDEX_CHANGE_TO_EVEN_SCRAMBLED = 8; // 0x8
    field public static final int TS_INDEX_CHANGE_TO_NOT_SCRAMBLED = 4; // 0x4
+5 −0
Original line number Diff line number Diff line
@@ -5370,9 +5370,14 @@ package android.media.tv.tuner.filter {
    field public static final int SC_HEVC_INDEX_SLICE_TRAIL_CRA = 128; // 0x80
    field public static final int SC_HEVC_INDEX_SPS = 1; // 0x1
    field public static final int SC_INDEX_B_FRAME = 4; // 0x4
    field public static final int SC_INDEX_B_SLICE = 64; // 0x40
    field public static final int SC_INDEX_I_FRAME = 1; // 0x1
    field public static final int SC_INDEX_I_SLICE = 16; // 0x10
    field public static final int SC_INDEX_P_FRAME = 2; // 0x2
    field public static final int SC_INDEX_P_SLICE = 32; // 0x20
    field public static final int SC_INDEX_SEQUENCE = 8; // 0x8
    field public static final int SC_INDEX_SI_SLICE = 128; // 0x80
    field public static final int SC_INDEX_SP_SLICE = 256; // 0x100
    field public static final int TS_INDEX_ADAPTATION_EXTENSION_FLAG = 4096; // 0x1000
    field public static final int TS_INDEX_CHANGE_TO_EVEN_SCRAMBLED = 8; // 0x8
    field public static final int TS_INDEX_CHANGE_TO_NOT_SCRAMBLED = 4; // 0x4
+30 −3
Original line number Diff line number Diff line
@@ -133,8 +133,11 @@ public class RecordSettings extends Settings {
     * according to ISO/IEC 13818-1.
     * @hide
     */
    @IntDef(flag = true, value = {SC_INDEX_I_FRAME, SC_INDEX_P_FRAME, SC_INDEX_B_FRAME,
            SC_INDEX_SEQUENCE})
    @IntDef(prefix = "SC_INDEX_",
            flag = true,
            value = {SC_INDEX_I_FRAME, SC_INDEX_P_FRAME, SC_INDEX_B_FRAME,
                    SC_INDEX_SEQUENCE, SC_INDEX_I_SLICE, SC_INDEX_P_SLICE,
                    SC_INDEX_B_SLICE, SC_INDEX_SI_SLICE, SC_INDEX_SP_SLICE})
    @Retention(RetentionPolicy.SOURCE)
    public @interface ScIndex {}

@@ -154,7 +157,31 @@ public class RecordSettings extends Settings {
     * SC index for a new sequence.
     */
    public static final int SC_INDEX_SEQUENCE = Constants.DemuxScIndex.SEQUENCE;

    /**
     * All blocks are coded as I blocks.
     */
    public static final int SC_INDEX_I_SLICE =
            android.hardware.tv.tuner.V1_1.Constants.DemuxScIndex.I_SLICE;
    /**
     * Blocks are coded as I or P blocks.
     */
    public static final int SC_INDEX_P_SLICE =
            android.hardware.tv.tuner.V1_1.Constants.DemuxScIndex.P_SLICE;
    /**
     * Blocks are coded as I, P or B blocks.
     */
    public static final int SC_INDEX_B_SLICE =
            android.hardware.tv.tuner.V1_1.Constants.DemuxScIndex.B_SLICE;
    /**
     * A so-called switching I slice that is coded.
     */
    public static final int SC_INDEX_SI_SLICE =
            android.hardware.tv.tuner.V1_1.Constants.DemuxScIndex.SI_SLICE;
    /**
     * A so-called switching P slice that is coded.
     */
    public static final int SC_INDEX_SP_SLICE =
            android.hardware.tv.tuner.V1_1.Constants.DemuxScIndex.SP_SLICE;

    /**
     * Indexes can be tagged by NAL unit group in HEVC according to ISO/IEC 23008-2.