WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
130275
Provide preference to enable additional AVFoundation options
https://bugs.webkit.org/show_bug.cgi?id=130275
Summary
Provide preference to enable additional AVFoundation options
Brent Fulgham
Reported
2014-03-14 17:37:09 PDT
Add a new preference and attribute to allow WebKit to tell AVFoundation to turn on additional processing during playback.
Attachments
Patch
(14.16 KB, patch)
2014-03-14 21:10 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(15.29 KB, patch)
2014-03-14 23:04 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Updated to handle Windows.
(19.22 KB, patch)
2014-03-15 10:37 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(22.82 KB, patch)
2014-03-16 21:27 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(22.63 KB, patch)
2014-03-16 21:42 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(24.80 KB, patch)
2014-03-17 10:18 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Finalized after testing.
(21.89 KB, patch)
2014-03-17 12:19 PDT
,
Brent Fulgham
eric.carlson
: review+
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2014-03-14 21:10:27 PDT
Created
attachment 226802
[details]
Patch
Brent Fulgham
Comment 2
2014-03-14 21:12:16 PDT
Comment on
attachment 226802
[details]
Patch Initial WIP. Checking Windows build.
Brent Fulgham
Comment 3
2014-03-14 23:04:01 PDT
Created
attachment 226810
[details]
Patch
Jon Lee
Comment 4
2014-03-15 00:28:21 PDT
Comment on
attachment 226810
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=226810&action=review
Where's WebKit2?
> Source/WebCore/html/HTMLMediaElement.cpp:5986 > + return true;
This logic, while correct, seems a bit odd to me. Why check for the attribute first before the setting, rather than the other way around?
> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:2 > + * Copyright (C) 2011-2014 Apple Inc. All rights reserved.
I think proper style was to list individual years separately than a range…?
> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:589 > +
Please remove.
> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:617 > + [options.get() setObject: [NSNumber numberWithBool: TRUE] forKey: AVURLAssetInheritURIQueryComponentFromReferencingURIKey];
no space after ":"
Brent Fulgham
Comment 5
2014-03-15 10:37:52 PDT
Created
attachment 226824
[details]
Updated to handle Windows.
Brent Fulgham
Comment 6
2014-03-15 10:49:23 PDT
Comment on
attachment 226810
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=226810&action=review
>> Source/WebCore/html/HTMLMediaElement.cpp:5986 >> + return true; > > This logic, while correct, seems a bit odd to me. Why check for the attribute first before the setting, rather than the other way around?
After talking with Jer, we decided to make this a generic method that could check for arbitrary attributes, not just this specific case we are dealing with today. If the attribute doesn't exist, it doesn't really matter if the setting is turned off since the result is the same. But if the setting does exist, we only need to check the setting for this specific URI case. I'm not strongly attached to this; I could switch the order if you prefer.
>> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:2 >> + * Copyright (C) 2011-2014 Apple Inc. All rights reserved. > > I think proper style was to list individual years separately than a range…?
Darin told me in a recent review that we should use ranges.
> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:255 > +static CFStringRef AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey()
Note: This isn't needed and is removed in an updated patch.
>> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:589 >> + > > Please remove.
Will do.
>> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:617 >> + [options.get() setObject: [NSNumber numberWithBool: TRUE] forKey: AVURLAssetInheritURIQueryComponentFromReferencingURIKey]; > > no space after ":"
Will do.
Brent Fulgham
Comment 7
2014-03-15 10:51:09 PDT
(In reply to
comment #4
)
> (From update of
attachment 226810
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=226810&action=review
> > Where's WebKit2?
I'll review this on Mac after the servers are back up. I believe the preference logic is auto generated based on the Settings.in file.
Brent Fulgham
Comment 8
2014-03-16 21:27:00 PDT
Created
attachment 226875
[details]
Patch
Brent Fulgham
Comment 9
2014-03-16 21:42:34 PDT
Created
attachment 226878
[details]
Patch
Eric Carlson
Comment 10
2014-03-16 21:57:04 PDT
Comment on
attachment 226878
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=226878&action=review
> Source/WebCore/platform/graphics/MediaPlayer.h:251 > + virtual bool doesHaveAttribute(const QualifiedName&) const { return false; }
This is a layering violation, QualifiedName is in WebCore/dom.
> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:39 > +#include "HTMLNames.h"
This can't be included from platform/
> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:1339 > + bool value = true;
Nit: why not reuse inheritURI?
> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:43 > +#import "HTMLNames.h"
Layering.
Brent Fulgham
Comment 11
2014-03-17 10:18:34 PDT
Created
attachment 226935
[details]
Patch
Brent Fulgham
Comment 12
2014-03-17 10:20:38 PDT
Comment on
attachment 226935
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=226935&action=review
WIP patch to move changes from Mac to Windows.
> Source/WebCore/platform/graphics/MediaPlayer.h:142 > +class QualifiedName;
Whoops -- need to remove this.
> Source/WebKit/win/WebView.cpp:5054 > + hr = prefsPrivate->isInheritURIQueryComponentEnabled(&enabled); // OOPS! Don't checkin
Oops 2.
Eric Carlson
Comment 13
2014-03-17 10:44:03 PDT
Comment on
attachment 226935
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=226935&action=review
> Source/WebCore/html/HTMLMediaElement.cpp:5989 > +
Nit: unnecessary white space.
> Source/WebCore/platform/graphics/MediaPlayer.cpp:1414 > +
Ditto.
> Source/WebCore/platform/graphics/MediaPlayer.h:303 > +
Ditto.
> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:615 > +
Ditto.
> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:618 > +
Ditto.
> Source/WebKit2/Shared/WebPreferencesStore.h:218 > +
Ditto.
> Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h:324 > +
Ditto.
> Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h:328 > +
Ditto.
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2628 > +
Ditto.
> Source/WebKit/mac/WebView/WebView.mm:2394 > +
Ditto.
Brent Fulgham
Comment 14
2014-03-17 12:19:17 PDT
Created
attachment 226945
[details]
Finalized after testing.
Brent Fulgham
Comment 15
2014-03-17 13:16:53 PDT
Comment on
attachment 226935
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=226935&action=review
>> Source/WebCore/html/HTMLMediaElement.cpp:5989 >> + > > Nit: unnecessary white space.
Looks like I have a bad Xcode editor preference set. I'll fix these when landing.
Brent Fulgham
Comment 16
2014-03-17 13:33:50 PDT
Committed
r165753
: <
http://trac.webkit.org/changeset/165753
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug