Loading core/api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -6933,12 +6933,14 @@ package android.media.tv.tuner.filter { } public abstract class SectionSettings extends android.media.tv.tuner.filter.Settings { method public int getBitWidthOfLengthField(); method public boolean isCrcEnabled(); method public boolean isRaw(); method public boolean isRepeat(); } public abstract static class SectionSettings.Builder<T extends android.media.tv.tuner.filter.SectionSettings.Builder<T>> { method @NonNull public T setBitWidthOfLengthField(@IntRange(from=0) int); method @NonNull public T setCrcEnabled(boolean); method @NonNull public T setRaw(boolean); method @NonNull public T setRepeat(boolean); media/java/android/media/tv/tuner/filter/SectionSettings.java +37 −2 Original line number Diff line number Diff line Loading @@ -16,12 +16,13 @@ package android.media.tv.tuner.filter; import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.SystemApi; import android.media.tv.tuner.TunerUtils; /** * Filter Settings for Section data according to ISO/IEC 13818-1. * Filter Settings for Section data according to ISO/IEC 13818-1 and ISO/IEC 23008-1. * * @hide */ Loading @@ -30,12 +31,15 @@ public abstract class SectionSettings extends Settings { final boolean mCrcEnabled; final boolean mIsRepeat; final boolean mIsRaw; final int mBitWidthOfLengthField; SectionSettings(int mainType, boolean crcEnabled, boolean isRepeat, boolean isRaw) { SectionSettings(int mainType, boolean crcEnabled, boolean isRepeat, boolean isRaw, int bitWidthOfLengthField) { super(TunerUtils.getFilterSubtype(mainType, Filter.SUBTYPE_SECTION)); mCrcEnabled = crcEnabled; mIsRepeat = isRepeat; mIsRaw = isRaw; mBitWidthOfLengthField = bitWidthOfLengthField; } /** Loading @@ -62,6 +66,7 @@ public abstract class SectionSettings extends Settings { public boolean isRepeat() { return mIsRepeat; } /** * Returns whether the filter sends {@link FilterCallback#onFilterStatusChanged} instead of * {@link FilterCallback#onFilterEvent}. Loading @@ -70,6 +75,17 @@ public abstract class SectionSettings extends Settings { return mIsRaw; } /** * Returns the bit width of the MMTP (MPEG Media Transport Protocol) section message's length * field according to ISO/IEC 23008-1. * * The section filter uses this for CRC (Cyclic redundancy check) checking when * {@link #isCrcEnabled()} is {@code true}. */ public int getBitWidthOfLengthField() { return mBitWidthOfLengthField; } /** * Builder for {@link SectionSettings}. * Loading @@ -80,6 +96,7 @@ public abstract class SectionSettings extends Settings { boolean mCrcEnabled; boolean mIsRepeat; boolean mIsRaw; int mBitWidthOfLengthField; Builder(int mainType) { mMainType = mainType; Loading Loading @@ -114,6 +131,7 @@ public abstract class SectionSettings extends Settings { mIsRepeat = isRepeat; return self(); } /** * Sets whether the filter send onFilterStatus instead of * {@link FilterCallback#onFilterEvent}. Loading @@ -124,6 +142,23 @@ public abstract class SectionSettings extends Settings { return self(); } /** * Sets the bit width for the MMTP(MPEG Media Transport Protocol) section message's length * field according to ISO/IEC 23008-1. * * The section filter uses this for CRC (Cyclic redundancy check) checking when * {@link #isCrcEnabled()} is {@code true}. * * <p>This field is only supported in Tuner 2.0 or higher version. Unsupported version will * cause no-op. Use {@link android.media.tv.tuner.TunerVersionChecker#getTunerVersion()} * to get the version information. */ @NonNull public T setBitWidthOfLengthField(@IntRange(from = 0) int bitWidthOfLengthField) { mBitWidthOfLengthField = bitWidthOfLengthField; return self(); } /* package */ abstract T self(); } } media/java/android/media/tv/tuner/filter/SectionSettingsWithSectionBits.java +4 −5 Original line number Diff line number Diff line Loading @@ -30,10 +30,9 @@ public class SectionSettingsWithSectionBits extends SectionSettings { private final byte[] mMask; private final byte[] mMode; private SectionSettingsWithSectionBits(int mainType, boolean isCheckCrc, boolean isRepeat, boolean isRaw, byte[] filter, byte[] mask, byte[] mode) { super(mainType, isCheckCrc, isRepeat, isRaw); boolean isRaw, int bitWidthOfLengthField, byte[] filter, byte[] mask, byte[] mode) { super(mainType, isCheckCrc, isRepeat, isRaw, bitWidthOfLengthField); mFilter = filter; mMask = mask; mMode = mode; Loading Loading @@ -126,8 +125,8 @@ public class SectionSettingsWithSectionBits extends SectionSettings { */ @NonNull public SectionSettingsWithSectionBits build() { return new SectionSettingsWithSectionBits( mMainType, mCrcEnabled, mIsRepeat, mIsRaw, mFilter, mMask, mMode); return new SectionSettingsWithSectionBits(mMainType, mCrcEnabled, mIsRepeat, mIsRaw, mBitWidthOfLengthField, mFilter, mMask, mMode); } @Override Loading media/java/android/media/tv/tuner/filter/SectionSettingsWithTableInfo.java +4 −4 Original line number Diff line number Diff line Loading @@ -37,8 +37,8 @@ public class SectionSettingsWithTableInfo extends SectionSettings { private final int mVersion; private SectionSettingsWithTableInfo(int mainType, boolean isCheckCrc, boolean isRepeat, boolean isRaw, int tableId, int version) { super(mainType, isCheckCrc, isRepeat, isRaw); boolean isRaw, int bitWidthOfLengthField, int tableId, int version) { super(mainType, isCheckCrc, isRepeat, isRaw, bitWidthOfLengthField); mTableId = tableId; mVersion = version; } Loading Loading @@ -99,8 +99,8 @@ public class SectionSettingsWithTableInfo extends SectionSettings { */ @NonNull public SectionSettingsWithTableInfo build() { return new SectionSettingsWithTableInfo( mMainType, mCrcEnabled, mIsRepeat, mIsRaw, mTableId, mVersion); return new SectionSettingsWithTableInfo(mMainType, mCrcEnabled, mIsRepeat, mIsRaw, mBitWidthOfLengthField, mTableId, mVersion); } @Override Loading media/jni/android_media_tv_Tuner.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -3515,11 +3515,14 @@ static DemuxFilterSectionSettings getFilterSectionSettings(JNIEnv *env, const jo bool isCheckCrc = env->GetBooleanField(settings, env->GetFieldID(clazz, "mCrcEnabled", "Z")); bool isRepeat = env->GetBooleanField(settings, env->GetFieldID(clazz, "mIsRepeat", "Z")); bool isRaw = env->GetBooleanField(settings, env->GetFieldID(clazz, "mIsRaw", "Z")); int32_t bitWidthOfLengthField = env->GetIntField(settings, env->GetFieldID(clazz, "mBitWidthOfLengthField", "I")); DemuxFilterSectionSettings filterSectionSettings { .isCheckCrc = isCheckCrc, .isRepeat = isRepeat, .isRaw = isRaw, .bitWidthOfLengthField = bitWidthOfLengthField, }; if (env->IsInstanceOf( settings, Loading Loading
core/api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -6933,12 +6933,14 @@ package android.media.tv.tuner.filter { } public abstract class SectionSettings extends android.media.tv.tuner.filter.Settings { method public int getBitWidthOfLengthField(); method public boolean isCrcEnabled(); method public boolean isRaw(); method public boolean isRepeat(); } public abstract static class SectionSettings.Builder<T extends android.media.tv.tuner.filter.SectionSettings.Builder<T>> { method @NonNull public T setBitWidthOfLengthField(@IntRange(from=0) int); method @NonNull public T setCrcEnabled(boolean); method @NonNull public T setRaw(boolean); method @NonNull public T setRepeat(boolean);
media/java/android/media/tv/tuner/filter/SectionSettings.java +37 −2 Original line number Diff line number Diff line Loading @@ -16,12 +16,13 @@ package android.media.tv.tuner.filter; import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.SystemApi; import android.media.tv.tuner.TunerUtils; /** * Filter Settings for Section data according to ISO/IEC 13818-1. * Filter Settings for Section data according to ISO/IEC 13818-1 and ISO/IEC 23008-1. * * @hide */ Loading @@ -30,12 +31,15 @@ public abstract class SectionSettings extends Settings { final boolean mCrcEnabled; final boolean mIsRepeat; final boolean mIsRaw; final int mBitWidthOfLengthField; SectionSettings(int mainType, boolean crcEnabled, boolean isRepeat, boolean isRaw) { SectionSettings(int mainType, boolean crcEnabled, boolean isRepeat, boolean isRaw, int bitWidthOfLengthField) { super(TunerUtils.getFilterSubtype(mainType, Filter.SUBTYPE_SECTION)); mCrcEnabled = crcEnabled; mIsRepeat = isRepeat; mIsRaw = isRaw; mBitWidthOfLengthField = bitWidthOfLengthField; } /** Loading @@ -62,6 +66,7 @@ public abstract class SectionSettings extends Settings { public boolean isRepeat() { return mIsRepeat; } /** * Returns whether the filter sends {@link FilterCallback#onFilterStatusChanged} instead of * {@link FilterCallback#onFilterEvent}. Loading @@ -70,6 +75,17 @@ public abstract class SectionSettings extends Settings { return mIsRaw; } /** * Returns the bit width of the MMTP (MPEG Media Transport Protocol) section message's length * field according to ISO/IEC 23008-1. * * The section filter uses this for CRC (Cyclic redundancy check) checking when * {@link #isCrcEnabled()} is {@code true}. */ public int getBitWidthOfLengthField() { return mBitWidthOfLengthField; } /** * Builder for {@link SectionSettings}. * Loading @@ -80,6 +96,7 @@ public abstract class SectionSettings extends Settings { boolean mCrcEnabled; boolean mIsRepeat; boolean mIsRaw; int mBitWidthOfLengthField; Builder(int mainType) { mMainType = mainType; Loading Loading @@ -114,6 +131,7 @@ public abstract class SectionSettings extends Settings { mIsRepeat = isRepeat; return self(); } /** * Sets whether the filter send onFilterStatus instead of * {@link FilterCallback#onFilterEvent}. Loading @@ -124,6 +142,23 @@ public abstract class SectionSettings extends Settings { return self(); } /** * Sets the bit width for the MMTP(MPEG Media Transport Protocol) section message's length * field according to ISO/IEC 23008-1. * * The section filter uses this for CRC (Cyclic redundancy check) checking when * {@link #isCrcEnabled()} is {@code true}. * * <p>This field is only supported in Tuner 2.0 or higher version. Unsupported version will * cause no-op. Use {@link android.media.tv.tuner.TunerVersionChecker#getTunerVersion()} * to get the version information. */ @NonNull public T setBitWidthOfLengthField(@IntRange(from = 0) int bitWidthOfLengthField) { mBitWidthOfLengthField = bitWidthOfLengthField; return self(); } /* package */ abstract T self(); } }
media/java/android/media/tv/tuner/filter/SectionSettingsWithSectionBits.java +4 −5 Original line number Diff line number Diff line Loading @@ -30,10 +30,9 @@ public class SectionSettingsWithSectionBits extends SectionSettings { private final byte[] mMask; private final byte[] mMode; private SectionSettingsWithSectionBits(int mainType, boolean isCheckCrc, boolean isRepeat, boolean isRaw, byte[] filter, byte[] mask, byte[] mode) { super(mainType, isCheckCrc, isRepeat, isRaw); boolean isRaw, int bitWidthOfLengthField, byte[] filter, byte[] mask, byte[] mode) { super(mainType, isCheckCrc, isRepeat, isRaw, bitWidthOfLengthField); mFilter = filter; mMask = mask; mMode = mode; Loading Loading @@ -126,8 +125,8 @@ public class SectionSettingsWithSectionBits extends SectionSettings { */ @NonNull public SectionSettingsWithSectionBits build() { return new SectionSettingsWithSectionBits( mMainType, mCrcEnabled, mIsRepeat, mIsRaw, mFilter, mMask, mMode); return new SectionSettingsWithSectionBits(mMainType, mCrcEnabled, mIsRepeat, mIsRaw, mBitWidthOfLengthField, mFilter, mMask, mMode); } @Override Loading
media/java/android/media/tv/tuner/filter/SectionSettingsWithTableInfo.java +4 −4 Original line number Diff line number Diff line Loading @@ -37,8 +37,8 @@ public class SectionSettingsWithTableInfo extends SectionSettings { private final int mVersion; private SectionSettingsWithTableInfo(int mainType, boolean isCheckCrc, boolean isRepeat, boolean isRaw, int tableId, int version) { super(mainType, isCheckCrc, isRepeat, isRaw); boolean isRaw, int bitWidthOfLengthField, int tableId, int version) { super(mainType, isCheckCrc, isRepeat, isRaw, bitWidthOfLengthField); mTableId = tableId; mVersion = version; } Loading Loading @@ -99,8 +99,8 @@ public class SectionSettingsWithTableInfo extends SectionSettings { */ @NonNull public SectionSettingsWithTableInfo build() { return new SectionSettingsWithTableInfo( mMainType, mCrcEnabled, mIsRepeat, mIsRaw, mTableId, mVersion); return new SectionSettingsWithTableInfo(mMainType, mCrcEnabled, mIsRepeat, mIsRaw, mBitWidthOfLengthField, mTableId, mVersion); } @Override Loading
media/jni/android_media_tv_Tuner.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -3515,11 +3515,14 @@ static DemuxFilterSectionSettings getFilterSectionSettings(JNIEnv *env, const jo bool isCheckCrc = env->GetBooleanField(settings, env->GetFieldID(clazz, "mCrcEnabled", "Z")); bool isRepeat = env->GetBooleanField(settings, env->GetFieldID(clazz, "mIsRepeat", "Z")); bool isRaw = env->GetBooleanField(settings, env->GetFieldID(clazz, "mIsRaw", "Z")); int32_t bitWidthOfLengthField = env->GetIntField(settings, env->GetFieldID(clazz, "mBitWidthOfLengthField", "I")); DemuxFilterSectionSettings filterSectionSettings { .isCheckCrc = isCheckCrc, .isRepeat = isRepeat, .isRaw = isRaw, .bitWidthOfLengthField = bitWidthOfLengthField, }; if (env->IsInstanceOf( settings, Loading