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. |
ddorwin
2016/03/25 22:51:22
ditto
servolk
2016/03/25 23:52:01
Done.
| |
48 profile = VP9PROFILE_PROFILE0; | |
48 } else { | 49 } else { |
49 MEDIA_LOG(ERROR, media_log_) << "Unsupported video codec_id " << codec_id; | 50 MEDIA_LOG(ERROR, media_log_) << "Unsupported video codec_id " << codec_id; |
50 return false; | 51 return false; |
51 } | 52 } |
52 | 53 |
53 VideoPixelFormat format = | 54 VideoPixelFormat format = |
54 (alpha_mode_ == 1) ? PIXEL_FORMAT_YV12A : PIXEL_FORMAT_YV12; | 55 (alpha_mode_ == 1) ? PIXEL_FORMAT_YV12A : PIXEL_FORMAT_YV12; |
55 | 56 |
56 if (pixel_width_ <= 0 || pixel_height_ <= 0) | 57 if (pixel_width_ <= 0 || pixel_height_ <= 0) |
57 return false; | 58 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. | 151 // Accept binary fields we don't care about for now. |
151 return true; | 152 return true; |
152 } | 153 } |
153 | 154 |
154 bool WebMVideoClient::OnFloat(int id, double val) { | 155 bool WebMVideoClient::OnFloat(int id, double val) { |
155 // Accept float fields we don't care about for now. | 156 // Accept float fields we don't care about for now. |
156 return true; | 157 return true; |
157 } | 158 } |
158 | 159 |
159 } // namespace media | 160 } // namespace media |
OLD | NEW |