RESOLVED FIXED 91301
create different WebKit::WebMediaPlayer based on URL
https://bugs.webkit.org/show_bug.cgi?id=91301
Summary create different WebKit::WebMediaPlayer based on URL
wjia
Reported 2012-07-13 17:20:56 PDT
In Chromium, it's better to create a different WebKit::WebMediaPlayer based on URL, since media stream has different characteristics than regular media playback. Therefore, the URL is needed when frame client's createMediaPlayer() is called. A prototype patch can be found at http://codereview.chromium.org/10382048/
Attachments
Patch (5.90 KB, patch)
2012-07-13 17:31 PDT, wjia
no flags
Patch (5.91 KB, patch)
2012-08-14 16:03 PDT, wjia
no flags
Patch (5.91 KB, patch)
2012-08-21 16:31 PDT, wjia
no flags
Patch (5.89 KB, patch)
2012-08-22 15:36 PDT, wjia
no flags
wjia
Comment 1 2012-07-13 17:31:24 PDT
WebKit Review Bot
Comment 2 2012-07-13 17:33:11 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
wjia
Comment 3 2012-07-13 17:34:51 PDT
The patch is uploaded for review first. It's pending on Chromium patch http://codereview.chromium.org/10537091/. Due to API change, this patch will be landed after Chromium patch is landed.
WebKit Review Bot
Comment 4 2012-07-13 17:45:18 PDT
Comment on attachment 152382 [details] Patch Attachment 152382 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13237316
Eric Carlson
Comment 5 2012-07-13 17:46:46 PDT
Comment on attachment 152382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152382&action=review > Tools/ChangeLog:8 > + Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). Oops!
Darin Fisher (:fishd, Google)
Comment 6 2012-07-16 09:20:15 PDT
Comment on attachment 152382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152382&action=review > Source/WebKit/chromium/public/WebFrameClient.h:91 > + virtual WebMediaPlayer* createMediaPlayer(const WebURL&, WebFrame*, WebMediaPlayerClient*) { return 0; } nit: WebFrameClient methods always take a WebFrame pointer as their first parameter.
Andrew Scherkus
Comment 7 2012-07-16 11:31:35 PDT
Comment on attachment 152382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152382&action=review > Source/WebKit/chromium/ChangeLog:3 > + create different WebKit::WebMediaPlayer based on URL This describes the intent but not the patch contents This should be more along the lines of "Pass URL to WebFrameClient::createMediaPlayer()" with the additional information below describing why we want to do this (i.e., "Permits creation of different WebMediaPlayer implementations based on the URL.") > Source/WebKit/chromium/ChangeLog:8 > + Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). Please fill out
Andrew Scherkus
Comment 8 2012-07-16 12:06:04 PDT
Whoops my other comments didn't get published! Nits aside -- I think the approach is OK. As pointed out in http://codereview.chromium.org/10537091/ an alternative would involve relying on the media engine registrar + supportsType() by registering multiple media engines (i.e., the existing one and another one for media stream URLs) If we wanted to go that path I think we'd have to plumb the registrar mechanism through the Chromium WebKit API (i.e., ask Chromium to register multiple engines). In the end I think we'd end up with an even more indirect way of creating WebMediaPlayer implementations so I'm not sure it'd be worth it.
wjia
Comment 9 2012-08-14 16:03:59 PDT
wjia
Comment 10 2012-08-14 16:09:53 PDT
Please take another look. Need LGTM from this patch in order to land chromium patch http://codereview.chromium.org/10537091/. Then this patch can be landed.
WebKit Review Bot
Comment 11 2012-08-14 16:24:57 PDT
Comment on attachment 158431 [details] Patch Attachment 158431 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13504348
Peter Beverloo (cr-android ews)
Comment 12 2012-08-15 06:17:27 PDT
Comment on attachment 158431 [details] Patch Attachment 158431 [details] did not pass cr-android-ews (chromium-android): Output: http://queues.webkit.org/results/13491998
wjia
Comment 13 2012-08-21 16:31:15 PDT
wjia
Comment 14 2012-08-22 14:20:50 PDT
ping. With chromium patch being landed, this patch is ready to go.
Adam Barth
Comment 15 2012-08-22 14:32:20 PDT
Comment on attachment 159795 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=159795&action=review > Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp:48 > -static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* client, Frame* frame) > +static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* client, const String& url, Frame* frame) It seems like this function should take a KURL rather than a String. > Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp:324 > + m_webMediaPlayer = createWebMediaPlayer(this, m_url, frame); So, m_url is a String? Why not a KURL?
wjia
Comment 16 2012-08-22 15:36:14 PDT
wjia
Comment 17 2012-08-22 15:40:37 PDT
(In reply to comment #15) > (From update of attachment 159795 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=159795&action=review > > > Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp:48 > > -static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* client, Frame* frame) > > +static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* client, const String& url, Frame* frame) > > It seems like this function should take a KURL rather than a String. > > > Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp:324 > > + m_webMediaPlayer = createWebMediaPlayer(this, m_url, frame); > > So, m_url is a String? Why not a KURL? Changed to use KURL in createWebMediaPlayer() in new patch. Not sure why m_url is a String, instead of KURL.
Adam Barth
Comment 18 2012-08-22 15:48:02 PDT
Comment on attachment 160022 [details] Patch Thanks. A good followup patch would be to see if we can change m_url to be a KURL.
WebKit Review Bot
Comment 19 2012-08-23 12:00:41 PDT
Comment on attachment 160022 [details] Patch Clearing flags on attachment: 160022 Committed r126463: <http://trac.webkit.org/changeset/126463>
WebKit Review Bot
Comment 20 2012-08-23 12:00:46 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.