Merge "Tuner API: remove @FilterConfiguration.PacketType" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6a84d7bef4
@@ -4992,6 +4992,11 @@ package android.media.tv.tuner.filter {
|
|||||||
field public static final int LENGTH_TYPE_UNDEFINED = 0; // 0x0
|
field public static final int LENGTH_TYPE_UNDEFINED = 0; // 0x0
|
||||||
field public static final int LENGTH_TYPE_WITHOUT_ADDITIONAL_HEADER = 1; // 0x1
|
field public static final int LENGTH_TYPE_WITHOUT_ADDITIONAL_HEADER = 1; // 0x1
|
||||||
field public static final int LENGTH_TYPE_WITH_ADDITIONAL_HEADER = 2; // 0x2
|
field public static final int LENGTH_TYPE_WITH_ADDITIONAL_HEADER = 2; // 0x2
|
||||||
|
field public static final int PACKET_TYPE_COMPRESSED = 2; // 0x2
|
||||||
|
field public static final int PACKET_TYPE_EXTENSION = 6; // 0x6
|
||||||
|
field public static final int PACKET_TYPE_IPV4 = 0; // 0x0
|
||||||
|
field public static final int PACKET_TYPE_MPEG2_TS = 7; // 0x7
|
||||||
|
field public static final int PACKET_TYPE_SIGNALING = 4; // 0x4
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class AlpFilterConfiguration.Builder extends android.media.tv.tuner.filter.FilterConfiguration.Builder<android.media.tv.tuner.filter.AlpFilterConfiguration.Builder> {
|
public static class AlpFilterConfiguration.Builder extends android.media.tv.tuner.filter.FilterConfiguration.Builder<android.media.tv.tuner.filter.AlpFilterConfiguration.Builder> {
|
||||||
@@ -5082,9 +5087,6 @@ package android.media.tv.tuner.filter {
|
|||||||
public abstract class FilterConfiguration {
|
public abstract class FilterConfiguration {
|
||||||
method @Nullable public android.media.tv.tuner.filter.Settings getSettings();
|
method @Nullable public android.media.tv.tuner.filter.Settings getSettings();
|
||||||
method public abstract int getType();
|
method public abstract int getType();
|
||||||
field public static final int PACKET_TYPE_COMPRESSED = 2; // 0x2
|
|
||||||
field public static final int PACKET_TYPE_IPV4 = 0; // 0x0
|
|
||||||
field public static final int PACKET_TYPE_SIGNALING = 4; // 0x4
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class FilterConfiguration.Builder<T extends android.media.tv.tuner.filter.FilterConfiguration.Builder<T>> {
|
public abstract static class FilterConfiguration.Builder<T extends android.media.tv.tuner.filter.FilterConfiguration.Builder<T>> {
|
||||||
@@ -5282,6 +5284,11 @@ package android.media.tv.tuner.filter {
|
|||||||
method public int getType();
|
method public int getType();
|
||||||
method public boolean isCompressedIpPacket();
|
method public boolean isCompressedIpPacket();
|
||||||
method public boolean isPassthrough();
|
method public boolean isPassthrough();
|
||||||
|
field public static final int PACKET_TYPE_COMPRESSED = 3; // 0x3
|
||||||
|
field public static final int PACKET_TYPE_IPV4 = 1; // 0x1
|
||||||
|
field public static final int PACKET_TYPE_IPV6 = 2; // 0x2
|
||||||
|
field public static final int PACKET_TYPE_NULL = 255; // 0xff
|
||||||
|
field public static final int PACKET_TYPE_SIGNALING = 254; // 0xfe
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class TlvFilterConfiguration.Builder extends android.media.tv.tuner.filter.FilterConfiguration.Builder<android.media.tv.tuner.filter.TlvFilterConfiguration.Builder> {
|
public static class TlvFilterConfiguration.Builder extends android.media.tv.tuner.filter.FilterConfiguration.Builder<android.media.tv.tuner.filter.TlvFilterConfiguration.Builder> {
|
||||||
|
|||||||
@@ -34,6 +34,27 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public class AlpFilterConfiguration extends FilterConfiguration {
|
public class AlpFilterConfiguration extends FilterConfiguration {
|
||||||
|
/**
|
||||||
|
* IPv4 packet type.
|
||||||
|
*/
|
||||||
|
public static final int PACKET_TYPE_IPV4 = 0;
|
||||||
|
/**
|
||||||
|
* Compressed packet type.
|
||||||
|
*/
|
||||||
|
public static final int PACKET_TYPE_COMPRESSED = 2;
|
||||||
|
/**
|
||||||
|
* Signaling packet type.
|
||||||
|
*/
|
||||||
|
public static final int PACKET_TYPE_SIGNALING = 4;
|
||||||
|
/**
|
||||||
|
* Extension packet type.
|
||||||
|
*/
|
||||||
|
public static final int PACKET_TYPE_EXTENSION = 6;
|
||||||
|
/**
|
||||||
|
* MPEG-2 TS packet type.
|
||||||
|
*/
|
||||||
|
public static final int PACKET_TYPE_MPEG2_TS = 7;
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@IntDef(prefix = "LENGTH_TYPE_", value =
|
@IntDef(prefix = "LENGTH_TYPE_", value =
|
||||||
@@ -73,8 +94,9 @@ public class AlpFilterConfiguration extends FilterConfiguration {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets packet type.
|
* Gets packet type.
|
||||||
|
*
|
||||||
|
* <p>The meaning of each packet type value is shown in ATSC A/330:2019 table 5.2.
|
||||||
*/
|
*/
|
||||||
@FilterConfiguration.PacketType
|
|
||||||
public int getPacketType() {
|
public int getPacketType() {
|
||||||
return mPacketType;
|
return mPacketType;
|
||||||
}
|
}
|
||||||
@@ -110,9 +132,11 @@ public class AlpFilterConfiguration extends FilterConfiguration {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets packet type.
|
* Sets packet type.
|
||||||
|
*
|
||||||
|
* <p>The meaning of each packet type value is shown in ATSC A/330:2019 table 5.2.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public Builder setPacketType(@FilterConfiguration.PacketType int packetType) {
|
public Builder setPacketType(int packetType) {
|
||||||
mPacketType = packetType;
|
mPacketType = packetType;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,14 +16,10 @@
|
|||||||
|
|
||||||
package android.media.tv.tuner.filter;
|
package android.media.tv.tuner.filter;
|
||||||
|
|
||||||
import android.annotation.IntDef;
|
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter configuration used to configure filters.
|
* Filter configuration used to configure filters.
|
||||||
*
|
*
|
||||||
@@ -32,26 +28,6 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
@SystemApi
|
@SystemApi
|
||||||
public abstract class FilterConfiguration {
|
public abstract class FilterConfiguration {
|
||||||
|
|
||||||
/** @hide */
|
|
||||||
@IntDef(prefix = "PACKET_TYPE_", value =
|
|
||||||
{PACKET_TYPE_IPV4, PACKET_TYPE_COMPRESSED, PACKET_TYPE_SIGNALING})
|
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
|
||||||
public @interface PacketType {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* IP v4 packet type.
|
|
||||||
*/
|
|
||||||
public static final int PACKET_TYPE_IPV4 = 0;
|
|
||||||
/**
|
|
||||||
* Compressed packet type.
|
|
||||||
*/
|
|
||||||
public static final int PACKET_TYPE_COMPRESSED = 2;
|
|
||||||
/**
|
|
||||||
* Signaling packet type.
|
|
||||||
*/
|
|
||||||
public static final int PACKET_TYPE_SIGNALING = 4;
|
|
||||||
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
/* package */ final Settings mSettings;
|
/* package */ final Settings mSettings;
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,27 @@ import android.media.tv.tuner.TunerUtils;
|
|||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public class TlvFilterConfiguration extends FilterConfiguration {
|
public class TlvFilterConfiguration extends FilterConfiguration {
|
||||||
|
/**
|
||||||
|
* IPv4 packet type.
|
||||||
|
*/
|
||||||
|
public static final int PACKET_TYPE_IPV4 = 0x01;
|
||||||
|
/**
|
||||||
|
* IPv6 packet type.
|
||||||
|
*/
|
||||||
|
public static final int PACKET_TYPE_IPV6 = 0x02;
|
||||||
|
/**
|
||||||
|
* Compressed packet type.
|
||||||
|
*/
|
||||||
|
public static final int PACKET_TYPE_COMPRESSED = 0x03;
|
||||||
|
/**
|
||||||
|
* Signaling packet type.
|
||||||
|
*/
|
||||||
|
public static final int PACKET_TYPE_SIGNALING = 0xFE;
|
||||||
|
/**
|
||||||
|
* NULL packet type.
|
||||||
|
*/
|
||||||
|
public static final int PACKET_TYPE_NULL = 0xFF;
|
||||||
|
|
||||||
private final int mPacketType;
|
private final int mPacketType;
|
||||||
private final boolean mIsCompressedIpPacket;
|
private final boolean mIsCompressedIpPacket;
|
||||||
private final boolean mPassthrough;
|
private final boolean mPassthrough;
|
||||||
@@ -48,8 +69,9 @@ public class TlvFilterConfiguration extends FilterConfiguration {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets packet type.
|
* Gets packet type.
|
||||||
|
*
|
||||||
|
* <p>The description of each packet type value is shown in ITU-R BT.1869 table 2.
|
||||||
*/
|
*/
|
||||||
@FilterConfiguration.PacketType
|
|
||||||
public int getPacketType() {
|
public int getPacketType() {
|
||||||
return mPacketType;
|
return mPacketType;
|
||||||
}
|
}
|
||||||
@@ -96,9 +118,11 @@ public class TlvFilterConfiguration extends FilterConfiguration {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets packet type.
|
* Sets packet type.
|
||||||
|
*
|
||||||
|
* <p>The description of each packet type value is shown in ITU-R BT.1869 table 2.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public Builder setPacketType(@FilterConfiguration.PacketType int packetType) {
|
public Builder setPacketType(int packetType) {
|
||||||
mPacketType = packetType;
|
mPacketType = packetType;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user