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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "media/base/video_frame.h" | 8 #include "media/base/video_frame.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 return s.str(); | 120 return s.str(); |
121 } | 121 } |
122 | 122 |
123 // The names come from src/third_party/ffmpeg/libavcodec/codec_desc.c | 123 // The names come from src/third_party/ffmpeg/libavcodec/codec_desc.c |
124 std::string VideoDecoderConfig::GetHumanReadableCodecName() const { | 124 std::string VideoDecoderConfig::GetHumanReadableCodecName() const { |
125 switch (codec()) { | 125 switch (codec()) { |
126 case kUnknownVideoCodec: | 126 case kUnknownVideoCodec: |
127 return "unknown"; | 127 return "unknown"; |
128 case kCodecH264: | 128 case kCodecH264: |
129 return "h264"; | 129 return "h264"; |
| 130 case kCodecHEVC: |
| 131 return "hevc"; |
130 case kCodecVC1: | 132 case kCodecVC1: |
131 return "vc1"; | 133 return "vc1"; |
132 case kCodecMPEG2: | 134 case kCodecMPEG2: |
133 return "mpeg2video"; | 135 return "mpeg2video"; |
134 case kCodecMPEG4: | 136 case kCodecMPEG4: |
135 return "mpeg4"; | 137 return "mpeg4"; |
136 case kCodecTheora: | 138 case kCodecTheora: |
137 return "theora"; | 139 return "theora"; |
138 case kCodecVP8: | 140 case kCodecVP8: |
139 return "vp8"; | 141 return "vp8"; |
140 case kCodecVP9: | 142 case kCodecVP9: |
141 return "vp9"; | 143 return "vp9"; |
142 } | 144 } |
143 NOTREACHED(); | 145 NOTREACHED(); |
144 return ""; | 146 return ""; |
145 } | 147 } |
146 | 148 |
147 const uint8* VideoDecoderConfig::extra_data() const { | 149 const uint8* VideoDecoderConfig::extra_data() const { |
148 if (extra_data_.empty()) | 150 if (extra_data_.empty()) |
149 return NULL; | 151 return NULL; |
150 return &extra_data_[0]; | 152 return &extra_data_[0]; |
151 } | 153 } |
152 | 154 |
153 } // namespace media | 155 } // namespace media |
OLD | NEW |