OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/formats/webm/webm_video_client.h" | 5 #include "media/formats/webm/webm_video_client.h" |
6 | 6 |
7 #include "media/base/video_decoder_config.h" | 7 #include "media/base/video_decoder_config.h" |
8 #include "media/formats/webm/webm_constants.h" | 8 #include "media/formats/webm/webm_constants.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
(...skipping 26 matching lines...) Expand all Loading... |
37 VideoDecoderConfig* config) { | 37 VideoDecoderConfig* config) { |
38 DCHECK(config); | 38 DCHECK(config); |
39 | 39 |
40 VideoCodec video_codec = kUnknownVideoCodec; | 40 VideoCodec video_codec = kUnknownVideoCodec; |
41 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; | 41 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; |
42 if (codec_id == "V_VP8") { | 42 if (codec_id == "V_VP8") { |
43 video_codec = kCodecVP8; | 43 video_codec = kCodecVP8; |
44 profile = VP8PROFILE_ANY; | 44 profile = VP8PROFILE_ANY; |
45 } else if (codec_id == "V_VP9") { | 45 } else if (codec_id == "V_VP9") { |
46 video_codec = kCodecVP9; | 46 video_codec = kCodecVP9; |
47 profile = VP9PROFILE_ANY; | 47 // TODO(servolk): Find a way to read actual VP9 profile from WebM. |
| 48 // crbug.com/592074 |
| 49 profile = VP9PROFILE_PROFILE0; |
48 } else { | 50 } else { |
49 MEDIA_LOG(ERROR, media_log_) << "Unsupported video codec_id " << codec_id; | 51 MEDIA_LOG(ERROR, media_log_) << "Unsupported video codec_id " << codec_id; |
50 return false; | 52 return false; |
51 } | 53 } |
52 | 54 |
53 VideoPixelFormat format = | 55 VideoPixelFormat format = |
54 (alpha_mode_ == 1) ? PIXEL_FORMAT_YV12A : PIXEL_FORMAT_YV12; | 56 (alpha_mode_ == 1) ? PIXEL_FORMAT_YV12A : PIXEL_FORMAT_YV12; |
55 | 57 |
56 if (pixel_width_ <= 0 || pixel_height_ <= 0) | 58 if (pixel_width_ <= 0 || pixel_height_ <= 0) |
57 return false; | 59 return false; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // Accept binary fields we don't care about for now. | 152 // Accept binary fields we don't care about for now. |
151 return true; | 153 return true; |
152 } | 154 } |
153 | 155 |
154 bool WebMVideoClient::OnFloat(int id, double val) { | 156 bool WebMVideoClient::OnFloat(int id, double val) { |
155 // Accept float fields we don't care about for now. | 157 // Accept float fields we don't care about for now. |
156 return true; | 158 return true; |
157 } | 159 } |
158 | 160 |
159 } // namespace media | 161 } // namespace media |
OLD | NEW |