• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 //#define LOG_NDEBUG 0
6 #define LOG_TAG "VideoTypes"
7 
8 #include <v4l2_codec2/common/VideoTypes.h>
9 
10 #include <log/log.h>
11 
12 namespace android {
13 
VideoCodecToString(VideoCodec codec)14 const char* VideoCodecToString(VideoCodec codec) {
15     switch (codec) {
16     case VideoCodec::H264:
17         return "H264";
18     case VideoCodec::VP8:
19         return "VP8";
20     case VideoCodec::VP9:
21         return "VP9";
22     }
23 }
24 
HalPixelFormatToString(HalPixelFormat format)25 const char* HalPixelFormatToString(HalPixelFormat format) {
26     switch (format) {
27     case HalPixelFormat::UNKNOWN:
28         return "Unknown";
29     case HalPixelFormat::YCBCR_420_888:
30         return "YCBCR_420_888";
31     case HalPixelFormat::YV12:
32         return "YV12";
33     case HalPixelFormat::NV12:
34         return "NV12";
35     }
36 }
37 
38 }  // namespace android
39