Bug 129161 - Add a supportsKeySystem media engine factory parameter.
Summary: Add a supportsKeySystem media engine factory parameter.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-21 12:31 PST by Jer Noble
Modified: 2014-02-21 16:08 PST (History)
10 users (show)

See Also:


Attachments
Patch (16.97 KB, patch)
2014-02-21 12:39 PST, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (18.67 KB, patch)
2014-02-21 14:38 PST, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>