1 // Copyright 2020 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef ANDROID_V4L2_CODEC2_COMMON_V4L2_COMPONENT_COMMON_H 6 #define ANDROID_V4L2_CODEC2_COMMON_V4L2_COMPONENT_COMMON_H 7 8 #include <string> 9 10 namespace android { 11 12 // Defines the names of all supported components. 13 struct V4L2ComponentName { 14 static const std::string kH264Encoder; 15 static const std::string kVP8Encoder; 16 static const std::string kVP9Encoder; 17 18 static const std::string kH264Decoder; 19 static const std::string kVP8Decoder; 20 static const std::string kVP9Decoder; 21 static const std::string kHEVCDecoder; 22 static const std::string kH264SecureDecoder; 23 static const std::string kVP8SecureDecoder; 24 static const std::string kVP9SecureDecoder; 25 static const std::string kHEVCSecureDecoder; 26 27 // Return true if |name| is a valid component name. 28 static bool isValid(const char* name); 29 30 // Return true if |name| is a encoder name. 31 // Note that |name| should be a valid component name. 32 static bool isEncoder(const char* name); 33 }; 34 35 } // namespace android 36 37 #endif // ANDROID_V4L2_CODEC2_COMMON_V4L2_COMPONENT_COMMON_H 38