1 /*
2  * Copyright 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.media.tv.tuner.frontend;
18 
19 import android.annotation.SystemApi;
20 
21 /**
22  * ATSC-3 Capabilities.
23  *
24  * @hide
25  */
26 @SystemApi
27 public class Atsc3FrontendCapabilities extends FrontendCapabilities {
28     private final int mBandwidthCap;
29     private final int mModulationCap;
30     private final int mTimeInterleaveModeCap;
31     private final int mCodeRateCap;
32     private final int mFecCap;
33     private final int mDemodOutputFormatCap;
34 
Atsc3FrontendCapabilities(int bandwidthCap, int modulationCap, int timeInterleaveModeCap, int codeRateCap, int fecCap, int demodOutputFormatCap)35     private Atsc3FrontendCapabilities(int bandwidthCap, int modulationCap,
36             int timeInterleaveModeCap, int codeRateCap, int fecCap, int demodOutputFormatCap) {
37         mBandwidthCap = bandwidthCap;
38         mModulationCap = modulationCap;
39         mTimeInterleaveModeCap = timeInterleaveModeCap;
40         mCodeRateCap = codeRateCap;
41         mFecCap = fecCap;
42         mDemodOutputFormatCap = demodOutputFormatCap;
43     }
44 
45     /**
46      * Gets bandwidth capability.
47      */
48     @Atsc3FrontendSettings.Bandwidth
getBandwidthCapability()49     public int getBandwidthCapability() {
50         return mBandwidthCap;
51     }
52     /**
53      * Gets modulation capability.
54      */
55     @Atsc3FrontendSettings.Modulation
getModulationCapability()56     public int getModulationCapability() {
57         return mModulationCap;
58     }
59     /**
60      * Gets time interleave mod capability.
61      */
62     @Atsc3FrontendSettings.TimeInterleaveMode
getTimeInterleaveModeCapability()63     public int getTimeInterleaveModeCapability() {
64         return mTimeInterleaveModeCap;
65     }
66     /**
67      * Gets code rate capability.
68      */
69     @Atsc3FrontendSettings.CodeRate
getPlpCodeRateCapability()70     public int getPlpCodeRateCapability() {
71         return mCodeRateCap;
72     }
73     /**
74      * Gets FEC capability.
75      */
76     @Atsc3FrontendSettings.Fec
getFecCapability()77     public int getFecCapability() {
78         return mFecCap;
79     }
80     /**
81      * Gets demodulator output format capability.
82      */
83     @Atsc3FrontendSettings.DemodOutputFormat
getDemodOutputFormatCapability()84     public int getDemodOutputFormatCapability() {
85         return mDemodOutputFormatCap;
86     }
87 }
88