• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 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 package android.media;
17 
18 import android.hardware.DataSpace;
19 
20 /**
21  * Package private utility class for PublicFormat related methods.
22  */
23 class PublicFormatUtils {
getHalFormat(int imageFormat)24     public static int getHalFormat(int imageFormat) {
25         return nativeGetHalFormat(imageFormat);
26     }
getHalDataspace(int imageFormat)27     public static int getHalDataspace(int imageFormat) {
28         return nativeGetHalDataspace(imageFormat);
29     }
getPublicFormat(int imageFormat, @DataSpace.NamedDataSpace int dataspace)30     public static int getPublicFormat(int imageFormat, @DataSpace.NamedDataSpace int dataspace) {
31         return nativeGetPublicFormat(imageFormat, dataspace);
32     }
nativeGetHalFormat(int imageFormat)33     private static native int nativeGetHalFormat(int imageFormat);
nativeGetHalDataspace(int imageFormat)34     private static native int nativeGetHalDataspace(int imageFormat);
nativeGetPublicFormat(int imageFormat, int dataspace)35     private static native int nativeGetPublicFormat(int imageFormat, int dataspace);
36 }
37