Index: media/base/video_decoder_config.cc |
diff --git a/media/base/video_decoder_config.cc b/media/base/video_decoder_config.cc |
index 84058e496dbf9dd7af09b4af5647688e9a47739d..1cf657345593106e32f6f0f0618edd0219af10fa 100644 |
--- a/media/base/video_decoder_config.cc |
+++ b/media/base/video_decoder_config.cc |
@@ -140,4 +140,43 @@ std::string VideoDecoderConfig::GetHumanReadableCodecName() const { |
return ""; |
} |
+// static |
+std::string VideoDecoderConfig::GetHumanReadableProfile( |
+ VideoCodecProfile profile) { |
+ // Keep this switch() in sync with VideoCodecProfile definition in |
+ // media/base/video_codecs.h |
xhwang
2015/12/07 22:14:15
If you move this to media/base/video_codecs.h then
Tima Vaisburd
2015/12/08 02:12:24
Done.
|
+ switch (profile) { |
+ case VIDEO_CODEC_PROFILE_UNKNOWN: |
+ return "unknown"; |
+ case H264PROFILE_BASELINE: |
+ return "h264 baseline"; |
+ case H264PROFILE_MAIN: |
+ return "h264 main"; |
+ case H264PROFILE_EXTENDED: |
+ return "h264 extended"; |
+ case H264PROFILE_HIGH: |
+ return "h264 high"; |
+ case H264PROFILE_HIGH10PROFILE: |
+ return "h264 high 10"; |
+ case H264PROFILE_HIGH422PROFILE: |
+ return "h264 high 4:2:2"; |
+ case H264PROFILE_HIGH444PREDICTIVEPROFILE: |
+ return "h264 high 4:4:4 predictive"; |
+ case H264PROFILE_SCALABLEBASELINE: |
+ return "h264 scalable baseline"; |
+ case H264PROFILE_SCALABLEHIGH: |
+ return "h264 scalable high"; |
+ case H264PROFILE_STEREOHIGH: |
+ return "h264 stereo high"; |
+ case H264PROFILE_MULTIVIEWHIGH: |
+ return "h264 multiview high"; |
+ case VP8PROFILE_ANY: |
+ return "vp8 profile"; |
xhwang
2015/12/07 22:14:15
"profile" seems redundant.
Tima Vaisburd
2015/12/08 02:12:24
Done.
|
+ case VP9PROFILE_ANY: |
+ return "vp9 profile"; |
xhwang
2015/12/07 22:14:15
ditto
Tima Vaisburd
2015/12/08 02:12:24
Done.
|
+ } |
+ NOTREACHED(); |
+ return ""; |
+} |
+ |
} // namespace media |