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/blink/key_system_config_selector.h" | 5 #include "media/blink/key_system_config_selector.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 } | 645 } |
646 | 646 |
647 // 14. Set the sessionTypes member of accumulated configuration to | 647 // 14. Set the sessionTypes member of accumulated configuration to |
648 // session types. | 648 // session types. |
649 accumulated_configuration->sessionTypes = session_types; | 649 accumulated_configuration->sessionTypes = session_types; |
650 | 650 |
651 // 15. If the videoCapabilities and audioCapabilities members in candidate | 651 // 15. If the videoCapabilities and audioCapabilities members in candidate |
652 // configuration are both empty, return NotSupported. | 652 // configuration are both empty, return NotSupported. |
653 if (candidate.videoCapabilities.isEmpty() && | 653 if (candidate.videoCapabilities.isEmpty() && |
654 candidate.audioCapabilities.isEmpty()) { | 654 candidate.audioCapabilities.isEmpty()) { |
| 655 DVLOG(2) << "Rejecting requested configuration because " |
| 656 << "neither audioCapabilities nor videoCapabilities is specified"; |
655 return CONFIGURATION_NOT_SUPPORTED; | 657 return CONFIGURATION_NOT_SUPPORTED; |
656 } | 658 } |
657 | 659 |
658 // 16. If the videoCapabilities member in candidate configuration is | 660 // 16. If the videoCapabilities member in candidate configuration is |
659 // non-empty: | 661 // non-empty: |
660 std::vector<blink::WebMediaKeySystemMediaCapability> video_capabilities; | 662 std::vector<blink::WebMediaKeySystemMediaCapability> video_capabilities; |
661 if (!candidate.videoCapabilities.isEmpty()) { | 663 if (!candidate.videoCapabilities.isEmpty()) { |
662 // 16.1. Let video capabilities be the result of executing the Get | 664 // 16.1. Let video capabilities be the result of executing the Get |
663 // Supported Capabilities for Audio/Video Type algorithm on Video, | 665 // Supported Capabilities for Audio/Video Type algorithm on Video, |
664 // candidate configuration's videoCapabilities member, accumulated | 666 // candidate configuration's videoCapabilities member, accumulated |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 | 930 |
929 void KeySystemConfigSelector::OnPermissionResult( | 931 void KeySystemConfigSelector::OnPermissionResult( |
930 std::unique_ptr<SelectionRequest> request, | 932 std::unique_ptr<SelectionRequest> request, |
931 bool is_permission_granted) { | 933 bool is_permission_granted) { |
932 request->was_permission_requested = true; | 934 request->was_permission_requested = true; |
933 request->is_permission_granted = is_permission_granted; | 935 request->is_permission_granted = is_permission_granted; |
934 SelectConfigInternal(std::move(request)); | 936 SelectConfigInternal(std::move(request)); |
935 } | 937 } |
936 | 938 |
937 } // namespace media | 939 } // namespace media |
OLD | NEW |