| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2013 Google Inc. All rights reserved. |    2  * Copyright (C) 2013 Google Inc. All rights reserved. | 
|    3  * |    3  * | 
|    4  * Redistribution and use in source and binary forms, with or without |    4  * Redistribution and use in source and binary forms, with or without | 
|    5  * modification, are permitted provided that the following conditions are |    5  * modification, are permitted provided that the following conditions are | 
|    6  * met: |    6  * met: | 
|    7  * |    7  * | 
|    8  *     * Redistributions of source code must retain the above copyright |    8  *     * Redistributions of source code must retain the above copyright | 
|    9  * notice, this list of conditions and the following disclaimer. |    9  * notice, this list of conditions and the following disclaimer. | 
|   10  *     * Redistributions in binary form must reproduce the above |   10  *     * Redistributions in binary form must reproduce the above | 
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  244     String codecs = contentType.parameter("codecs"); |  244     String codecs = contentType.parameter("codecs"); | 
|  245  |  245  | 
|  246     // 2. If type does not contain a valid MIME type string, then return false. |  246     // 2. If type does not contain a valid MIME type string, then return false. | 
|  247     if (contentType.type().isEmpty()) { |  247     if (contentType.type().isEmpty()) { | 
|  248         WTF_LOG(Media, "MediaSource::isTypeSupported(%s) -> false (invalid mime 
     type)", type.ascii().data()); |  248         WTF_LOG(Media, "MediaSource::isTypeSupported(%s) -> false (invalid mime 
     type)", type.ascii().data()); | 
|  249         return false; |  249         return false; | 
|  250     } |  250     } | 
|  251  |  251  | 
|  252     // Note: MediaSource.isTypeSupported() returning true implies that HTMLMedia
     Element.canPlayType() will return "maybe" or "probably" |  252     // Note: MediaSource.isTypeSupported() returning true implies that HTMLMedia
     Element.canPlayType() will return "maybe" or "probably" | 
|  253     // since it does not make sense for a MediaSource to support a type the HTML
     MediaElement knows it cannot play. |  253     // since it does not make sense for a MediaSource to support a type the HTML
     MediaElement knows it cannot play. | 
|  254     if (HTMLMediaElement::supportsType(contentType, String()) == WebMimeRegistry
     ::IsNotSupported) { |  254     if (HTMLMediaElement::supportsType(contentType) == WebMimeRegistry::IsNotSup
     ported) { | 
|  255         WTF_LOG(Media, "MediaSource::isTypeSupported(%s) -> false (not supported
      by HTMLMediaElement)", type.ascii().data()); |  255         WTF_LOG(Media, "MediaSource::isTypeSupported(%s) -> false (not supported
      by HTMLMediaElement)", type.ascii().data()); | 
|  256         return false; |  256         return false; | 
|  257     } |  257     } | 
|  258  |  258  | 
|  259     // 3. If type contains a media type or media subtype that the MediaSource do
     es not support, then return false. |  259     // 3. If type contains a media type or media subtype that the MediaSource do
     es not support, then return false. | 
|  260     // 4. If type contains at a codec that the MediaSource does not support, the
     n return false. |  260     // 4. If type contains at a codec that the MediaSource does not support, the
     n return false. | 
|  261     // 5. If the MediaSource does not support the specified combination of media
      type, media subtype, and codecs then return false. |  261     // 5. If the MediaSource does not support the specified combination of media
      type, media subtype, and codecs then return false. | 
|  262     // 6. Return true. |  262     // 6. Return true. | 
|  263     bool result = MIMETypeRegistry::isSupportedMediaSourceMIMEType(contentType.t
     ype(), codecs); |  263     bool result = MIMETypeRegistry::isSupportedMediaSourceMIMEType(contentType.t
     ype(), codecs); | 
|  264     WTF_LOG(Media, "MediaSource::isTypeSupported(%s) -> %s", type.ascii().data()
     , result ? "true" : "false"); |  264     WTF_LOG(Media, "MediaSource::isTypeSupported(%s) -> %s", type.ascii().data()
     , result ? "true" : "false"); | 
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  615  |  615  | 
|  616     m_asyncEventQueue->enqueueEvent(event.release()); |  616     m_asyncEventQueue->enqueueEvent(event.release()); | 
|  617 } |  617 } | 
|  618  |  618  | 
|  619 URLRegistry& MediaSource::registry() const |  619 URLRegistry& MediaSource::registry() const | 
|  620 { |  620 { | 
|  621     return MediaSourceRegistry::registry(); |  621     return MediaSourceRegistry::registry(); | 
|  622 } |  622 } | 
|  623  |  623  | 
|  624 } // namespace blink |  624 } // namespace blink | 
| OLD | NEW |