OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/base/video_decoder_config.h" | 5 #include "media/base/video_decoder_config.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "media/base/video_frame.h" | 10 #include "media/base/video_frame.h" |
11 | 11 |
12 namespace media { | 12 namespace media { |
13 | 13 |
14 VideoCodec VideoCodecProfileToVideoCodec(VideoCodecProfile profile) { | 14 VideoCodec VideoCodecProfileToVideoCodec(VideoCodecProfile profile) { |
15 switch (profile) { | 15 switch (profile) { |
16 case VIDEO_CODEC_PROFILE_UNKNOWN: | 16 case VIDEO_CODEC_PROFILE_UNKNOWN: |
17 return kUnknownVideoCodec; | 17 return kUnknownVideoCodec; |
18 case H264PROFILE_BASELINE: | 18 case H264PROFILE_BASELINE: |
19 case H264PROFILE_MAIN: | 19 case H264PROFILE_MAIN: |
20 case H264PROFILE_EXTENDED: | 20 case H264PROFILE_EXTENDED: |
21 case H264PROFILE_HIGH: | 21 case H264PROFILE_HIGH: |
22 case H264PROFILE_HIGH10PROFILE: | 22 case H264PROFILE_HIGH10PROFILE: |
23 case H264PROFILE_HIGH422PROFILE: | 23 case H264PROFILE_HIGH422PROFILE: |
24 case H264PROFILE_HIGH444PREDICTIVEPROFILE: | 24 case H264PROFILE_HIGH444PREDICTIVEPROFILE: |
25 case H264PROFILE_SCALABLEBASELINE: | 25 case H264PROFILE_SCALABLEBASELINE: |
26 case H264PROFILE_SCALABLEHIGH: | 26 case H264PROFILE_SCALABLEHIGH: |
27 case H264PROFILE_STEREOHIGH: | 27 case H264PROFILE_STEREOHIGH: |
28 case H264PROFILE_MULTIVIEWHIGH: | 28 case H264PROFILE_MULTIVIEWHIGH: |
29 return kCodecH264; | 29 return kCodecH264; |
| 30 case HEVCPROFILE_MAIN: |
| 31 case HEVCPROFILE_MAIN10: |
| 32 case HEVCPROFILE_MAIN_STILL_PICTURE: |
| 33 return kCodecHEVC; |
30 case VP8PROFILE_ANY: | 34 case VP8PROFILE_ANY: |
31 return kCodecVP8; | 35 return kCodecVP8; |
32 case VP9PROFILE_PROFILE0: | 36 case VP9PROFILE_PROFILE0: |
33 case VP9PROFILE_PROFILE1: | 37 case VP9PROFILE_PROFILE1: |
34 case VP9PROFILE_PROFILE2: | 38 case VP9PROFILE_PROFILE2: |
35 case VP9PROFILE_PROFILE3: | 39 case VP9PROFILE_PROFILE3: |
36 return kCodecVP9; | 40 return kCodecVP9; |
37 } | 41 } |
38 NOTREACHED(); | 42 NOTREACHED(); |
39 return kUnknownVideoCodec; | 43 return kUnknownVideoCodec; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 << " visible rect: [" << visible_rect().x() << "," << visible_rect().y() | 113 << " visible rect: [" << visible_rect().x() << "," << visible_rect().y() |
110 << "," << visible_rect().width() << "," << visible_rect().height() << "]" | 114 << "," << visible_rect().width() << "," << visible_rect().height() << "]" |
111 << " natural size: [" << natural_size().width() << "," | 115 << " natural size: [" << natural_size().width() << "," |
112 << natural_size().height() << "]" | 116 << natural_size().height() << "]" |
113 << " has extra data? " << (extra_data().empty() ? "false" : "true") | 117 << " has extra data? " << (extra_data().empty() ? "false" : "true") |
114 << " encrypted? " << (is_encrypted() ? "true" : "false"); | 118 << " encrypted? " << (is_encrypted() ? "true" : "false"); |
115 return s.str(); | 119 return s.str(); |
116 } | 120 } |
117 | 121 |
118 } // namespace media | 122 } // namespace media |
OLD | NEW |