| 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 return WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported; | 789 return WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported; |
| 790 | 790 |
| 791 // We do not support run-time switching between key systems for now. | 791 // We do not support run-time switching between key systems for now. |
| 792 if (current_key_system_.empty()) { | 792 if (current_key_system_.empty()) { |
| 793 if (!proxy_decryptor_) { | 793 if (!proxy_decryptor_) { |
| 794 proxy_decryptor_.reset(new ProxyDecryptor( | 794 proxy_decryptor_.reset(new ProxyDecryptor( |
| 795 #if defined(ENABLE_PEPPER_CDMS) | 795 #if defined(ENABLE_PEPPER_CDMS) |
| 796 // Create() must be called synchronously as |frame_| may not be | 796 // Create() must be called synchronously as |frame_| may not be |
| 797 // valid afterwards. | 797 // valid afterwards. |
| 798 base::Bind(&PepperCdmWrapperImpl::Create, frame_), | 798 base::Bind(&PepperCdmWrapperImpl::Create, frame_), |
| 799 #elif defined(ENABLE_BROWSER_CDMS) |
| 800 #error Browser side CDM in WMPI for prefixed EME API not supported yet. |
| 799 #endif | 801 #endif |
| 800 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), | 802 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), |
| 801 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), | 803 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), |
| 802 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage))); | 804 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage))); |
| 803 } | 805 } |
| 804 | 806 |
| 805 GURL security_origin(frame_->document().securityOrigin().toString()); | 807 GURL security_origin(frame_->document().securityOrigin().toString()); |
| 806 if (!proxy_decryptor_->InitializeCDM(key_system, security_origin)) | 808 if (!proxy_decryptor_->InitializeCDM(key_system, security_origin)) |
| 807 return WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported; | 809 return WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported; |
| 808 | 810 |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1379 compositor_task_runner_->PostTask(FROM_HERE, | 1381 compositor_task_runner_->PostTask(FROM_HERE, |
| 1380 base::Bind(&GetCurrentFrameAndSignal, | 1382 base::Bind(&GetCurrentFrameAndSignal, |
| 1381 base::Unretained(compositor_), | 1383 base::Unretained(compositor_), |
| 1382 &video_frame, | 1384 &video_frame, |
| 1383 &event)); | 1385 &event)); |
| 1384 event.Wait(); | 1386 event.Wait(); |
| 1385 return video_frame; | 1387 return video_frame; |
| 1386 } | 1388 } |
| 1387 | 1389 |
| 1388 } // namespace content | 1390 } // namespace content |
| OLD | NEW |