RESOLVED FIXED Bug 97540
MediaStream API: Update getUserMedia to match the latest specification
https://bugs.webkit.org/show_bug.cgi?id=97540
Summary MediaStream API: Update getUserMedia to match the latest specification
Tommy Widenflycht
Reported 2012-09-25 02:26:11 PDT
http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia Navigator.getUserMedia is changed so that the audio and video members can either be a bool or a constraints object.
Attachments
Patch (40.58 KB, patch)
2012-09-25 02:40 PDT, Tommy Widenflycht
no flags
Patch (41.26 KB, patch)
2012-09-26 01:15 PDT, Tommy Widenflycht
abarth: review+
webkit.review.bot: commit-queue-
Patch for landing (40.48 KB, patch)
2012-09-27 02:09 PDT, Tommy Widenflycht
no flags
Tommy Widenflycht
Comment 1 2012-09-25 02:40:46 PDT
WebKit Review Bot
Comment 2 2012-09-25 02:44:34 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.
Adam Barth
Comment 3 2012-09-25 09:20:09 PDT
Comment on attachment 165564 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=165564&action=review > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:59 > + bool flag = false; flag = ? I guess the name ok is already taken... > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:83 > + RefPtr<UserMediaRequest> request = adoptRef(new UserMediaRequest(context, controller, audio.release(), video.release(), successCallback, errorCallback)); > + > return request.release(); You can merge these lines and delete the variable |request| if you like. > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:102 > + return (bool)m_audio; static_cast<bool>(m_audio) WebKit uses C++ style casts. Actually, is that even necessary? Does the compiler complain if you leave off the explicit cast?
Adam Barth
Comment 4 2012-09-25 09:21:09 PDT
Comment on attachment 165564 [details] Patch Tommy, would you be willing to fix these nits in a followup patch? I see that you're already asleep and I want to save you the timezone round-trip.
WebKit Review Bot
Comment 5 2012-09-25 09:29:52 PDT
Comment on attachment 165564 [details] Patch Clearing flags on attachment: 165564 Committed r129517: <http://trac.webkit.org/changeset/129517>
WebKit Review Bot
Comment 6 2012-09-25 09:29:56 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 7 2012-09-25 11:21:06 PDT
Re-opened since this is blocked by 97582
Tommy Widenflycht
Comment 8 2012-09-26 01:07:07 PDT
Comment on attachment 165564 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=165564&action=review >> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:59 >> + bool flag = false; > > flag = ? I guess the name ok is already taken... Changed names to make more sense. "name" -> "mediaType" and "flag" -> "mediaRequested". Here I am checking if the mediaType is a Dictionary or a boolean, and extracting the correct value. >> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:83 >> return request.release(); > > You can merge these lines and delete the variable |request| if you like. Done. >> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:102 >> + return (bool)m_audio; > > static_cast<bool>(m_audio) > > WebKit uses C++ style casts. > > Actually, is that even necessary? Does the compiler complain if you leave off the explicit cast? I have not used c-style casts for ages and recently I started adding them, sigh. I'm sorry. You are right, there is no need for a cast at all here.
Tommy Widenflycht
Comment 9 2012-09-26 01:07:51 PDT
(In reply to comment #7) > Re-opened since this is blocked by 97582 Caused by a missing WEBKIT_EXPORT in WebMediaConstraints.h. Fixed.
Tommy Widenflycht
Comment 10 2012-09-26 01:15:08 PDT
Build Bot
Comment 11 2012-09-26 01:38:46 PDT
Comment on attachment 165746 [details] Patch Attachment 165746 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14032377 New failing tests: http/tests/workers/terminate-during-sync-operation.html
Tommy Widenflycht
Comment 12 2012-09-26 02:00:05 PDT
Since the Mac build hasn't enabled MEDIA_STREAMS I am pretty sure my patch has nothing to do with this failure. (In reply to comment #11) > (From update of attachment 165746 [details]) > Attachment 165746 [details] did not pass mac-ews (mac): > Output: http://queues.webkit.org/results/14032377 > > New failing tests: > http/tests/workers/terminate-during-sync-operation.html
Adam Barth
Comment 13 2012-09-26 08:57:25 PDT
> Since the Mac build hasn't enabled MEDIA_STREAMS I am pretty sure my patch has nothing to do with this failure. Yeah, running the tests on mac is new. I think that's just a flaky test.
WebKit Review Bot
Comment 14 2012-09-26 09:23:40 PDT
Comment on attachment 165746 [details] Patch Rejecting attachment 165746 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: Kit/chromium/third_party/yasm/source/patched-yasm --revision 154708 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' 51>At revision 154708. ________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' ________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' Updating webkit projects from gyp files... Full output: http://queues.webkit.org/results/14036464
Tommy Widenflycht
Comment 15 2012-09-27 02:09:18 PDT
Created attachment 165954 [details] Patch for landing
WebKit Review Bot
Comment 16 2012-09-27 04:06:56 PDT
Comment on attachment 165954 [details] Patch for landing Clearing flags on attachment: 165954 Committed r129749: <http://trac.webkit.org/changeset/129749>
Note You need to log in before you can comment on or make changes to this bug.