Bug 129161

Summary: Add a supportsKeySystem media engine factory parameter.
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, eric.carlson, glenn, gustavo, menard, mrobinson, philipj, pnormand, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
eric.carlson: review+
Patch for landing none

Description Jer Noble 2014-02-21 12:31:10 PST
Add a supportsKeySystem media engine factory parameter.
Comment 1 Jer Noble 2014-02-21 12:39:06 PST
Created attachment 224891 [details]
Patch
Comment 2 WebKit Commit Bot 2014-02-21 12:42:06 PST
Attachment 224891 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/MediaPlayer.cpp:176:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
Total errors found: 1 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Eric Carlson 2014-02-21 12:58:43 PST
Comment on attachment 224891 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=224891&action=review

If the registrar took a MediaPlayerFactory instead of a bunch of function pointers, we could add new factory methods without touching ports that don't implement them. 

r=me either way.

> Source/WebCore/platform/graphics/MediaPlayer.cpp:1020
> +    unsigned size = engines.size();
> +    for (unsigned i = 0; i < size; i++) {
> +        if (engines[i]->supportsKeySystem && engines[i]->supportsKeySystem(keySystem, mimeType))
> +            return true;
> +    }

Can this use a range-based loop?
Comment 4 Jer Noble 2014-02-21 14:38:35 PST
Created attachment 224913 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2014-02-21 14:43:20 PST
Attachment 224913 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/MediaPlayer.cpp:176:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
Total errors found: 1 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Jer Noble 2014-02-21 16:08:52 PST
Committed r164513: <http://trac.webkit.org/changeset/164513>