Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Issue 13776002: MediaStream should fire ended event when all tracks are ended (Closed)

Created:
7 years, 8 months ago by Li Yin
Modified:
7 years, 8 months ago
CC:
blink-reviews, inferno, adamk
Base URL:
https://chromium.googlesource.com/chromium/blink@master
Visibility:
Public.

Description

MediaStream should fire ended event when all tracks are ended BUG=227485 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=148133

Patch Set 1 #

Total comments: 2

Patch Set 2 : MediaStream should fire ended event when all tracks are ended #

Total comments: 9

Patch Set 3 : call clearStreamwhen when tracks are removed #

Total comments: 2

Patch Set 4 : Avoid storing raw pointer in MediaStreamTrack object #

Total comments: 2

Patch Set 5 : Change the function name for inconsistent naming rule issue #

Patch Set 6 : The patch is migrated from WebKit #bug 87336 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+303 lines, -45 lines) Patch
A LayoutTests/http/tests/websocket/tests/hybi/connect-error-by-no-websocket-server.html View 1 2 3 4 5 1 chunk +89 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/websocket/tests/hybi/connect-error-by-no-websocket-server-expected.txt View 1 2 3 4 5 1 chunk +18 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/websocket/tests/hybi/workers/connect-error-by-no-websocket-server.html View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
A LayoutTests/http/tests/websocket/tests/hybi/workers/connect-error-by-no-websocket-server-expected.txt View 1 2 3 4 5 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/websocket/tests/hybi/workers/resources/connect-error-by-no-websocket-server.js View 1 2 3 4 5 1 chunk +97 lines, -0 lines 0 comments Download
M Source/Platform/chromium/public/WebSocketStreamError.h View 1 2 3 4 5 1 chunk +25 lines, -1 line 0 comments Download
M Source/WebCore/WebCore.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A + Source/WebCore/platform/chromium/support/WebSocketStreamError.cpp View 1 2 3 4 5 2 chunks +10 lines, -10 lines 0 comments Download
M Source/WebCore/platform/network/SocketStreamErrorBase.h View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M Source/WebCore/platform/network/SocketStreamErrorBase.cpp View 1 2 3 4 5 1 chunk +0 lines, -7 lines 0 comments Download
M Source/WebCore/platform/network/chromium/SocketStreamError.h View 1 2 3 4 5 1 chunk +13 lines, -4 lines 0 comments Download
M Source/WebCore/platform/network/chromium/SocketStreamHandle.cpp View 1 2 3 4 5 3 chunks +4 lines, -5 lines 0 comments Download
M Source/modules/websockets/WebSocketChannel.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/websockets/WebSocketChannel.cpp View 1 2 3 4 5 3 chunks +25 lines, -14 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Li Yin
Spec:http://dev.w3.org/2011/webrtc/editor/getusermedia.html#event-mediastream-ended
7 years, 8 months ago (2013-04-08 06:20:57 UTC) #1
abarth-chromium
https://codereview.chromium.org/13776002/diff/1/Source/WebCore/Modules/mediastream/MediaStream.cpp File Source/WebCore/Modules/mediastream/MediaStream.cpp (right): https://codereview.chromium.org/13776002/diff/1/Source/WebCore/Modules/mediastream/MediaStream.cpp#newcode336 Source/WebCore/Modules/mediastream/MediaStream.cpp:336: if (!m_audioTracks[i].get()->ended()) There's no need to call "get()" here. ...
7 years, 8 months ago (2013-04-08 06:24:21 UTC) #2
Li Yin
On 2013/04/08 06:24:21, abarth wrote: > https://codereview.chromium.org/13776002/diff/1/Source/WebCore/Modules/mediastream/MediaStream.cpp > File Source/WebCore/Modules/mediastream/MediaStream.cpp (right): > > https://codereview.chromium.org/13776002/diff/1/Source/WebCore/Modules/mediastream/MediaStream.cpp#newcode336 > ...
7 years, 8 months ago (2013-04-08 08:26:45 UTC) #3
Tommy Widenflycht
Inofficial LGTM. https://codereview.chromium.org/13776002/diff/1007/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp File Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (right): https://codereview.chromium.org/13776002/diff/1007/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp#newcode155 Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:155: m_stream->trackEndedNotification(); This is a bit overkill because ...
7 years, 8 months ago (2013-04-08 14:01:07 UTC) #4
abarth-chromium
> MediaStreamTrack is created and only owned by MediaStream, when the MediaStream > is freed, ...
7 years, 8 months ago (2013-04-08 16:52:34 UTC) #5
abarth-chromium
https://codereview.chromium.org/13776002/diff/1007/Source/WebCore/Modules/mediastream/MediaStream.cpp File Source/WebCore/Modules/mediastream/MediaStream.cpp (right): https://codereview.chromium.org/13776002/diff/1007/Source/WebCore/Modules/mediastream/MediaStream.cpp#newcode194 Source/WebCore/Modules/mediastream/MediaStream.cpp:194: m_audioTracks.remove(pos); Will |track| have a dangling reference to this ...
7 years, 8 months ago (2013-04-08 16:58:41 UTC) #6
Li Yin
https://codereview.chromium.org/13776002/diff/1007/Source/WebCore/Modules/mediastream/MediaStream.cpp File Source/WebCore/Modules/mediastream/MediaStream.cpp (right): https://codereview.chromium.org/13776002/diff/1007/Source/WebCore/Modules/mediastream/MediaStream.cpp#newcode194 Source/WebCore/Modules/mediastream/MediaStream.cpp:194: m_audioTracks.remove(pos); On 2013/04/08 16:58:41, abarth wrote: > Will |track| ...
7 years, 8 months ago (2013-04-09 03:11:53 UTC) #7
Li Yin
On 2013/04/08 16:52:34, abarth wrote: > > MediaStreamTrack is created and only owned by MediaStream, ...
7 years, 8 months ago (2013-04-09 06:18:39 UTC) #8
Li Yin
https://codereview.chromium.org/13776002/diff/1007/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp File Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (right): https://codereview.chromium.org/13776002/diff/1007/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp#newcode126 Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:126: void MediaStreamTrack::sourceChangedState() On 2013/04/08 16:58:41, abarth wrote: > Who ...
7 years, 8 months ago (2013-04-09 06:34:07 UTC) #9
eseidel
7 years, 8 months ago (2013-04-09 06:40:51 UTC) #10
eseidel
https://codereview.chromium.org/13776002/diff/14001/Source/WebCore/Modules/mediastream/MediaStream.cpp File Source/WebCore/Modules/mediastream/MediaStream.cpp (right): https://codereview.chromium.org/13776002/diff/14001/Source/WebCore/Modules/mediastream/MediaStream.cpp#newcode342 Source/WebCore/Modules/mediastream/MediaStream.cpp:342: void MediaStream::didEndTrack() If this dispatches synchronous javascript events, then ...
7 years, 8 months ago (2013-04-09 06:42:25 UTC) #11
Li Yin
https://codereview.chromium.org/13776002/diff/14001/Source/WebCore/Modules/mediastream/MediaStream.cpp File Source/WebCore/Modules/mediastream/MediaStream.cpp (right): https://codereview.chromium.org/13776002/diff/14001/Source/WebCore/Modules/mediastream/MediaStream.cpp#newcode342 Source/WebCore/Modules/mediastream/MediaStream.cpp:342: void MediaStream::didEndTrack() On 2013/04/09 06:42:25, Eric Seidel (Google) wrote: ...
7 years, 8 months ago (2013-04-09 07:38:33 UTC) #12
abarth-chromium
This looks much better. Thank you! LGTM. https://codereview.chromium.org/13776002/diff/20001/Source/WebCore/platform/mediastream/MediaStreamDescriptor.h File Source/WebCore/platform/mediastream/MediaStreamDescriptor.h (right): https://codereview.chromium.org/13776002/diff/20001/Source/WebCore/platform/mediastream/MediaStreamDescriptor.h#newcode48 Source/WebCore/platform/mediastream/MediaStreamDescriptor.h:48: virtual void ...
7 years, 8 months ago (2013-04-11 00:48:24 UTC) #13
Li Yin
https://codereview.chromium.org/13776002/diff/20001/Source/WebCore/platform/mediastream/MediaStreamDescriptor.h File Source/WebCore/platform/mediastream/MediaStreamDescriptor.h (right): https://codereview.chromium.org/13776002/diff/20001/Source/WebCore/platform/mediastream/MediaStreamDescriptor.h#newcode48 Source/WebCore/platform/mediastream/MediaStreamDescriptor.h:48: virtual void streamEnded() = 0; On 2013/04/11 00:48:24, abarth ...
7 years, 8 months ago (2013-04-11 00:52:39 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/li.yin@intel.com/13776002/24001
7 years, 8 months ago (2013-04-11 01:23:04 UTC) #15
commit-bot: I haz the power
Presubmit check for 13776002-24001 failed and returned exit status -2001. The presubmit check was hung. ...
7 years, 8 months ago (2013-04-11 01:29:06 UTC) #16
abarth-chromium
Committed patchset #5 manually as r148133 (presubmit successful).
7 years, 8 months ago (2013-04-11 01:42:25 UTC) #17
Tommy Widenflycht
Neat! Thanks for the patch.
7 years, 8 months ago (2013-04-11 07:29:15 UTC) #18
Li Yin
7 years, 8 months ago (2013-04-15 08:04:57 UTC) #19
Message was sent while issue was closed.
Patch Set 6 is uploaded to wrong place. Please ignore it.
I am sorry for the noisy.

Powered by Google App Engine
This is Rietveld 408576698