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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 bool WebMVideoClient::InitializeConfig( | 33 bool WebMVideoClient::InitializeConfig( |
34 const std::string& codec_id, const std::vector<uint8>& codec_private, | 34 const std::string& codec_id, const std::vector<uint8>& codec_private, |
35 bool is_encrypted, VideoDecoderConfig* config) { | 35 bool is_encrypted, VideoDecoderConfig* config) { |
36 DCHECK(config); | 36 DCHECK(config); |
37 | 37 |
38 VideoCodec video_codec = kUnknownVideoCodec; | 38 VideoCodec video_codec = kUnknownVideoCodec; |
39 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; | 39 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; |
40 if (codec_id == "V_VP8") { | 40 if (codec_id == "V_VP8") { |
41 video_codec = kCodecVP8; | 41 video_codec = kCodecVP8; |
42 profile = VP8PROFILE_MAIN; | 42 profile = VP8PROFILE_ANY; |
43 } else if (codec_id == "V_VP9") { | 43 } else if (codec_id == "V_VP9") { |
44 video_codec = kCodecVP9; | 44 video_codec = kCodecVP9; |
45 profile = VP9PROFILE_MAIN; | 45 profile = VP9PROFILE_ANY; |
46 } else { | 46 } else { |
47 MEDIA_LOG(log_cb_) << "Unsupported video codec_id " << codec_id; | 47 MEDIA_LOG(log_cb_) << "Unsupported video codec_id " << codec_id; |
48 return false; | 48 return false; |
49 } | 49 } |
50 | 50 |
51 VideoFrame::Format format = | 51 VideoFrame::Format format = |
52 (alpha_mode_ == 1) ? VideoFrame::YV12A : VideoFrame::YV12; | 52 (alpha_mode_ == 1) ? VideoFrame::YV12A : VideoFrame::YV12; |
53 | 53 |
54 if (pixel_width_ <= 0 || pixel_height_ <= 0) | 54 if (pixel_width_ <= 0 || pixel_height_ <= 0) |
55 return false; | 55 return false; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // Accept binary fields we don't care about for now. | 152 // Accept binary fields we don't care about for now. |
153 return true; | 153 return true; |
154 } | 154 } |
155 | 155 |
156 bool WebMVideoClient::OnFloat(int id, double val) { | 156 bool WebMVideoClient::OnFloat(int id, double val) { |
157 // Accept float fields we don't care about for now. | 157 // Accept float fields we don't care about for now. |
158 return true; | 158 return true; |
159 } | 159 } |
160 | 160 |
161 } // namespace media | 161 } // namespace media |
OLD | NEW |