blob: 9bb52bd06c5436c51e901305492dfd11d177048d [file] [log] [blame]
/*
* Copyright 2022, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef CODEC2_COMMON_UTILS_H_
#define CODEC2_COMMON_UTILS_H_
#include <android/hardware_buffer.h>
namespace android {
bool isAtLeastT();
bool isAtLeastU();
bool isVendorApiOrFirstApiAtLeastT();
/**
* Check if a given pixel format is supported.
* enums listed in android_pixel_format_t, android_pixel_format_v1_1_t
* and so on can be passed as these enums have an equivalent definition in
* AHardwareBuffer_Format as well.
*/
bool isHalPixelFormatSupported(AHardwareBuffer_Format format);
} // namespace android
#endif // CODEC2_COMMON_UTILS_H_