| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/media/key_systems.h" | 5 #include "webkit/media/crypto/key_systems.h" |
| 6 | 6 |
| 7 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 7 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 8 | 8 |
| 9 namespace webkit_media { | 9 namespace webkit_media { |
| 10 | 10 |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 const char kClearKeyKeySystem[] = "webkit-org.w3.clearkey"; | |
| 14 | |
| 15 struct MediaFormatAndKeySystem { | 13 struct MediaFormatAndKeySystem { |
| 16 const char* mime_type; | 14 const char* mime_type; |
| 17 const char* codec; | 15 const char* codec; |
| 18 const char* key_system; | 16 const char* key_system; |
| 19 }; | 17 }; |
| 20 | 18 |
| 21 static const MediaFormatAndKeySystem | 19 static const MediaFormatAndKeySystem |
| 22 supported_format_key_system_combinations[] = { | 20 supported_format_key_system_combinations[] = { |
| 23 // TODO(ddorwin): Reconsider based on how usage of this class evolves. | 21 // TODO(ddorwin): Reconsider based on how usage of this class evolves. |
| 24 // For now, this class is stateless, so we do not have the opportunity to | 22 // For now, this class is stateless, so we do not have the opportunity to |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 for (size_t i = 0; i < codecs.size(); ++i) { | 67 for (size_t i = 0; i < codecs.size(); ++i) { |
| 70 if (!IsSupportedKeySystemWithContainerAndCodec( | 68 if (!IsSupportedKeySystemWithContainerAndCodec( |
| 71 mime_type, codecs[i], key_system)) | 69 mime_type, codecs[i], key_system)) |
| 72 return false; | 70 return false; |
| 73 } | 71 } |
| 74 | 72 |
| 75 return true; | 73 return true; |
| 76 } | 74 } |
| 77 | 75 |
| 78 } // namespace webkit_media | 76 } // namespace webkit_media |
| OLD | NEW |