OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/media/webmediaplayer_impl.h" | 5 #include "content/renderer/media/webmediaplayer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 } | 1299 } |
1300 | 1300 |
1301 // TODO(xhwang): Support multiple decryptor notification request (e.g. from | 1301 // TODO(xhwang): Support multiple decryptor notification request (e.g. from |
1302 // video and audio). The current implementation is okay for the current | 1302 // video and audio). The current implementation is okay for the current |
1303 // media pipeline since we initialize audio and video decoders in sequence. | 1303 // media pipeline since we initialize audio and video decoders in sequence. |
1304 // But WebMediaPlayerImpl should not depend on media pipeline's implementation | 1304 // But WebMediaPlayerImpl should not depend on media pipeline's implementation |
1305 // detail. | 1305 // detail. |
1306 DCHECK(decryptor_ready_cb_.is_null()); | 1306 DCHECK(decryptor_ready_cb_.is_null()); |
1307 | 1307 |
1308 // Mixed use of prefixed and unprefixed EME APIs is disallowed by Blink. | 1308 // Mixed use of prefixed and unprefixed EME APIs is disallowed by Blink. |
1309 DCHECK(!(proxy_decryptor_ && web_cdm_)); | 1309 DCHECK(!proxy_decryptor_ || !web_cdm_); |
1310 | 1310 |
1311 if (proxy_decryptor_) { | 1311 if (proxy_decryptor_) { |
1312 decryptor_ready_cb.Run(proxy_decryptor_->GetDecryptor()); | 1312 decryptor_ready_cb.Run(proxy_decryptor_->GetDecryptor()); |
1313 return; | 1313 return; |
1314 } | 1314 } |
1315 | 1315 |
1316 if (web_cdm_) { | 1316 if (web_cdm_) { |
1317 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1317 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
1318 return; | 1318 return; |
1319 } | 1319 } |
1320 | 1320 |
1321 decryptor_ready_cb_ = decryptor_ready_cb; | 1321 decryptor_ready_cb_ = decryptor_ready_cb; |
1322 } | 1322 } |
1323 | 1323 |
1324 } // namespace content | 1324 } // namespace content |
OLD | NEW |