1 /* 2 * Copyright (C) 2020 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; 18 19 import android.annotation.StringDef; 20 import android.os.Build; 21 22 import com.android.modules.annotation.MinSdk; 23 24 import java.lang.annotation.Retention; 25 import java.lang.annotation.RetentionPolicy; 26 27 /** 28 * MediaFeature defines various media features, e.g. hdr type. 29 */ 30 @MinSdk(Build.VERSION_CODES.S) 31 public final class MediaFeature { 32 /** 33 * Defines tye type of HDR(high dynamic range) video. 34 */ 35 public static final class HdrType { HdrType()36 private HdrType() { 37 } 38 39 /** 40 * HDR type for dolby-vision. 41 */ 42 public static final String DOLBY_VISION = "android.media.feature.hdr.dolby_vision"; 43 /** 44 * HDR type for hdr10. 45 */ 46 public static final String HDR10 = "android.media.feature.hdr.hdr10"; 47 /** 48 * HDR type for hdr10+. 49 */ 50 public static final String HDR10_PLUS = "android.media.feature.hdr.hdr10_plus"; 51 /** 52 * HDR type for hlg. 53 */ 54 public static final String HLG = "android.media.feature.hdr.hlg"; 55 } 56 57 /** @hide */ 58 @StringDef({ 59 HdrType.DOLBY_VISION, 60 HdrType.HDR10, 61 HdrType.HDR10_PLUS, 62 HdrType.HLG, 63 }) 64 @Retention(RetentionPolicy.SOURCE) 65 public @interface MediaHdrType { 66 } 67 } 68