Bug 146302 - [Win] Update MediaPlayerPrivateAVFoundationCF::supportsType
Summary: [Win] Update MediaPlayerPrivateAVFoundationCF::supportsType
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-06-24 17:25 PDT by Brent Fulgham
Modified: 2015-06-25 12:38 PDT (History)
4 users (show)

See Also:


Attachments
Patch (7.43 KB, patch)
2015-06-24 17:32 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (15.71 KB, patch)
2015-06-25 10:28 PDT, Brent Fulgham
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2015-06-24 17:25:27 PDT
Bring the Windows version of "supportsType" in line with the Mac/iOS version by using AVCFURLAssetIsPlayableExtendedMIMEType.
Comment 1 Brent Fulgham 2015-06-24 17:25:43 PDT
<rdar://problem/19726553>
Comment 2 Brent Fulgham 2015-06-24 17:32:49 PDT
Created attachment 255534 [details]
Patch
Comment 3 WebKit Commit Bot 2015-06-24 17:34:22 PDT
Attachment 255534 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:937:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:983:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Brent Fulgham 2015-06-24 17:34:39 PDT
I also fixed a null dereference I ran into while testing.
Comment 5 Eric Carlson 2015-06-24 18:04:57 PDT
Comment on attachment 255534 [details]
Patch

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

> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:910
> +static bool isUnsupportedMIMEType(const String& type)

It looks like this and staticMIMETypeList are exactly the same as the ObjC versions. If so, can they be put into the base class and shared?

> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:1379
> +        if (audibleOptionLocale)
> +            m_languageOfPrimaryAudioTrack = CFLocaleGetIdentifier(audibleOptionLocale.get());
> +        else
> +            m_languageOfPrimaryAudioTrack = emptyString();
> +

You forgot to document this in the ChangeLog.
Comment 6 Brent Fulgham 2015-06-25 10:28:37 PDT
Created attachment 255562 [details]
Patch
Comment 7 WebKit Commit Bot 2015-06-25 10:30:45 PDT
Attachment 255562 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:912:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:1108:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Brent Fulgham 2015-06-25 12:38:30 PDT
Committed r185958: <http://trac.webkit.org/changeset/185958>