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 kH264SecureDecoder; 22 static const std::string kVP8SecureDecoder; 23 static const std::string kVP9SecureDecoder; 24 25 // Return true if |name| is a valid component name. 26 static bool isValid(const char* name); 27 28 // Return true if |name| is a encoder name. 29 // Note that |name| should be a valid component name. 30 static bool isEncoder(const char* name); 31 }; 32 33 } // namespace android 34 35 #endif // ANDROID_V4L2_CODEC2_COMMON_V4L2_COMPONENT_COMMON_H 36