1 /*
2  * Copyright (C) 2017 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 com.android.tv.tuner.features;
18 
19 import static com.android.tv.common.feature.FeatureUtils.OFF;
20 
21 import com.android.tv.common.feature.CommonFeatures;
22 import com.android.tv.common.feature.DeveloperPreferenceFeature;
23 import com.android.tv.common.feature.Feature;
24 import com.android.tv.common.feature.Model;
25 import com.android.tv.common.feature.Sdk;
26 
27 /**
28  * List of {@link Feature} for Tuner.
29  *
30  * <p>Only for use in Tuners.
31  *
32  * <p>Remove the {@code Feature} once it is launched.
33  */
34 public class TunerFeatures extends CommonFeatures {
35 
36     /**
37      * USE_SW_CODEC_FOR_SD
38      *
39      * <p>Prefer software based codec for SD channels.
40      */
41     public static final Feature USE_SW_CODEC_FOR_SD =
42             DeveloperPreferenceFeature.create(
43                     "use_sw_codec_for_sd",
44                     // On Nexus Player, SW codec is better than HW codec in terms of picture
45                     // quality.
46                     Model.NEXUS_PLAYER.isEnabled());
47 
48     /**
49      * Does the TvProvider on the installed device allow systems inserts to the programs table.
50      *
51      * <p>This is available in {@link Sdk#AT_LEAST_O} but vendors may choose to backport support to
52      * the TvProvider.
53      */
54     public static final Feature TVPROVIDER_ALLOWS_COLUMN_CREATION = Sdk.AT_LEAST_O;
55 
56     /** Enable Dvb parsers and listeners. */
57     public static final Feature ENABLE_FILE_DVB = OFF;
58 
TunerFeatures()59     private TunerFeatures() {}
60 }
61