WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
113133
MediaStream should fire ended event when all tracks are ended
https://bugs.webkit.org/show_bug.cgi?id=113133
Summary
MediaStream should fire ended event when all tracks are ended
Li Yin
Reported
2013-03-23 05:29:52 PDT
Spec:
http://dev.w3.org/2011/webrtc/editor/getusermedia.html#event-mediastream-ended
When all the tracks are ended, MediaStream should fire ended event.
Attachments
Patch
(10.88 KB, patch)
2013-03-23 05:52 PDT
,
Li Yin
mcatanzaro
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Li Yin
Comment 1
2013-03-23 05:52:30 PDT
Created
attachment 194701
[details]
Patch
Michael Catanzaro
Comment 2
2016-01-06 18:41:03 PST
Comment on
attachment 194701
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=194701&action=review
Sorry you had no review for three years.... I'm not familiar with the media stream code, but I have a couple trivial code style comments. I presume the patch will need rebased after so long anyway, so I'll give this r- and expect a media stream developer will review this again if you update the patch.
> Source/WebCore/Modules/mediastream/MediaStream.cpp:335 > + for (size_t i = 0; i < m_audioTracks.size(); ++i)
Use modern for loops: for (auto& audioTrack : m_audioTracks).
> Source/WebCore/Modules/mediastream/MediaStreamTrack.h:47 > + static PassRefPtr<MediaStreamTrack> create(ScriptExecutionContext*, MediaStreamComponent*, MediaStream*);
Since this function is only ever called with 'this', the pointer is guaranteed to be non-null; therefore, it should be a reference rather than a pointer. Maybe the other arguments don't follow this rule, but we should for new code.
> Source/WebCore/Modules/mediastream/MediaStreamTrack.h:91 > + MediaStream* m_stream;
Same here: since you never null out m_stream and set it in the initializer list of the constructor, it should be a reference. Either way, this is only right if the MediaStreamTrack can never outlive the MediaStream, but I presume that is true.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug