[webkit-reviews] review granted: [Bug 121954] [MediaStream API] allow a stream source to be shared : [Attachment 214121] Fixing last patch (no tests yet)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 24 07:48:47 PDT 2013


Eric Carlson <eric.carlson at apple.com> has granted Thiago de Barros Lacerda
<thiago.lacerda at openbossa.org>'s request for review:
Bug 121954: [MediaStream API] allow a stream source to be shared
https://bugs.webkit.org/show_bug.cgi?id=121954

Attachment 214121: Fixing last patch (no tests yet)
https://bugs.webkit.org/attachment.cgi?id=214121&action=review

------- Additional Comments from Eric Carlson <eric.carlson at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=214121&action=review


r=me but you need to fix the ChangeLog comment. Please consider the other
suggestions.

> Source/WebCore/ChangeLog:8
> +	   No new tests (OOPS!).

This won't commit with the "OOPS!" in place. I would change it to something
like "No new tests, no change in functionality".

> Source/WebCore/ChangeLog:32
> +	   * Modules/mediastream/MediaStream.cpp:
> +	   (WebCore::MediaStream::MediaStream):
> +	   (WebCore::MediaStream::addTrack):
> +	   (WebCore::MediaStream::removeTrack):
> +	   (WebCore::MediaStream::haveTrackWithSource):
> +	   (WebCore::MediaStream::addRemoteSource):
> +	   (WebCore::MediaStream::removeRemoteSource):
> +	   * Modules/mediastream/MediaStream.h:
> +	   * Modules/mediastream/MediaStreamTrack.cpp:
> +	   (WebCore::MediaStreamTrack::addObserver):
> +	   (WebCore::MediaStreamTrack::removeObserver):
> +	   (WebCore::MediaStreamTrack::trackDidEnd):
> +	   * Modules/mediastream/MediaStreamTrack.h:
> +	   * platform/mediastream/MediaStreamDescriptor.cpp:
> +	   (WebCore::MediaStreamDescriptor::removeSource):
> +	   (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
> +	   (WebCore::MediaStreamDescriptor::setEnded):
> +	   * platform/mediastream/MediaStreamDescriptor.h:
> +	   (WebCore::MediaStreamDescriptor::~MediaStreamDescriptor):
> +	   * platform/mediastream/MediaStreamSource.cpp:
> +	   (WebCore::MediaStreamSource::MediaStreamSource):
> +	   (WebCore::MediaStreamSource::reset):
> +	   * platform/mediastream/MediaStreamSource.h:

It would be nice to have brief descriptions of what changed in each method. I
think this can really help later when investigating past changes.

> Source/WebCore/Modules/mediastream/MediaStream.cpp:127
> +	   m_audioTracks.append(track);

Nit: m_audioTracks.append(track.release());

> Source/WebCore/Modules/mediastream/MediaStream.cpp:135
> +	   m_videoTracks.append(track);

Ditto

> Source/WebCore/Modules/mediastream/MediaStream.cpp:342
>	   if ((*tracks)[i]->source() == source) {

Nit: you might as well update this loop to use the new hotness - for (const
RefPtr<MediaStreamTrack>& track : *tracks) ...

> Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp:106
> +    for (size_t i = 0; i < audioSources.size(); i++)

Ditto.

> Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp:109
> +    for (size_t i = 0; i < videoSources.size(); i++)

Ditto.


More information about the webkit-reviews mailing list