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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
781 return WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported; | 781 return WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported; |
782 | 782 |
783 // We do not support run-time switching between key systems for now. | 783 // We do not support run-time switching between key systems for now. |
784 if (current_key_system_.empty()) { | 784 if (current_key_system_.empty()) { |
785 if (!proxy_decryptor_) { | 785 if (!proxy_decryptor_) { |
786 proxy_decryptor_.reset(new ProxyDecryptor( | 786 proxy_decryptor_.reset(new ProxyDecryptor( |
787 #if defined(ENABLE_PEPPER_CDMS) | 787 #if defined(ENABLE_PEPPER_CDMS) |
788 // Create() must be called synchronously as |frame_| may not be | 788 // Create() must be called synchronously as |frame_| may not be |
789 // valid afterwards. | 789 // valid afterwards. |
790 base::Bind(&PepperCdmWrapperImpl::Create, frame_), | 790 base::Bind(&PepperCdmWrapperImpl::Create, frame_), |
791 #elif defined(ENABLE_BROWSER_CDMS) | |
792 // TODO(xhwang): Fix this if we have a platform that uses prefixed EME | |
ddorwin
2014/06/05 17:59:48
Does this actually get compiled on such platforms
xhwang
2014/06/09 20:57:20
Not yet. Added #error.
| |
793 // API in WMPI and uses a browser side CDM. | |
794 NULL, | |
791 #endif | 795 #endif |
792 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), | 796 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), |
793 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), | 797 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), |
794 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage))); | 798 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage))); |
795 } | 799 } |
796 | 800 |
797 GURL security_origin(frame_->document().securityOrigin().toString()); | 801 GURL security_origin(frame_->document().securityOrigin().toString()); |
798 if (!proxy_decryptor_->InitializeCDM(key_system, security_origin)) | 802 if (!proxy_decryptor_->InitializeCDM(key_system, security_origin)) |
799 return WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported; | 803 return WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported; |
800 | 804 |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1369 compositor_task_runner_->PostTask(FROM_HERE, | 1373 compositor_task_runner_->PostTask(FROM_HERE, |
1370 base::Bind(&GetCurrentFrameAndSignal, | 1374 base::Bind(&GetCurrentFrameAndSignal, |
1371 base::Unretained(compositor_), | 1375 base::Unretained(compositor_), |
1372 &video_frame, | 1376 &video_frame, |
1373 &event)); | 1377 &event)); |
1374 event.Wait(); | 1378 event.Wait(); |
1375 return video_frame; | 1379 return video_frame; |
1376 } | 1380 } |
1377 | 1381 |
1378 } // namespace content | 1382 } // namespace content |
OLD | NEW |