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

Commit c7d356ee authored by Amy Zhang's avatar Amy Zhang Committed by Android (Google) Code Review
Browse files

Merge "Add first macblock address in slice filed in Record Filter"

parents a7b918c3 12a72f45
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5090,6 +5090,7 @@ package android.media.tv.tuner {
    field public static final int INVALID_AV_SYNC_ID = -1; // 0xffffffff
    field public static final int INVALID_FILTER_ID = -1; // 0xffffffff
    field public static final long INVALID_FILTER_ID_64BIT = -1L; // 0xffffffffffffffffL
    field public static final int INVALID_FIRST_MACROBLOCK_IN_SLICE = -1; // 0xffffffff
    field public static final int INVALID_FRONTEND_SETTING_FREQUENCY = -1; // 0xffffffff
    field public static final int INVALID_LTS_ID = -1; // 0xffffffff
    field public static final int INVALID_MMTP_RECORD_EVENT_MPT_SEQUENCE_NUM = -1; // 0xffffffff
@@ -5390,6 +5391,7 @@ package android.media.tv.tuner.filter {
  public class MmtpRecordEvent extends android.media.tv.tuner.filter.FilterEvent {
    method public long getDataLength();
    method public int getFirstMbInSlice();
    method public int getMpuSequenceNumber();
    method public long getPts();
    method public int getScHevcIndexMask();
@@ -5558,6 +5560,7 @@ package android.media.tv.tuner.filter {
  public class TsRecordEvent extends android.media.tv.tuner.filter.FilterEvent {
    method public long getDataLength();
    method public int getFirstMbInSlice();
    method public int getPacketId();
    method public long getPts();
    method public int getScIndexMask();
+3 −0
Original line number Diff line number Diff line
@@ -5030,6 +5030,7 @@ package android.media.tv.tuner {
    field public static final int INVALID_AV_SYNC_ID = -1; // 0xffffffff
    field public static final int INVALID_FILTER_ID = -1; // 0xffffffff
    field public static final long INVALID_FILTER_ID_64BIT = -1L; // 0xffffffffffffffffL
    field public static final int INVALID_FIRST_MACROBLOCK_IN_SLICE = -1; // 0xffffffff
    field public static final int INVALID_FRONTEND_SETTING_FREQUENCY = -1; // 0xffffffff
    field public static final int INVALID_LTS_ID = -1; // 0xffffffff
    field public static final int INVALID_MMTP_RECORD_EVENT_MPT_SEQUENCE_NUM = -1; // 0xffffffff
@@ -5330,6 +5331,7 @@ package android.media.tv.tuner.filter {
  public class MmtpRecordEvent extends android.media.tv.tuner.filter.FilterEvent {
    method public long getDataLength();
    method public int getFirstMbInSlice();
    method public int getMpuSequenceNumber();
    method public long getPts();
    method public int getScHevcIndexMask();
@@ -5498,6 +5500,7 @@ package android.media.tv.tuner.filter {
  public class TsRecordEvent extends android.media.tv.tuner.filter.FilterEvent {
    method public long getDataLength();
    method public int getFirstMbInSlice();
    method public int getPacketId();
    method public long getPts();
    method public int getScIndexMask();
+11 −0
Original line number Diff line number Diff line
@@ -121,6 +121,17 @@ public class Tuner implements AutoCloseable {
    public static final int INVALID_MMTP_RECORD_EVENT_MPT_SEQUENCE_NUM =
            android.hardware.tv.tuner.V1_1.Constants.Constant
                    .INVALID_MMTP_RECORD_EVENT_MPT_SEQUENCE_NUM;
    /**
     * Invalid first macroblock address in MmtpRecordEvent and TsRecordEvent.
     *
     * <p>Returned by {@link MmtpRecordEvent#getMbInSlice()} and
     * {@link TsRecordEvent#getMbInSlice()} when the requested sequence number is not available.
     *
     * @see android.media.tv.tuner.filter.MmtpRecordEvent#getMbInSlice()
     * @see android.media.tv.tuner.filter.TsRecordEvent#getMbInSlice()
     */
    public static final int INVALID_FIRST_MACROBLOCK_IN_SLICE =
            android.hardware.tv.tuner.V1_1.Constants.Constant.INVALID_FIRST_MACROBLOCK_IN_SLICE;
    /**
     * Invalid local transport stream id.
     *
+27 −3
Original line number Diff line number Diff line
@@ -31,13 +31,16 @@ public class MmtpRecordEvent extends FilterEvent {
    private final long mDataLength;
    private final int mMpuSequenceNumber;
    private final long mPts;
    private final int mFirstMbInSlice;

    // This constructor is used by JNI code only
    private MmtpRecordEvent(int scHevcIndexMask, long dataLength, int mpuSequenceNumber, long pts) {
    private MmtpRecordEvent(int scHevcIndexMask, long dataLength, int mpuSequenceNumber, long pts,
            int firstMbInSlice) {
        mScHevcIndexMask = scHevcIndexMask;
        mDataLength = dataLength;
        mMpuSequenceNumber = mpuSequenceNumber;
        mPts = pts;
        mFirstMbInSlice = firstMbInSlice;
    }

    /**
@@ -58,6 +61,11 @@ public class MmtpRecordEvent extends FilterEvent {

    /**
     * Get the MPU sequence number of the filtered data.
     *
     * <p>This field is only supported in Tuner 1.1 or higher version. Unsupported version will
     * return {@link android.media.tv.tuner.Tuner.INVALID_MMTP_RECORD_EVENT_MPT_SEQUENCE_NUM}. Use
     * {@link android.media.tv.tuner.TunerVersionChecker.getTunerVersion()} to get the version
     * information.
     */
    public int getMpuSequenceNumber() {
        return mMpuSequenceNumber;
@@ -65,10 +73,26 @@ public class MmtpRecordEvent extends FilterEvent {

    /**
     * Get the Presentation Time Stamp(PTS) for the audio or video frame. It is based on 90KHz
     * and has the same format as the PTS in ISO/IEC 13818-1. It is used only for the SC and
     * the SC_HEVC.
     * and has the same format as the PTS in ISO/IEC 13818-1.
     *
     * <p>This field is only supported in Tuner 1.1 or higher version. Unsupported version will
     * return {@link android.media.tv.tuner.Tuner.INVALID_TIMESTAMP}. Use
     * {@link android.media.tv.tuner.TunerVersionChecker.getTunerVersion()} to get the version
     * information.
     */
    public long getPts() {
        return mPts;
    }

    /**
     * Get the address of the first macroblock in the slice defined in ITU-T Rec. H.264.
     *
     * <p>This field is only supported in Tuner 1.1 or higher version. Unsupported version will
     * return {@link android.media.tv.tuner.Tuner.INVALID_FIRST_MACROBLOCK_IN_SLICE}. Use
     * {@link android.media.tv.tuner.TunerVersionChecker.getTunerVersion()} to get the version
     * information.
     */
    public int getFirstMbInSlice() {
        return mFirstMbInSlice;
    }
}
+22 −3
Original line number Diff line number Diff line
@@ -33,14 +33,17 @@ public class TsRecordEvent extends FilterEvent {
    private final int mScIndexMask;
    private final long mDataLength;
    private final long mPts;
    private final int mFirstMbInSlice;

    // This constructor is used by JNI code only
    private TsRecordEvent(int pid, int tsIndexMask, int scIndexMask, long dataLength, long pts) {
    private TsRecordEvent(int pid, int tsIndexMask, int scIndexMask, long dataLength, long pts,
            int firstMbInSlice) {
        mPid = pid;
        mTsIndexMask = tsIndexMask;
        mScIndexMask = scIndexMask;
        mDataLength = dataLength;
        mPts = pts;
        mFirstMbInSlice = firstMbInSlice;
    }

    /**
@@ -77,10 +80,26 @@ public class TsRecordEvent extends FilterEvent {

    /**
     * Gets the Presentation Time Stamp(PTS) for the audio or video frame. It is based on 90KHz
     * and has the same format as the PTS in ISO/IEC 13818-1. It is used only for the SC and
     * the SC_HEVC.
     * and has the same format as the PTS in ISO/IEC 13818-1.
     *
     * <p>This field is only supported in Tuner 1.1 or higher version. Unsupported version will
     * return {@link android.media.tv.tuner.Tuner.INVALID_TIMESTAMP}. Use
     * {@link android.media.tv.tuner.TunerVersionChecker.getTunerVersion()} to get the version
     * information.
     */
    public long getPts() {
        return mPts;
    }

    /**
     * Get the address of the first macroblock in the slice defined in ITU-T Rec. H.264.
     *
     * <p>This field is only supported in Tuner 1.1 or higher version. Unsupported version will
     * return {@link android.media.tv.tuner.Tuner.INVALID_FIRST_MACROBLOCK_IN_SLICE}. Use
     * {@link android.media.tv.tuner.TunerVersionChecker.getTunerVersion()} to get the version
     * information.
     */
    public int getFirstMbInSlice() {
        return mFirstMbInSlice;
    }
}
Loading