RESOLVED FIXED 106972
Add a Setting to disable QTKit media engine.
https://bugs.webkit.org/show_bug.cgi?id=106972
Summary Add a Setting to disable QTKit media engine.
Jer Noble
Reported 2013-01-15 18:40:03 PST
Add a Setting to disable QTKit media engine.
Attachments
Patch (12.54 KB, patch)
2013-01-15 23:19 PST, Jer Noble
no flags
Patch (12.65 KB, patch)
2013-01-15 23:47 PST, Jer Noble
no flags
Patch (16.92 KB, patch)
2013-01-16 11:09 PST, Jer Noble
eric.carlson: review+
webkit-ews: commit-queue-
Jer Noble
Comment 1 2013-01-15 23:19:52 PST
Jer Noble
Comment 2 2013-01-15 23:21:12 PST
Early Warning System Bot
Comment 3 2013-01-15 23:27:04 PST
kov's GTK+ EWS bot
Comment 4 2013-01-15 23:45:11 PST
Jer Noble
Comment 5 2013-01-15 23:47:03 PST
Created attachment 182924 [details] Patch Added #if guards to protect ports without QTKit support.
Eric Carlson
Comment 6 2013-01-16 09:48:47 PST
Comment on attachment 182924 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182924&action=review > Source/WebCore/platform/graphics/MediaPlayer.cpp:229 > +#if PLATFORM(MAC) || (PLATFORM(QT) && USE(QTKIT)) > + if (Settings::isQTKitEnabled()) > + MediaPlayerPrivateQTKit::registerMediaEngine(addMediaEngine); > +#endif > + Having the check here means it won't really be possible to have a control in an application's UI, because the user can't know if the media engines have already been registered or not (eg. loading a document WebCore doesn't handle natively has the side effect of registering all media engines to see if it is possible to create a media document). I think it would be more useful to always register the QTKit media engine, but then not use it when the pref is set by checking engineDescription() in bestMediaEngineForTypeAndCodecs().
Jer Noble
Comment 7 2013-01-16 10:11:47 PST
(In reply to comment #6) > (From update of attachment 182924 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=182924&action=review > > > Source/WebCore/platform/graphics/MediaPlayer.cpp:229 > > +#if PLATFORM(MAC) || (PLATFORM(QT) && USE(QTKIT)) > > + if (Settings::isQTKitEnabled()) > > + MediaPlayerPrivateQTKit::registerMediaEngine(addMediaEngine); > > +#endif > > + > > Having the check here means it won't really be possible to have a control in an application's UI, because the user can't know if the media engines have already been registered or not (eg. loading a document WebCore doesn't handle natively has the side effect of registering all media engines to see if it is possible to create a media document). I think it would be more useful to always register the QTKit media engine, but then not use it when the pref is set by checking engineDescription() in bestMediaEngineForTypeAndCodecs(). We don't have access to engineDescription() at that point, as bestMediaEngineForTypeAndCodecs() just uses the MediaEngine factory methods, not an instance of MediaPlayerPrivate. But even if it were available, that seems fragile (i.e., comparing strings returned from engineDescription()). What if we recreate the list of media engine factories whenever one of those preferences change?
Eric Carlson
Comment 8 2013-01-16 10:25:27 PST
Comment on attachment 182924 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182924&action=review >>> Source/WebCore/platform/graphics/MediaPlayer.cpp:229 >>> + >> >> Having the check here means it won't really be possible to have a control in an application's UI, because the user can't know if the media engines have already been registered or not (eg. loading a document WebCore doesn't handle natively has the side effect of registering all media engines to see if it is possible to create a media document). I think it would be more useful to always register the QTKit media engine, but then not use it when the pref is set by checking engineDescription() in bestMediaEngineForTypeAndCodecs(). > > We don't have access to engineDescription() at that point, as bestMediaEngineForTypeAndCodecs() just uses the MediaEngine factory methods, not an instance of MediaPlayerPrivate. But even if it were available, that seems fragile (i.e., comparing strings returned from engineDescription()). > > What if we recreate the list of media engine factories whenever one of those preferences change? Fair enough. Having to set the pref, quit, and relaunch is a pain but not the end of the world.
Jer Noble
Comment 9 2013-01-16 11:09:31 PST
Created attachment 183009 [details] Patch Notwithstanding ericc's r+, I've modified the patch to make the setting 'live'.
Eric Carlson
Comment 10 2013-01-16 11:13:51 PST
Comment on attachment 183009 [details] Patch Nice solution, thanks!
Early Warning System Bot
Comment 11 2013-01-16 11:15:59 PST
Early Warning System Bot
Comment 12 2013-01-16 11:17:41 PST
WebKit Review Bot
Comment 13 2013-01-16 11:20:34 PST
Comment on attachment 183009 [details] Patch Attachment 183009 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15925158
Jer Noble
Comment 14 2013-01-16 11:21:25 PST
Note You need to log in before you can comment on or make changes to this bug.