RESOLVED FIXED 146313
WebRTC: Update the MediaStream API
https://bugs.webkit.org/show_bug.cgi?id=146313
Summary WebRTC: Update the MediaStream API
Adam Bergkvist
Reported 2015-06-25 05:30:03 PDT
Update the MediaStream API to match the latest Media Capture and Streams specification [1]. In WebKit, the MediaStream API is mainly implemented by MediaStream and MediaStreamTrack with their corresponding platform representations, and RealtimeMediaSource. [1] http://w3c.github.io/mediacapture-main/archives/20150523/getusermedia.html
Attachments
Proposed patch (128.72 KB, patch)
2015-06-28 07:09 PDT, Adam Bergkvist
eric.carlson: review+
Patch for landing (128.72 KB, patch)
2015-06-29 07:27 PDT, Adam Bergkvist
no flags
Patch for landing (128.71 KB, patch)
2015-06-29 11:39 PDT, Adam Bergkvist
no flags
Adam Bergkvist
Comment 1 2015-06-28 07:09:29 PDT
Created attachment 255723 [details] Proposed patch Proposed patch
Eric Carlson
Comment 2 2015-06-28 10:45:58 PDT
Comment on attachment 255723 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=255723&action=review > Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:90 > + Vector<RefPtr<MediaStreamTrackPrivate>> tracks; > + tracks.reserveCapacity(m_trackSet.size()); > > - unsigned providedTracksSize = audioPrivateTracks.size() + videoPrivateTracks.size(); > - unsigned tracksSize = m_audioPrivateTracks.size() + m_videoPrivateTracks.size(); > + for (auto& track : m_trackSet.values()) > + tracks.append(track); > > - if (providedTracksSize > 0 && tracksSize > 0) > - m_isActive = true; > + return tracks; Nit: you could use copyValuesToVector here. > Source/WebCore/platform/mediastream/MediaStreamPrivate.h:65 > + enum NotifyClientOption { NotifyClient, DontNotifyClient }; This should be "enum class".
Adam Bergkvist
Comment 3 2015-06-29 07:25:51 PDT
(In reply to comment #2) > Comment on attachment 255723 [details] > Proposed patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=255723&action=review > > > Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:90 > > + Vector<RefPtr<MediaStreamTrackPrivate>> tracks; > > + tracks.reserveCapacity(m_trackSet.size()); > > > > - unsigned providedTracksSize = audioPrivateTracks.size() + videoPrivateTracks.size(); > > - unsigned tracksSize = m_audioPrivateTracks.size() + m_videoPrivateTracks.size(); > > + for (auto& track : m_trackSet.values()) > > + tracks.append(track); > > > > - if (providedTracksSize > 0 && tracksSize > 0) > > - m_isActive = true; > > + return tracks; > > Nit: you could use copyValuesToVector here. Fixed. > > Source/WebCore/platform/mediastream/MediaStreamPrivate.h:65 > > + enum NotifyClientOption { NotifyClient, DontNotifyClient }; > > This should be "enum class". Fixed (fixed other enum as well)
Adam Bergkvist
Comment 4 2015-06-29 07:27:06 PDT
Created attachment 255747 [details] Patch for landing
Adam Bergkvist
Comment 5 2015-06-29 07:28:10 PDT
Thanks Eric for reviewing. I'll let the EWS complete before setting cq+.
Adam Bergkvist
Comment 6 2015-06-29 11:39:10 PDT
Created attachment 255764 [details] Patch for landing With reviewer name added
WebKit Commit Bot
Comment 7 2015-06-29 12:54:46 PDT
Comment on attachment 255764 [details] Patch for landing Clearing flags on attachment: 255764 Committed r186081: <http://trac.webkit.org/changeset/186081>
WebKit Commit Bot
Comment 8 2015-06-29 12:54:49 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.