Unhide more methods of Tuner.java
Test: make; Bug: 139308734 Change-Id: I5d5896cc610048cce0e98050a68b3933da1906f3
This commit is contained in:
@@ -4727,12 +4727,18 @@ package android.media.tv.tuner {
|
||||
method public void onEvent(int);
|
||||
}
|
||||
|
||||
public final class Tuner implements java.lang.AutoCloseable {
|
||||
ctor public Tuner(@NonNull android.content.Context);
|
||||
public class Tuner implements java.lang.AutoCloseable {
|
||||
ctor @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public Tuner(@NonNull android.content.Context, @NonNull String, int, @Nullable android.media.tv.tuner.Tuner.OnResourceLostListener);
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public void clearOnTuneEventListener();
|
||||
method public void close();
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int connectCiCam(int);
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int disconnectCiCam();
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int getAvSyncHwId(@NonNull android.media.tv.tuner.filter.Filter);
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public long getAvSyncTime(int);
|
||||
method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.DemuxCapabilities getDemuxCapabilities(@NonNull android.content.Context);
|
||||
method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public android.media.tv.tuner.frontend.FrontendInfo getFrontendInfo();
|
||||
method @Nullable public android.media.tv.tuner.frontend.FrontendStatus getFrontendStatus(@NonNull int[]);
|
||||
method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public android.media.tv.tuner.Tuner.Descrambler openDescrambler();
|
||||
method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public android.media.tv.tuner.Descrambler openDescrambler();
|
||||
method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public android.media.tv.tuner.dvr.DvrPlayback openDvrPlayback(long, @Nullable java.util.concurrent.Executor, @Nullable android.media.tv.tuner.dvr.OnPlaybackStatusChangedListener);
|
||||
method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public android.media.tv.tuner.dvr.DvrRecorder openDvrRecorder(long, @Nullable java.util.concurrent.Executor, @Nullable android.media.tv.tuner.dvr.OnRecordStatusChangedListener);
|
||||
method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public android.media.tv.tuner.filter.Filter openFilter(int, int, long, @Nullable java.util.concurrent.Executor, @Nullable android.media.tv.tuner.filter.FilterCallback);
|
||||
@@ -4742,15 +4748,19 @@ package android.media.tv.tuner {
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int scan(@NonNull android.media.tv.tuner.frontend.FrontendSettings, int, @NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.frontend.ScanCallback);
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int setLna(boolean);
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public void setOnTuneEventListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.frontend.OnTuneEventListener);
|
||||
method public void shareFrontendFromTuner(@NonNull android.media.tv.tuner.Tuner);
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int stopScan();
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int stopTune();
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int tune(@NonNull android.media.tv.tuner.frontend.FrontendSettings);
|
||||
}
|
||||
|
||||
public class Tuner.Descrambler {
|
||||
public static interface Tuner.OnResourceLostListener {
|
||||
method public void onResourceLost(@NonNull android.media.tv.tuner.Tuner);
|
||||
}
|
||||
|
||||
public final class TunerConstants {
|
||||
field public static final int INVALID_STREAM_ID = -1; // 0xffffffff
|
||||
field public static final int INVALID_TS_PID = -1; // 0xffffffff
|
||||
field public static final int RESULT_INVALID_ARGUMENT = 4; // 0x4
|
||||
field public static final int RESULT_INVALID_STATE = 3; // 0x3
|
||||
field public static final int RESULT_NOT_INITIALIZED = 2; // 0x2
|
||||
@@ -4761,18 +4771,6 @@ package android.media.tv.tuner {
|
||||
field public static final int SCAN_TYPE_AUTO = 1; // 0x1
|
||||
field public static final int SCAN_TYPE_BLIND = 2; // 0x2
|
||||
field public static final int SCAN_TYPE_UNDEFINED = 0; // 0x0
|
||||
field public static final int SC_HEVC_INDEX_AUD = 2; // 0x2
|
||||
field public static final int SC_HEVC_INDEX_SLICE_BLA_N_LP = 16; // 0x10
|
||||
field public static final int SC_HEVC_INDEX_SLICE_BLA_W_RADL = 8; // 0x8
|
||||
field public static final int SC_HEVC_INDEX_SLICE_CE_BLA_W_LP = 4; // 0x4
|
||||
field public static final int SC_HEVC_INDEX_SLICE_IDR_N_LP = 64; // 0x40
|
||||
field public static final int SC_HEVC_INDEX_SLICE_IDR_W_RADL = 32; // 0x20
|
||||
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_I_FRAME = 1; // 0x1
|
||||
field public static final int SC_INDEX_P_FRAME = 2; // 0x2
|
||||
field public static final int SC_INDEX_SEQUENCE = 8; // 0x8
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5028,6 +5026,21 @@ package android.media.tv.tuner.filter {
|
||||
method public int getScIndexMask();
|
||||
method public int getScIndexType();
|
||||
method public int getTsIndexMask();
|
||||
field public static final int INDEX_TYPE_NONE = 0; // 0x0
|
||||
field public static final int INDEX_TYPE_SC = 1; // 0x1
|
||||
field public static final int INDEX_TYPE_SC_HEVC = 2; // 0x2
|
||||
field public static final int SC_HEVC_INDEX_AUD = 2; // 0x2
|
||||
field public static final int SC_HEVC_INDEX_SLICE_BLA_N_LP = 16; // 0x10
|
||||
field public static final int SC_HEVC_INDEX_SLICE_BLA_W_RADL = 8; // 0x8
|
||||
field public static final int SC_HEVC_INDEX_SLICE_CE_BLA_W_LP = 4; // 0x4
|
||||
field public static final int SC_HEVC_INDEX_SLICE_IDR_N_LP = 64; // 0x40
|
||||
field public static final int SC_HEVC_INDEX_SLICE_IDR_W_RADL = 32; // 0x20
|
||||
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_I_FRAME = 1; // 0x1
|
||||
field public static final int SC_INDEX_P_FRAME = 2; // 0x2
|
||||
field public static final int SC_INDEX_SEQUENCE = 8; // 0x8
|
||||
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
|
||||
@@ -5546,6 +5559,43 @@ package android.media.tv.tuner.frontend {
|
||||
public abstract class FrontendSettings {
|
||||
method public int getFrequency();
|
||||
method public abstract int getType();
|
||||
field public static final long FEC_11_15 = 4194304L; // 0x400000L
|
||||
field public static final long FEC_11_20 = 8388608L; // 0x800000L
|
||||
field public static final long FEC_11_45 = 16777216L; // 0x1000000L
|
||||
field public static final long FEC_13_18 = 33554432L; // 0x2000000L
|
||||
field public static final long FEC_13_45 = 67108864L; // 0x4000000L
|
||||
field public static final long FEC_14_45 = 134217728L; // 0x8000000L
|
||||
field public static final long FEC_1_2 = 2L; // 0x2L
|
||||
field public static final long FEC_1_3 = 4L; // 0x4L
|
||||
field public static final long FEC_1_4 = 8L; // 0x8L
|
||||
field public static final long FEC_1_5 = 16L; // 0x10L
|
||||
field public static final long FEC_23_36 = 268435456L; // 0x10000000L
|
||||
field public static final long FEC_25_36 = 536870912L; // 0x20000000L
|
||||
field public static final long FEC_26_45 = 1073741824L; // 0x40000000L
|
||||
field public static final long FEC_28_45 = -2147483648L; // 0xffffffff80000000L
|
||||
field public static final long FEC_29_45 = 1L; // 0x1L
|
||||
field public static final long FEC_2_3 = 32L; // 0x20L
|
||||
field public static final long FEC_2_5 = 64L; // 0x40L
|
||||
field public static final long FEC_2_9 = 128L; // 0x80L
|
||||
field public static final long FEC_31_45 = 2L; // 0x2L
|
||||
field public static final long FEC_32_45 = 4L; // 0x4L
|
||||
field public static final long FEC_3_4 = 256L; // 0x100L
|
||||
field public static final long FEC_3_5 = 512L; // 0x200L
|
||||
field public static final long FEC_4_15 = 2048L; // 0x800L
|
||||
field public static final long FEC_4_5 = 1024L; // 0x400L
|
||||
field public static final long FEC_5_6 = 4096L; // 0x1000L
|
||||
field public static final long FEC_5_9 = 8192L; // 0x2000L
|
||||
field public static final long FEC_6_7 = 16384L; // 0x4000L
|
||||
field public static final long FEC_77_90 = 8L; // 0x8L
|
||||
field public static final long FEC_7_15 = 131072L; // 0x20000L
|
||||
field public static final long FEC_7_8 = 32768L; // 0x8000L
|
||||
field public static final long FEC_7_9 = 65536L; // 0x10000L
|
||||
field public static final long FEC_8_15 = 524288L; // 0x80000L
|
||||
field public static final long FEC_8_9 = 262144L; // 0x40000L
|
||||
field public static final long FEC_9_10 = 1048576L; // 0x100000L
|
||||
field public static final long FEC_9_20 = 2097152L; // 0x200000L
|
||||
field public static final long FEC_AUTO = 1L; // 0x1L
|
||||
field public static final long FEC_UNDEFINED = 0L; // 0x0L
|
||||
field public static final int TYPE_ANALOG = 1; // 0x1
|
||||
field public static final int TYPE_ATSC = 2; // 0x2
|
||||
field public static final int TYPE_ATSC3 = 3; // 0x3
|
||||
|
||||
@@ -23,6 +23,7 @@ import android.annotation.Nullable;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.Context;
|
||||
import android.media.tv.TvInputService;
|
||||
import android.media.tv.tuner.TunerConstants.Result;
|
||||
import android.media.tv.tuner.dvr.DvrPlayback;
|
||||
import android.media.tv.tuner.dvr.DvrRecorder;
|
||||
@@ -55,7 +56,7 @@ import java.util.concurrent.Executor;
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public final class Tuner implements AutoCloseable {
|
||||
public class Tuner implements AutoCloseable {
|
||||
private static final String TAG = "MediaTvTuner";
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
@@ -85,28 +86,16 @@ public final class Tuner implements AutoCloseable {
|
||||
@Nullable
|
||||
private Executor mScanCallbackExecutor;
|
||||
|
||||
/**
|
||||
* Constructs a Tuner instance.
|
||||
*
|
||||
* @param context context of the caller.
|
||||
*/
|
||||
public Tuner(@NonNull Context context) {
|
||||
mContext = context;
|
||||
nativeSetup();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Tuner instance.
|
||||
*
|
||||
* @param context the context of the caller.
|
||||
* @param tvInputSessionId the session ID of the TV input.
|
||||
* @param useCase the use case of this Tuner instance.
|
||||
*
|
||||
* @hide
|
||||
* TODO: replace the other constructor
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER)
|
||||
public Tuner(@NonNull Context context, @NonNull String tvInputSessionId, int useCase,
|
||||
public Tuner(@NonNull Context context, @NonNull String tvInputSessionId,
|
||||
@TvInputService.PriorityHintUseCaseType int useCase,
|
||||
@Nullable OnResourceLostListener listener) {
|
||||
mContext = context;
|
||||
}
|
||||
@@ -115,18 +104,21 @@ public final class Tuner implements AutoCloseable {
|
||||
* Shares the frontend resource with another Tuner instance
|
||||
*
|
||||
* @param tuner the Tuner instance to share frontend resource with.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void shareFrontendFromTuner(@NonNull Tuner tuner) {
|
||||
// TODO: implementation.
|
||||
}
|
||||
|
||||
|
||||
private long mNativeContext; // used by native jMediaTuner
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* Releases the Tuner instance.
|
||||
*/
|
||||
@Override
|
||||
public void close() {}
|
||||
public void close() {
|
||||
// TODO: implementation.
|
||||
}
|
||||
|
||||
/**
|
||||
* Native Initialization.
|
||||
@@ -176,7 +168,7 @@ public final class Tuner implements AutoCloseable {
|
||||
/**
|
||||
* Listener for resource lost.
|
||||
*
|
||||
* @hide
|
||||
* <p>Resource is reclaimed and tuner instance is forced to close.
|
||||
*/
|
||||
public interface OnResourceLostListener {
|
||||
/**
|
||||
@@ -395,8 +387,6 @@ public final class Tuner implements AutoCloseable {
|
||||
*
|
||||
* @param filter the filter instance for the hardware sync ID.
|
||||
* @return the id of hardware A/V sync.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER)
|
||||
public int getAvSyncHwId(@NonNull Filter filter) {
|
||||
@@ -412,8 +402,6 @@ public final class Tuner implements AutoCloseable {
|
||||
*
|
||||
* @param avSyncHwId the hardware id of A/V sync.
|
||||
* @return the current timestamp of hardware A/V sync.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER)
|
||||
public long getAvSyncTime(int avSyncHwId) {
|
||||
@@ -429,8 +417,6 @@ public final class Tuner implements AutoCloseable {
|
||||
*
|
||||
* @param ciCamId specify CI-CAM Id to connect.
|
||||
* @return result status of the operation.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER)
|
||||
@Result
|
||||
@@ -445,8 +431,6 @@ public final class Tuner implements AutoCloseable {
|
||||
* <p>The demux will use the output from the frontend as the input after this call.
|
||||
*
|
||||
* @return result status of the operation.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER)
|
||||
@Result
|
||||
@@ -472,8 +456,6 @@ public final class Tuner implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* Gets Demux capabilities.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER)
|
||||
@Nullable
|
||||
@@ -598,19 +580,6 @@ public final class Tuner implements AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class is used to interact with descramblers.
|
||||
*
|
||||
* <p> Descrambler is a hardware component used to descramble data.
|
||||
*
|
||||
* <p> This class controls the TIS interaction with Tuner HAL.
|
||||
* TODO: Remove
|
||||
*/
|
||||
public class Descrambler {
|
||||
private Descrambler() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a Descrambler in tuner.
|
||||
*
|
||||
|
||||
@@ -17,14 +17,8 @@
|
||||
package android.media.tv.tuner;
|
||||
|
||||
import android.annotation.IntDef;
|
||||
import android.annotation.LongDef;
|
||||
import android.annotation.SystemApi;
|
||||
import android.hardware.tv.tuner.V1_0.Constants;
|
||||
import android.media.tv.tuner.frontend.DvbcFrontendSettings;
|
||||
import android.media.tv.tuner.frontend.DvbsFrontendSettings;
|
||||
import android.media.tv.tuner.frontend.Isdbs3FrontendSettings;
|
||||
import android.media.tv.tuner.frontend.IsdbsFrontendSettings;
|
||||
import android.media.tv.tuner.frontend.IsdbtFrontendSettings;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -38,12 +32,10 @@ import java.lang.annotation.RetentionPolicy;
|
||||
public final class TunerConstants {
|
||||
/**
|
||||
* Invalid TS packet ID.
|
||||
* @hide
|
||||
*/
|
||||
public static final int INVALID_TS_PID = Constants.Constant.INVALID_TS_PID;
|
||||
/**
|
||||
* Invalid stream ID.
|
||||
* @hide
|
||||
*/
|
||||
public static final int INVALID_STREAM_ID = Constants.Constant.INVALID_STREAM_ID;
|
||||
|
||||
@@ -69,350 +61,6 @@ public final class TunerConstants {
|
||||
*/
|
||||
public static final int SCAN_TYPE_BLIND = Constants.FrontendScanType.SCAN_BLIND;
|
||||
|
||||
/** @hide */
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef(prefix = "INDEX_TYPE_", value =
|
||||
{INDEX_TYPE_NONE, INDEX_TYPE_SC, INDEX_TYPE_SC_HEVC})
|
||||
public @interface ScIndexType {}
|
||||
|
||||
/**
|
||||
* Start Code Index is not used.
|
||||
* @hide
|
||||
*/
|
||||
public static final int INDEX_TYPE_NONE = Constants.DemuxRecordScIndexType.NONE;
|
||||
/**
|
||||
* Start Code index.
|
||||
* @hide
|
||||
*/
|
||||
public static final int INDEX_TYPE_SC = Constants.DemuxRecordScIndexType.SC;
|
||||
/**
|
||||
* Start Code index for HEVC.
|
||||
* @hide
|
||||
*/
|
||||
public static final int INDEX_TYPE_SC_HEVC = Constants.DemuxRecordScIndexType.SC_HEVC;
|
||||
|
||||
/**
|
||||
* Indexes can be tagged by Start Code in PES (Packetized Elementary Stream)
|
||||
* 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})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface ScIndex {}
|
||||
|
||||
/**
|
||||
* SC index for a new I-frame.
|
||||
*/
|
||||
public static final int SC_INDEX_I_FRAME = Constants.DemuxScIndex.I_FRAME;
|
||||
/**
|
||||
* SC index for a new P-frame.
|
||||
*/
|
||||
public static final int SC_INDEX_P_FRAME = Constants.DemuxScIndex.P_FRAME;
|
||||
/**
|
||||
* SC index for a new B-frame.
|
||||
*/
|
||||
public static final int SC_INDEX_B_FRAME = Constants.DemuxScIndex.B_FRAME;
|
||||
/**
|
||||
* SC index for a new sequence.
|
||||
*/
|
||||
public static final int SC_INDEX_SEQUENCE = Constants.DemuxScIndex.SEQUENCE;
|
||||
|
||||
|
||||
/**
|
||||
* Indexes can be tagged by NAL unit group in HEVC according to ISO/IEC 23008-2.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@IntDef(flag = true,
|
||||
value = {SC_HEVC_INDEX_SPS, SC_HEVC_INDEX_AUD, SC_HEVC_INDEX_SLICE_CE_BLA_W_LP,
|
||||
SC_HEVC_INDEX_SLICE_BLA_W_RADL, SC_HEVC_INDEX_SLICE_BLA_N_LP,
|
||||
SC_HEVC_INDEX_SLICE_IDR_W_RADL, SC_HEVC_INDEX_SLICE_IDR_N_LP,
|
||||
SC_HEVC_INDEX_SLICE_TRAIL_CRA})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface ScHevcIndex {}
|
||||
|
||||
/**
|
||||
* SC HEVC index SPS.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SPS = Constants.DemuxScHevcIndex.SPS;
|
||||
/**
|
||||
* SC HEVC index AUD.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_AUD = Constants.DemuxScHevcIndex.AUD;
|
||||
/**
|
||||
* SC HEVC index SLICE_CE_BLA_W_LP.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_CE_BLA_W_LP =
|
||||
Constants.DemuxScHevcIndex.SLICE_CE_BLA_W_LP;
|
||||
/**
|
||||
* SC HEVC index SLICE_BLA_W_RADL.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_BLA_W_RADL =
|
||||
Constants.DemuxScHevcIndex.SLICE_BLA_W_RADL;
|
||||
/**
|
||||
* SC HEVC index SLICE_BLA_N_LP.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_BLA_N_LP =
|
||||
Constants.DemuxScHevcIndex.SLICE_BLA_N_LP;
|
||||
/**
|
||||
* SC HEVC index SLICE_IDR_W_RADL.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_IDR_W_RADL =
|
||||
Constants.DemuxScHevcIndex.SLICE_IDR_W_RADL;
|
||||
/**
|
||||
* SC HEVC index SLICE_IDR_N_LP.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_IDR_N_LP =
|
||||
Constants.DemuxScHevcIndex.SLICE_IDR_N_LP;
|
||||
/**
|
||||
* SC HEVC index SLICE_TRAIL_CRA.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_TRAIL_CRA =
|
||||
Constants.DemuxScHevcIndex.SLICE_TRAIL_CRA;
|
||||
|
||||
/** @hide */
|
||||
@LongDef({FEC_UNDEFINED, FEC_AUTO, FEC_1_2, FEC_1_3, FEC_1_4, FEC_1_5, FEC_2_3, FEC_2_5,
|
||||
FEC_2_9, FEC_3_4, FEC_3_5, FEC_4_5, FEC_4_15, FEC_5_6, FEC_5_9, FEC_6_7, FEC_7_8,
|
||||
FEC_7_9, FEC_7_15, FEC_8_9, FEC_8_15, FEC_9_10, FEC_9_20, FEC_11_15, FEC_11_20,
|
||||
FEC_11_45, FEC_13_18, FEC_13_45, FEC_14_45, FEC_23_36, FEC_25_36, FEC_26_45, FEC_28_45,
|
||||
FEC_29_45, FEC_31_45, FEC_32_45, FEC_77_90})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface FrontendInnerFec {}
|
||||
|
||||
/**
|
||||
* FEC not defined
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_UNDEFINED = Constants.FrontendInnerFec.FEC_UNDEFINED;
|
||||
/**
|
||||
* hardware is able to detect and set FEC automatically
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_AUTO = Constants.FrontendInnerFec.AUTO;
|
||||
/**
|
||||
* 1/2 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_1_2 = Constants.FrontendInnerFec.FEC_1_2;
|
||||
/**
|
||||
* 1/3 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_1_3 = Constants.FrontendInnerFec.FEC_1_3;
|
||||
/**
|
||||
* 1/4 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_1_4 = Constants.FrontendInnerFec.FEC_1_4;
|
||||
/**
|
||||
* 1/5 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_1_5 = Constants.FrontendInnerFec.FEC_1_5;
|
||||
/**
|
||||
* 2/3 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_2_3 = Constants.FrontendInnerFec.FEC_2_3;
|
||||
/**
|
||||
* 2/5 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_2_5 = Constants.FrontendInnerFec.FEC_2_5;
|
||||
/**
|
||||
* 2/9 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_2_9 = Constants.FrontendInnerFec.FEC_2_9;
|
||||
/**
|
||||
* 3/4 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_3_4 = Constants.FrontendInnerFec.FEC_3_4;
|
||||
/**
|
||||
* 3/5 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_3_5 = Constants.FrontendInnerFec.FEC_3_5;
|
||||
/**
|
||||
* 4/5 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_4_5 = Constants.FrontendInnerFec.FEC_4_5;
|
||||
/**
|
||||
* 4/15 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_4_15 = Constants.FrontendInnerFec.FEC_4_15;
|
||||
/**
|
||||
* 5/6 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_5_6 = Constants.FrontendInnerFec.FEC_5_6;
|
||||
/**
|
||||
* 5/9 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_5_9 = Constants.FrontendInnerFec.FEC_5_9;
|
||||
/**
|
||||
* 6/7 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_6_7 = Constants.FrontendInnerFec.FEC_6_7;
|
||||
/**
|
||||
* 7/8 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_7_8 = Constants.FrontendInnerFec.FEC_7_8;
|
||||
/**
|
||||
* 7/9 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_7_9 = Constants.FrontendInnerFec.FEC_7_9;
|
||||
/**
|
||||
* 7/15 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_7_15 = Constants.FrontendInnerFec.FEC_7_15;
|
||||
/**
|
||||
* 8/9 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_8_9 = Constants.FrontendInnerFec.FEC_8_9;
|
||||
/**
|
||||
* 8/15 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_8_15 = Constants.FrontendInnerFec.FEC_8_15;
|
||||
/**
|
||||
* 9/10 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_9_10 = Constants.FrontendInnerFec.FEC_9_10;
|
||||
/**
|
||||
* 9/20 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_9_20 = Constants.FrontendInnerFec.FEC_9_20;
|
||||
/**
|
||||
* 11/15 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_11_15 = Constants.FrontendInnerFec.FEC_11_15;
|
||||
/**
|
||||
* 11/20 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_11_20 = Constants.FrontendInnerFec.FEC_11_20;
|
||||
/**
|
||||
* 11/45 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_11_45 = Constants.FrontendInnerFec.FEC_11_45;
|
||||
/**
|
||||
* 13/18 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_13_18 = Constants.FrontendInnerFec.FEC_13_18;
|
||||
/**
|
||||
* 13/45 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_13_45 = Constants.FrontendInnerFec.FEC_13_45;
|
||||
/**
|
||||
* 14/45 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_14_45 = Constants.FrontendInnerFec.FEC_14_45;
|
||||
/**
|
||||
* 23/36 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_23_36 = Constants.FrontendInnerFec.FEC_23_36;
|
||||
/**
|
||||
* 25/36 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_25_36 = Constants.FrontendInnerFec.FEC_25_36;
|
||||
/**
|
||||
* 26/45 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_26_45 = Constants.FrontendInnerFec.FEC_26_45;
|
||||
/**
|
||||
* 28/45 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_28_45 = Constants.FrontendInnerFec.FEC_28_45;
|
||||
/**
|
||||
* 29/45 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_29_45 = Constants.FrontendInnerFec.FEC_29_45;
|
||||
/**
|
||||
* 31/45 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_31_45 = Constants.FrontendInnerFec.FEC_31_45;
|
||||
/**
|
||||
* 32/45 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_32_45 = Constants.FrontendInnerFec.FEC_32_45;
|
||||
/**
|
||||
* 77/90 conv. code rate
|
||||
* @hide
|
||||
*/
|
||||
public static final long FEC_77_90 = Constants.FrontendInnerFec.FEC_77_90;
|
||||
|
||||
|
||||
/** @hide */
|
||||
@IntDef(value = {
|
||||
DvbcFrontendSettings.MODULATION_UNDEFINED,
|
||||
DvbcFrontendSettings.MODULATION_AUTO,
|
||||
DvbcFrontendSettings.MODULATION_MOD_16QAM,
|
||||
DvbcFrontendSettings.MODULATION_MOD_32QAM,
|
||||
DvbcFrontendSettings.MODULATION_MOD_64QAM,
|
||||
DvbcFrontendSettings.MODULATION_MOD_128QAM,
|
||||
DvbcFrontendSettings.MODULATION_MOD_256QAM,
|
||||
DvbsFrontendSettings.MODULATION_UNDEFINED,
|
||||
DvbsFrontendSettings.MODULATION_AUTO,
|
||||
DvbsFrontendSettings.MODULATION_MOD_QPSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_8PSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_16QAM,
|
||||
DvbsFrontendSettings.MODULATION_MOD_16PSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_32PSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_ACM,
|
||||
DvbsFrontendSettings.MODULATION_MOD_8APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_16APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_32APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_64APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_128APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_256APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_RESERVED,
|
||||
IsdbsFrontendSettings.MODULATION_UNDEFINED,
|
||||
IsdbsFrontendSettings.MODULATION_AUTO,
|
||||
IsdbsFrontendSettings.MODULATION_MOD_BPSK,
|
||||
IsdbsFrontendSettings.MODULATION_MOD_QPSK,
|
||||
IsdbsFrontendSettings.MODULATION_MOD_TC8PSK,
|
||||
Isdbs3FrontendSettings.MODULATION_UNDEFINED,
|
||||
Isdbs3FrontendSettings.MODULATION_AUTO,
|
||||
Isdbs3FrontendSettings.MODULATION_MOD_BPSK,
|
||||
Isdbs3FrontendSettings.MODULATION_MOD_QPSK,
|
||||
Isdbs3FrontendSettings.MODULATION_MOD_8PSK,
|
||||
Isdbs3FrontendSettings.MODULATION_MOD_16APSK,
|
||||
Isdbs3FrontendSettings.MODULATION_MOD_32APSK,
|
||||
IsdbtFrontendSettings.MODULATION_UNDEFINED,
|
||||
IsdbtFrontendSettings.MODULATION_AUTO,
|
||||
IsdbtFrontendSettings.MODULATION_MOD_DQPSK,
|
||||
IsdbtFrontendSettings.MODULATION_MOD_QPSK,
|
||||
IsdbtFrontendSettings.MODULATION_MOD_16QAM,
|
||||
IsdbtFrontendSettings.MODULATION_MOD_64QAM})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface FrontendModulation {}
|
||||
|
||||
|
||||
/** @hide */
|
||||
@IntDef({RESULT_SUCCESS, RESULT_UNAVAILABLE, RESULT_NOT_INITIALIZED, RESULT_INVALID_STATE,
|
||||
RESULT_INVALID_ARGUMENT, RESULT_OUT_OF_MEMORY, RESULT_UNKNOWN_ERROR})
|
||||
|
||||
@@ -22,8 +22,6 @@ import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.Context;
|
||||
import android.hardware.tv.tuner.V1_0.Constants;
|
||||
import android.media.tv.tuner.TunerConstants;
|
||||
import android.media.tv.tuner.TunerConstants.ScIndexType;
|
||||
import android.media.tv.tuner.TunerUtils;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -112,29 +110,130 @@ public class RecordSettings extends Settings {
|
||||
*/
|
||||
public static final int TS_INDEX_ADAPTATION_EXTENSION_FLAG =
|
||||
Constants.DemuxTsIndex.ADAPTATION_EXTENSION_FLAG;
|
||||
|
||||
/** @hide */
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef(prefix = "INDEX_TYPE_", value =
|
||||
{INDEX_TYPE_NONE, INDEX_TYPE_SC, INDEX_TYPE_SC_HEVC})
|
||||
public @interface ScIndexType {}
|
||||
|
||||
/**
|
||||
* Start Code Index is not used.
|
||||
*/
|
||||
public static final int INDEX_TYPE_NONE = Constants.DemuxRecordScIndexType.NONE;
|
||||
/**
|
||||
* Start Code index.
|
||||
*/
|
||||
public static final int INDEX_TYPE_SC = Constants.DemuxRecordScIndexType.SC;
|
||||
/**
|
||||
* Start Code index for HEVC.
|
||||
*/
|
||||
public static final int INDEX_TYPE_SC_HEVC = Constants.DemuxRecordScIndexType.SC_HEVC;
|
||||
|
||||
/**
|
||||
* Indexes can be tagged by Start Code in PES (Packetized Elementary Stream)
|
||||
* 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})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface ScIndex {}
|
||||
|
||||
/**
|
||||
* SC index for a new I-frame.
|
||||
*/
|
||||
public static final int SC_INDEX_I_FRAME = Constants.DemuxScIndex.I_FRAME;
|
||||
/**
|
||||
* SC index for a new P-frame.
|
||||
*/
|
||||
public static final int SC_INDEX_P_FRAME = Constants.DemuxScIndex.P_FRAME;
|
||||
/**
|
||||
* SC index for a new B-frame.
|
||||
*/
|
||||
public static final int SC_INDEX_B_FRAME = Constants.DemuxScIndex.B_FRAME;
|
||||
/**
|
||||
* SC index for a new sequence.
|
||||
*/
|
||||
public static final int SC_INDEX_SEQUENCE = Constants.DemuxScIndex.SEQUENCE;
|
||||
|
||||
|
||||
/**
|
||||
* Indexes can be tagged by NAL unit group in HEVC according to ISO/IEC 23008-2.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@IntDef(flag = true,
|
||||
value = {SC_HEVC_INDEX_SPS, SC_HEVC_INDEX_AUD, SC_HEVC_INDEX_SLICE_CE_BLA_W_LP,
|
||||
SC_HEVC_INDEX_SLICE_BLA_W_RADL, SC_HEVC_INDEX_SLICE_BLA_N_LP,
|
||||
SC_HEVC_INDEX_SLICE_IDR_W_RADL, SC_HEVC_INDEX_SLICE_IDR_N_LP,
|
||||
SC_HEVC_INDEX_SLICE_TRAIL_CRA})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface ScHevcIndex {}
|
||||
|
||||
/**
|
||||
* SC HEVC index SPS.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SPS = Constants.DemuxScHevcIndex.SPS;
|
||||
/**
|
||||
* SC HEVC index AUD.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_AUD = Constants.DemuxScHevcIndex.AUD;
|
||||
/**
|
||||
* SC HEVC index SLICE_CE_BLA_W_LP.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_CE_BLA_W_LP =
|
||||
Constants.DemuxScHevcIndex.SLICE_CE_BLA_W_LP;
|
||||
/**
|
||||
* SC HEVC index SLICE_BLA_W_RADL.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_BLA_W_RADL =
|
||||
Constants.DemuxScHevcIndex.SLICE_BLA_W_RADL;
|
||||
/**
|
||||
* SC HEVC index SLICE_BLA_N_LP.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_BLA_N_LP =
|
||||
Constants.DemuxScHevcIndex.SLICE_BLA_N_LP;
|
||||
/**
|
||||
* SC HEVC index SLICE_IDR_W_RADL.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_IDR_W_RADL =
|
||||
Constants.DemuxScHevcIndex.SLICE_IDR_W_RADL;
|
||||
/**
|
||||
* SC HEVC index SLICE_IDR_N_LP.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_IDR_N_LP =
|
||||
Constants.DemuxScHevcIndex.SLICE_IDR_N_LP;
|
||||
/**
|
||||
* SC HEVC index SLICE_TRAIL_CRA.
|
||||
*/
|
||||
public static final int SC_HEVC_INDEX_SLICE_TRAIL_CRA =
|
||||
Constants.DemuxScHevcIndex.SLICE_TRAIL_CRA;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@IntDef(flag = true,
|
||||
prefix = "SC_",
|
||||
value = {
|
||||
TunerConstants.SC_INDEX_I_FRAME,
|
||||
TunerConstants.SC_INDEX_P_FRAME,
|
||||
TunerConstants.SC_INDEX_B_FRAME,
|
||||
TunerConstants.SC_INDEX_SEQUENCE,
|
||||
TunerConstants.SC_HEVC_INDEX_SPS,
|
||||
TunerConstants.SC_HEVC_INDEX_AUD,
|
||||
TunerConstants.SC_HEVC_INDEX_SLICE_CE_BLA_W_LP,
|
||||
TunerConstants.SC_HEVC_INDEX_SLICE_BLA_W_RADL,
|
||||
TunerConstants.SC_HEVC_INDEX_SLICE_BLA_N_LP,
|
||||
TunerConstants.SC_HEVC_INDEX_SLICE_IDR_W_RADL,
|
||||
TunerConstants.SC_HEVC_INDEX_SLICE_IDR_N_LP,
|
||||
TunerConstants.SC_HEVC_INDEX_SLICE_TRAIL_CRA,
|
||||
SC_INDEX_I_FRAME,
|
||||
SC_INDEX_P_FRAME,
|
||||
SC_INDEX_B_FRAME,
|
||||
SC_INDEX_SEQUENCE,
|
||||
SC_HEVC_INDEX_SPS,
|
||||
SC_HEVC_INDEX_AUD,
|
||||
SC_HEVC_INDEX_SLICE_CE_BLA_W_LP,
|
||||
SC_HEVC_INDEX_SLICE_BLA_W_RADL,
|
||||
SC_HEVC_INDEX_SLICE_BLA_N_LP,
|
||||
SC_HEVC_INDEX_SLICE_IDR_W_RADL,
|
||||
SC_HEVC_INDEX_SLICE_IDR_N_LP,
|
||||
SC_HEVC_INDEX_SLICE_TRAIL_CRA,
|
||||
})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface ScIndexMask {}
|
||||
|
||||
|
||||
|
||||
private final int mTsIndexMask;
|
||||
private final int mScIndexType;
|
||||
private final int mScIndexMask;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package android.media.tv.tuner.frontend;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.media.tv.tuner.TunerConstants.FrontendInnerFec;
|
||||
|
||||
/**
|
||||
* DVBC Capabilities.
|
||||
@@ -46,7 +45,7 @@ public class DvbcFrontendCapabilities extends FrontendCapabilities {
|
||||
/**
|
||||
* Gets inner FEC capability.
|
||||
*/
|
||||
@FrontendInnerFec
|
||||
@FrontendSettings.InnerFec
|
||||
public int getFecCapability() {
|
||||
return mFecCap;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.Context;
|
||||
import android.hardware.tv.tuner.V1_0.Constants;
|
||||
import android.media.tv.tuner.TunerConstants.FrontendInnerFec;
|
||||
import android.media.tv.tuner.TunerUtils;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -172,7 +171,7 @@ public class DvbcFrontendSettings extends FrontendSettings {
|
||||
/**
|
||||
* Gets Inner Forward Error Correction.
|
||||
*/
|
||||
@FrontendInnerFec
|
||||
@InnerFec
|
||||
public long getFec() {
|
||||
return mFec;
|
||||
}
|
||||
@@ -242,7 +241,7 @@ public class DvbcFrontendSettings extends FrontendSettings {
|
||||
* Sets Inner Forward Error Correction.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setFec(@FrontendInnerFec long fec) {
|
||||
public Builder setFec(@InnerFec long fec) {
|
||||
mFec = fec;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import android.annotation.NonNull;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.Context;
|
||||
import android.media.tv.tuner.TunerConstants.FrontendInnerFec;
|
||||
import android.media.tv.tuner.TunerUtils;
|
||||
|
||||
/**
|
||||
@@ -45,7 +44,7 @@ public class DvbsCodeRate {
|
||||
/**
|
||||
* Gets inner FEC.
|
||||
*/
|
||||
@FrontendInnerFec
|
||||
@FrontendSettings.InnerFec
|
||||
public long getInnerFec() {
|
||||
return mInnerFec;
|
||||
}
|
||||
@@ -96,7 +95,7 @@ public class DvbsCodeRate {
|
||||
* Sets inner FEC.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setInnerFec(@FrontendInnerFec long fec) {
|
||||
public Builder setInnerFec(@FrontendSettings.InnerFec long fec) {
|
||||
mFec = fec;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package android.media.tv.tuner.frontend;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.media.tv.tuner.TunerConstants.FrontendInnerFec;
|
||||
|
||||
/**
|
||||
* DVBS Capabilities.
|
||||
@@ -46,7 +45,7 @@ public class DvbsFrontendCapabilities extends FrontendCapabilities {
|
||||
/**
|
||||
* Gets inner FEC capability.
|
||||
*/
|
||||
@FrontendInnerFec
|
||||
@FrontendSettings.InnerFec
|
||||
public long getInnerFecCapability() {
|
||||
return mInnerFecCap;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package android.media.tv.tuner.frontend;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.media.tv.tuner.frontend.DvbtFrontendSettings.CodeRate;
|
||||
|
||||
/**
|
||||
* DVBT Capabilities.
|
||||
@@ -72,7 +71,7 @@ public class DvbtFrontendCapabilities extends FrontendCapabilities {
|
||||
/**
|
||||
* Gets code rate capability.
|
||||
*/
|
||||
@CodeRate
|
||||
@DvbtFrontendSettings.CodeRate
|
||||
public int getCodeRateCapability() {
|
||||
return mCodeRateCap;
|
||||
}
|
||||
|
||||
@@ -350,8 +350,7 @@ public class DvbtFrontendSettings extends FrontendSettings {
|
||||
public static final int STANDARD_T2 = Constants.FrontendDvbtStandard.T2;
|
||||
|
||||
/** @hide */
|
||||
@IntDef(flag = true,
|
||||
prefix = "PLP_MODE_",
|
||||
@IntDef(prefix = "PLP_MODE_",
|
||||
value = {PLP_MODE_UNDEFINED, PLP_MODE_AUTO, PLP_MODE_MANUAL})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface PlpMode {}
|
||||
|
||||
@@ -18,6 +18,7 @@ package android.media.tv.tuner.frontend;
|
||||
|
||||
import android.annotation.IntDef;
|
||||
import android.annotation.IntRange;
|
||||
import android.annotation.LongDef;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
import android.hardware.tv.tuner.V1_0.Constants;
|
||||
@@ -33,8 +34,9 @@ import java.lang.annotation.RetentionPolicy;
|
||||
@SystemApi
|
||||
public abstract class FrontendSettings {
|
||||
/** @hide */
|
||||
@IntDef({TYPE_UNDEFINED, TYPE_ANALOG, TYPE_ATSC, TYPE_ATSC3, TYPE_DVBC, TYPE_DVBS, TYPE_DVBT,
|
||||
TYPE_ISDBS, TYPE_ISDBS3, TYPE_ISDBT})
|
||||
@IntDef(prefix = "TYPE_",
|
||||
value = {TYPE_UNDEFINED, TYPE_ANALOG, TYPE_ATSC, TYPE_ATSC3, TYPE_DVBC, TYPE_DVBS,
|
||||
TYPE_DVBT, TYPE_ISDBS, TYPE_ISDBS3, TYPE_ISDBT})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Type {}
|
||||
|
||||
@@ -79,10 +81,173 @@ public abstract class FrontendSettings {
|
||||
*/
|
||||
public static final int TYPE_ISDBT = Constants.FrontendType.ISDBT;
|
||||
|
||||
private final int mFrequency;
|
||||
|
||||
|
||||
/** @hide */
|
||||
public FrontendSettings(int frequency) {
|
||||
@LongDef(flag = true,
|
||||
prefix = "FEC_",
|
||||
value = {FEC_UNDEFINED, FEC_AUTO, FEC_1_2, FEC_1_3, FEC_1_4, FEC_1_5, FEC_2_3, FEC_2_5,
|
||||
FEC_2_9, FEC_3_4, FEC_3_5, FEC_4_5, FEC_4_15, FEC_5_6, FEC_5_9, FEC_6_7, FEC_7_8,
|
||||
FEC_7_9, FEC_7_15, FEC_8_9, FEC_8_15, FEC_9_10, FEC_9_20, FEC_11_15, FEC_11_20,
|
||||
FEC_11_45, FEC_13_18, FEC_13_45, FEC_14_45, FEC_23_36, FEC_25_36, FEC_26_45, FEC_28_45,
|
||||
FEC_29_45, FEC_31_45, FEC_32_45, FEC_77_90})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface InnerFec {}
|
||||
|
||||
/**
|
||||
* FEC not defined.
|
||||
*/
|
||||
public static final long FEC_UNDEFINED = Constants.FrontendInnerFec.FEC_UNDEFINED;
|
||||
/**
|
||||
* hardware is able to detect and set FEC automatically.
|
||||
*/
|
||||
public static final long FEC_AUTO = Constants.FrontendInnerFec.AUTO;
|
||||
/**
|
||||
* 1/2 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_1_2 = Constants.FrontendInnerFec.FEC_1_2;
|
||||
/**
|
||||
* 1/3 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_1_3 = Constants.FrontendInnerFec.FEC_1_3;
|
||||
/**
|
||||
* 1/4 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_1_4 = Constants.FrontendInnerFec.FEC_1_4;
|
||||
/**
|
||||
* 1/5 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_1_5 = Constants.FrontendInnerFec.FEC_1_5;
|
||||
/**
|
||||
* 2/3 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_2_3 = Constants.FrontendInnerFec.FEC_2_3;
|
||||
/**
|
||||
* 2/5 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_2_5 = Constants.FrontendInnerFec.FEC_2_5;
|
||||
/**
|
||||
* 2/9 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_2_9 = Constants.FrontendInnerFec.FEC_2_9;
|
||||
/**
|
||||
* 3/4 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_3_4 = Constants.FrontendInnerFec.FEC_3_4;
|
||||
/**
|
||||
* 3/5 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_3_5 = Constants.FrontendInnerFec.FEC_3_5;
|
||||
/**
|
||||
* 4/5 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_4_5 = Constants.FrontendInnerFec.FEC_4_5;
|
||||
/**
|
||||
* 4/15 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_4_15 = Constants.FrontendInnerFec.FEC_4_15;
|
||||
/**
|
||||
* 5/6 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_5_6 = Constants.FrontendInnerFec.FEC_5_6;
|
||||
/**
|
||||
* 5/9 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_5_9 = Constants.FrontendInnerFec.FEC_5_9;
|
||||
/**
|
||||
* 6/7 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_6_7 = Constants.FrontendInnerFec.FEC_6_7;
|
||||
/**
|
||||
* 7/8 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_7_8 = Constants.FrontendInnerFec.FEC_7_8;
|
||||
/**
|
||||
* 7/9 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_7_9 = Constants.FrontendInnerFec.FEC_7_9;
|
||||
/**
|
||||
* 7/15 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_7_15 = Constants.FrontendInnerFec.FEC_7_15;
|
||||
/**
|
||||
* 8/9 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_8_9 = Constants.FrontendInnerFec.FEC_8_9;
|
||||
/**
|
||||
* 8/15 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_8_15 = Constants.FrontendInnerFec.FEC_8_15;
|
||||
/**
|
||||
* 9/10 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_9_10 = Constants.FrontendInnerFec.FEC_9_10;
|
||||
/**
|
||||
* 9/20 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_9_20 = Constants.FrontendInnerFec.FEC_9_20;
|
||||
/**
|
||||
* 11/15 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_11_15 = Constants.FrontendInnerFec.FEC_11_15;
|
||||
/**
|
||||
* 11/20 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_11_20 = Constants.FrontendInnerFec.FEC_11_20;
|
||||
/**
|
||||
* 11/45 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_11_45 = Constants.FrontendInnerFec.FEC_11_45;
|
||||
/**
|
||||
* 13/18 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_13_18 = Constants.FrontendInnerFec.FEC_13_18;
|
||||
/**
|
||||
* 13/45 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_13_45 = Constants.FrontendInnerFec.FEC_13_45;
|
||||
/**
|
||||
* 14/45 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_14_45 = Constants.FrontendInnerFec.FEC_14_45;
|
||||
/**
|
||||
* 23/36 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_23_36 = Constants.FrontendInnerFec.FEC_23_36;
|
||||
/**
|
||||
* 25/36 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_25_36 = Constants.FrontendInnerFec.FEC_25_36;
|
||||
/**
|
||||
* 26/45 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_26_45 = Constants.FrontendInnerFec.FEC_26_45;
|
||||
/**
|
||||
* 28/45 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_28_45 = Constants.FrontendInnerFec.FEC_28_45;
|
||||
/**
|
||||
* 29/45 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_29_45 = Constants.FrontendInnerFec.FEC_29_45;
|
||||
/**
|
||||
* 31/45 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_31_45 = Constants.FrontendInnerFec.FEC_31_45;
|
||||
/**
|
||||
* 32/45 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_32_45 = Constants.FrontendInnerFec.FEC_32_45;
|
||||
/**
|
||||
* 77/90 conv. code rate.
|
||||
*/
|
||||
public static final long FEC_77_90 = Constants.FrontendInnerFec.FEC_77_90;
|
||||
|
||||
|
||||
|
||||
private final int mFrequency;
|
||||
|
||||
FrontendSettings(int frequency) {
|
||||
mFrequency = frequency;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
import android.hardware.tv.tuner.V1_0.Constants;
|
||||
import android.media.tv.tuner.Lnb;
|
||||
import android.media.tv.tuner.TunerConstants.FrontendInnerFec;
|
||||
import android.media.tv.tuner.TunerConstants.FrontendModulation;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -162,6 +160,52 @@ public class FrontendStatus {
|
||||
Constants.FrontendStatusType.ATSC3_PLP_INFO;
|
||||
|
||||
|
||||
/** @hide */
|
||||
@IntDef(value = {
|
||||
DvbcFrontendSettings.MODULATION_UNDEFINED,
|
||||
DvbcFrontendSettings.MODULATION_AUTO,
|
||||
DvbcFrontendSettings.MODULATION_MOD_16QAM,
|
||||
DvbcFrontendSettings.MODULATION_MOD_32QAM,
|
||||
DvbcFrontendSettings.MODULATION_MOD_64QAM,
|
||||
DvbcFrontendSettings.MODULATION_MOD_128QAM,
|
||||
DvbcFrontendSettings.MODULATION_MOD_256QAM,
|
||||
DvbsFrontendSettings.MODULATION_UNDEFINED,
|
||||
DvbsFrontendSettings.MODULATION_AUTO,
|
||||
DvbsFrontendSettings.MODULATION_MOD_QPSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_8PSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_16QAM,
|
||||
DvbsFrontendSettings.MODULATION_MOD_16PSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_32PSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_ACM,
|
||||
DvbsFrontendSettings.MODULATION_MOD_8APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_16APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_32APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_64APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_128APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_256APSK,
|
||||
DvbsFrontendSettings.MODULATION_MOD_RESERVED,
|
||||
IsdbsFrontendSettings.MODULATION_UNDEFINED,
|
||||
IsdbsFrontendSettings.MODULATION_AUTO,
|
||||
IsdbsFrontendSettings.MODULATION_MOD_BPSK,
|
||||
IsdbsFrontendSettings.MODULATION_MOD_QPSK,
|
||||
IsdbsFrontendSettings.MODULATION_MOD_TC8PSK,
|
||||
Isdbs3FrontendSettings.MODULATION_UNDEFINED,
|
||||
Isdbs3FrontendSettings.MODULATION_AUTO,
|
||||
Isdbs3FrontendSettings.MODULATION_MOD_BPSK,
|
||||
Isdbs3FrontendSettings.MODULATION_MOD_QPSK,
|
||||
Isdbs3FrontendSettings.MODULATION_MOD_8PSK,
|
||||
Isdbs3FrontendSettings.MODULATION_MOD_16APSK,
|
||||
Isdbs3FrontendSettings.MODULATION_MOD_32APSK,
|
||||
IsdbtFrontendSettings.MODULATION_UNDEFINED,
|
||||
IsdbtFrontendSettings.MODULATION_AUTO,
|
||||
IsdbtFrontendSettings.MODULATION_MOD_DQPSK,
|
||||
IsdbtFrontendSettings.MODULATION_MOD_QPSK,
|
||||
IsdbtFrontendSettings.MODULATION_MOD_16QAM,
|
||||
IsdbtFrontendSettings.MODULATION_MOD_64QAM})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface FrontendModulation {}
|
||||
|
||||
|
||||
private Boolean mIsDemodLocked;
|
||||
private Integer mSnr;
|
||||
private Integer mBer;
|
||||
@@ -275,7 +319,7 @@ public class FrontendStatus {
|
||||
* Gets Inner Forward Error Correction type as specified in ETSI EN 300 468 V1.15.1
|
||||
* and ETSI EN 302 307-2 V1.1.1.
|
||||
*/
|
||||
@FrontendInnerFec
|
||||
@FrontendSettings.InnerFec
|
||||
public long getFec() {
|
||||
if (mInnerFec == null) {
|
||||
throw new IllegalStateException();
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package android.media.tv.tuner.frontend;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.media.tv.tuner.frontend.Isdbs3FrontendSettings.CodeRate;
|
||||
|
||||
/**
|
||||
* ISDBS-3 Capabilities.
|
||||
@@ -44,7 +43,7 @@ public class Isdbs3FrontendCapabilities extends FrontendCapabilities {
|
||||
/**
|
||||
* Gets code rate capability.
|
||||
*/
|
||||
@CodeRate
|
||||
@Isdbs3FrontendSettings.CodeRate
|
||||
public int getCodeRateCapability() {
|
||||
return mCodeRateCap;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package android.media.tv.tuner.frontend;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.media.tv.tuner.frontend.IsdbsFrontendSettings.CodeRate;
|
||||
|
||||
/**
|
||||
* ISDBS Capabilities.
|
||||
@@ -44,7 +43,7 @@ public class IsdbsFrontendCapabilities extends FrontendCapabilities {
|
||||
/**
|
||||
* Gets code rate capability.
|
||||
*/
|
||||
@CodeRate
|
||||
@IsdbsFrontendSettings.CodeRate
|
||||
public int getCodeRateCapability() {
|
||||
return mCodeRateCap;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public class IsdbsFrontendSettings extends FrontendSettings {
|
||||
/**
|
||||
* Rolloff type undefined.
|
||||
*/
|
||||
public static final int ROLLOFF_UNDEFINED = Constants.FrontendIsdbs3Rolloff.UNDEFINED;
|
||||
public static final int ROLLOFF_UNDEFINED = Constants.FrontendIsdbsRolloff.UNDEFINED;
|
||||
/**
|
||||
* 0,35 rolloff.
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package android.media.tv.tuner.frontend;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.media.tv.tuner.frontend.DvbtFrontendSettings.CodeRate;
|
||||
|
||||
/**
|
||||
* ISDBT Capabilities.
|
||||
@@ -65,7 +64,7 @@ public class IsdbtFrontendCapabilities extends FrontendCapabilities {
|
||||
/**
|
||||
* Gets code rate capability.
|
||||
*/
|
||||
@CodeRate
|
||||
@DvbtFrontendSettings.CodeRate
|
||||
public int getCodeRateCapability() {
|
||||
return mCodeRateCap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user