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

Issue 2307653002: Adding CastRemotingSender for media remoting. (Closed)

Created:
4 years, 3 months ago by xjz
Modified:
4 years, 3 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, imcheng+watch_chromium.org, jasonroberts+watch_google.com, avayvod+watch_chromium.org, feature-media-reviews_chromium.org, chromium-apps-reviews_chromium.org, xjz+watch_chromium.org, isheriff+watch_chromium.org, miu+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding CastRemotingSender for media remoting. This Cl: 1. Adding a CastRemotingSender for media remoting. 2. Modeled after media::cast::FrameSender, but is different in that: a) it's just used as an opaque, reliable transport and does not manage a media encoder; and b) is meant to run in the browser process instead of the render process to avoid extra cross-process hopping for the media remoting use case. 3. Intended to be created via the cast.streaming.rtp private extension API, which is to be used by the Media Router component extension. BUG=630390, 643964 Committed: https://crrev.com/7bffeb193c34e56437778094f847ec65e90deaea Cr-Commit-Position: refs/heads/master@{#418409}

Patch Set 1 : Final patch in the origial WIP CL. #

Patch Set 2 : Addressed miu's comments. #

Patch Set 3 : Fix. #

Total comments: 6

Patch Set 4 : Addressed miu's comments. #

Total comments: 42

Patch Set 5 : Addressed dcheng's comments. #

Total comments: 2

Patch Set 6 : Addressed dcheng's comments. #

Patch Set 7 : Rebased. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+980 lines, -130 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 1 chunk +8 lines, -1 line 0 comments Download
A chrome/browser/media/cast_remoting_sender.h View 1 2 3 4 1 chunk +132 lines, -0 lines 0 comments Download
A chrome/browser/media/cast_remoting_sender.cc View 1 2 3 4 5 1 chunk +342 lines, -0 lines 0 comments Download
A chrome/browser/media/cast_remoting_sender_unittest.cc View 1 2 3 4 1 chunk +203 lines, -0 lines 0 comments Download
M chrome/browser/media/cast_transport_host_filter.h View 1 2 3 4 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/media/cast_transport_host_filter.cc View 1 2 3 4 13 chunks +73 lines, -45 lines 0 comments Download
M chrome/common/cast_messages.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/extensions/cast_streaming_native_handler.cc View 1 2 3 4 5 6 7 chunks +59 lines, -27 lines 0 comments Download
M chrome/renderer/media/cast_rtp_stream.h View 1 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/renderer/media/cast_rtp_stream.cc View 1 2 3 4 5 6 7 chunks +69 lines, -30 lines 0 comments Download
M chrome/renderer/media/cast_session.h View 2 chunks +16 lines, -10 lines 0 comments Download
M chrome/renderer/media/cast_session.cc View 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_session_delegate.h View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_session_delegate.cc View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_transport_ipc.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/cast_streaming/null_stream.js View 1 2 3 1 chunk +3 lines, -8 lines 0 comments Download
M media/cast/cast_config.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M media/cast/net/cast_transport.h View 1 chunk +1 line, -1 line 0 comments Download
M media/cast/net/cast_transport_config.h View 2 chunks +6 lines, -1 line 1 comment Download

Messages

Total messages: 45 (23 generated)
xjz
miu@: Addressed your comments. PTAL mek@: PTAL changes on chrome/renderer/extensions/cast_streaming_native_handler.cc. dcheng@: Need owner's approval on ...
4 years, 3 months ago (2016-09-01 22:45:11 UTC) #7
miu
lgtm % nits: https://codereview.chromium.org/2307653002/diff/60001/chrome/browser/media/cast_remoting_sender.cc File chrome/browser/media/cast_remoting_sender.cc (right): https://codereview.chromium.org/2307653002/diff/60001/chrome/browser/media/cast_remoting_sender.cc#newcode153 chrome/browser/media/cast_remoting_sender.cc:153: // media::cast::frame_sender::GetUnacknowledgedFrameCount(). s/frame_sender/FrameSender/ https://codereview.chromium.org/2307653002/diff/60001/chrome/test/data/extensions/api_test/cast_streaming/null_stream.js File chrome/test/data/extensions/api_test/cast_streaming/null_stream.js ...
4 years, 3 months ago (2016-09-02 21:32:40 UTC) #14
miu
dcheng and mek: To provide a little more context for this change: We are building ...
4 years, 3 months ago (2016-09-02 21:44:39 UTC) #15
xjz
Thanks, miu@! Addressed your comments. sky@: Need owner's approval on chrome/browser/BUILD.gn. https://codereview.chromium.org/2307653002/diff/60001/chrome/browser/media/cast_remoting_sender.cc File chrome/browser/media/cast_remoting_sender.cc (right): ...
4 years, 3 months ago (2016-09-02 22:00:11 UTC) #17
Marijn Kruisselbrink
extensions lgtm
4 years, 3 months ago (2016-09-03 00:05:45 UTC) #18
sky
LGTM
4 years, 3 months ago (2016-09-06 18:12:06 UTC) #19
xjz
ping dcheng@: Does chrome/common/cast_messages.h LGTY?
4 years, 3 months ago (2016-09-06 19:02:31 UTC) #20
dcheng
Mostly just optional nits and some C++11 things so you don't have to write std::unique_ptr ...
4 years, 3 months ago (2016-09-10 02:31:37 UTC) #21
miu
On 2016/09/10 02:31:37, dcheng wrote: > My main question though... I looked at a bunch ...
4 years, 3 months ago (2016-09-10 23:02:08 UTC) #22
dcheng
On 2016/09/10 23:02:08, miu wrote: > On 2016/09/10 02:31:37, dcheng wrote: > > My main ...
4 years, 3 months ago (2016-09-12 17:29:09 UTC) #24
xjz
Addressed dcheng's comments. PTAL https://codereview.chromium.org/2307653002/diff/80001/chrome/browser/media/cast_remoting_sender.cc File chrome/browser/media/cast_remoting_sender.cc (right): https://codereview.chromium.org/2307653002/diff/80001/chrome/browser/media/cast_remoting_sender.cc#newcode42 chrome/browser/media/cast_remoting_sender.cc:42: RemotingRtcpClient(base::WeakPtr<CastRemotingSender> remoting_sender) On 2016/09/10 02:31:36, ...
4 years, 3 months ago (2016-09-12 18:22:06 UTC) #25
miu
On 2016/09/12 17:29:09, dcheng wrote: > Hi miu@ > > I do understand the high-level ...
4 years, 3 months ago (2016-09-12 19:36:53 UTC) #26
dcheng
On 2016/09/12 19:36:53, miu wrote: > On 2016/09/12 17:29:09, dcheng wrote: > > Hi miu@ ...
4 years, 3 months ago (2016-09-13 01:22:21 UTC) #27
xjz
Addressed dcheng's comments. Thanks for reviewing! https://codereview.chromium.org/2307653002/diff/80001/chrome/browser/media/cast_remoting_sender.cc File chrome/browser/media/cast_remoting_sender.cc (right): https://codereview.chromium.org/2307653002/diff/80001/chrome/browser/media/cast_remoting_sender.cc#newcode82 chrome/browser/media/cast_remoting_sender.cc:82: last_sent_frame_id_(media::cast::FrameId::first() - 1), ...
4 years, 3 months ago (2016-09-13 17:06:10 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2307653002/120001
4 years, 3 months ago (2016-09-13 17:07:02 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/68240) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 3 months ago (2016-09-13 17:09:39 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2307653002/140001
4 years, 3 months ago (2016-09-13 17:50:38 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/292234)
4 years, 3 months ago (2016-09-13 20:52:01 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2307653002/140001
4 years, 3 months ago (2016-09-13 21:28:42 UTC) #40
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 3 months ago (2016-09-13 23:30:05 UTC) #42
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/7bffeb193c34e56437778094f847ec65e90deaea Cr-Commit-Position: refs/heads/master@{#418409}
4 years, 3 months ago (2016-09-13 23:31:59 UTC) #44
Jeffrey Yasskin
4 years, 3 months ago (2016-09-15 20:48:12 UTC) #45
Message was sent while issue was closed.
I'll send you a patch.

https://codereview.chromium.org/2307653002/diff/140001/media/cast/net/cast_tr...
File media/cast/net/cast_transport_config.h (right):

https://codereview.chromium.org/2307653002/diff/140001/media/cast/net/cast_tr...
media/cast/net/cast_transport_config.h:69: int32_t rtp_stream_id;
You forgot to initialize this field in the constructor, causing the MSan error
at
https://build.chromium.org/p/chromium.memory.full/builders/Linux%20MSan%20Tes...:

Uninitialized bytes in __msan_check_mem_is_initialized at offset 0 inside
[0x7fbbe5ccde80, 4)
==1==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0xaf3e2ba in WriteBytesCommon base/pickle.cc:478:3
    #1 0xaf3e2ba in WriteBytesStatic<4> base/pickle.cc:443:0
    #2 0xf7f518f in WritePOD<int> base/pickle.h:367:5
    #3 0xf7f518f in WriteInt base/pickle.h:229:0
    #4 0xf7f518f in Write ipc/ipc_message_utils.h:177:0
    #5 0xf7f518f in WriteParam<int> ipc/ipc_message_utils.h:104:0
    #6 0xf7f518f in Write chrome/common/cast_messages.h:85:0
    #7 0xf7dee43 in WriteParam<media::cast::CastTransportRtpConfig>
ipc/ipc_message_utils.h:104:3
    #8 0xf7dee43 in Write ipc/ipc_message_utils.h:711:0
    #9 0xf7dee43 in WriteParam<std::__1::tuple<const int &, const
media::cast::CastTransportRtpConfig &> > ipc/ipc_message_utils.h:104:0
    #10 0xf7dee43 in MessageT ipc/ipc_message_templates_impl.h:29:0
    #11 0xc4ac6e6 in MessageT<true, false> ipc/ipc_message_templates.h:99:33
    #12 0xc4ac6e6 in InitializeStream
chrome/renderer/media/cast_transport_ipc.cc:48:0
    #13 0xad6d53d in FrameSender media/cast/sender/frame_sender.cc:97:21
    #14 0xad487bf in AudioSender media/cast/sender/audio_sender.cc:23:7
    #15 0xad3a9e4 in InitializeAudio media/cast/cast_sender_impl.cc:120:11
    #16 0xc4a6031 in StartAudio
chrome/renderer/media/cast_session_delegate.cc:127:17
    #17 0xb0e7e7d in Run base/callback.h:64:12
    #18 0xb0e7e7d in RunTask base/debug/task_annotator.cc:54:0
    #19 0xaece7ab in RunTask base/message_loop/message_loop.cc:488:19
    #20 0xaed02ea in DeferOrRunPendingTask
base/message_loop/message_loop.cc:497:5
    #21 0xaed1e6b in DoWork base/message_loop/message_loop.cc:621:13
    #22 0xaee2613 in Run base/message_loop/message_pump_libevent.cc:217:31
    #23 0xaf69a1c in Run base/run_loop.cc:35:10
    #24 0xb0110ac in ThreadMain base/threading/thread.cc:307:3
    #25 0xaffc645 in ThreadFunc base/threading/platform_thread_posix.cc:71:13
    #26 0x7fbbf2b46e99 in start_thread
/build/eglibc-oqps9y/eglibc-2.15/nptl/pthread_create.c:308:0
    #27 0x7fbbebf9636c in ??
/build/eglibc-oqps9y/eglibc-2.15/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:112:0

  Uninitialized value was stored to memory at
    #0 0xf7f54c1 in Write ipc/ipc_message_utils.h:177:64
    #1 0xf7f54c1 in WriteParam<int> ipc/ipc_message_utils.h:104:0
    #2 0xf7f54c1 in Write chrome/common/cast_messages.h:85:0
    #3 0xf7dee43 in WriteParam<media::cast::CastTransportRtpConfig>
ipc/ipc_message_utils.h:104:3
    #4 0xf7dee43 in Write ipc/ipc_message_utils.h:711:0
    #5 0xf7dee43 in WriteParam<std::__1::tuple<const int &, const
media::cast::CastTransportRtpConfig &> > ipc/ipc_message_utils.h:104:0
    #6 0xf7dee43 in MessageT ipc/ipc_message_templates_impl.h:29:0
    #7 0xc4ac6e6 in MessageT<true, false> ipc/ipc_message_templates.h:99:33
    #8 0xc4ac6e6 in InitializeStream
chrome/renderer/media/cast_transport_ipc.cc:48:0
    #9 0xad6d53d in FrameSender media/cast/sender/frame_sender.cc:97:21
    #10 0xad487bf in AudioSender media/cast/sender/audio_sender.cc:23:7
    #11 0xad3a9e4 in InitializeAudio media/cast/cast_sender_impl.cc:120:11
    #12 0xc4a6031 in StartAudio
chrome/renderer/media/cast_session_delegate.cc:127:17
    #13 0xb0e7e7d in Run base/callback.h:64:12
    #14 0xb0e7e7d in RunTask base/debug/task_annotator.cc:54:0
    #15 0xaece7ab in RunTask base/message_loop/message_loop.cc:488:19
    #16 0xaed02ea in DeferOrRunPendingTask
base/message_loop/message_loop.cc:497:5
    #17 0xaed1e6b in DoWork base/message_loop/message_loop.cc:621:13
    #18 0xaee2613 in Run base/message_loop/message_pump_libevent.cc:217:31
    #19 0xaf69a1c in Run base/run_loop.cc:35:10
    #20 0xb0110ac in ThreadMain base/threading/thread.cc:307:3
    #21 0xaffc645 in ThreadFunc base/threading/platform_thread_posix.cc:71:13
    #22 0x7fbbf2b46e99 in start_thread
/build/eglibc-oqps9y/eglibc-2.15/nptl/pthread_create.c:308:0

  Uninitialized value was created by an allocation of 'transport_config' in the
stack frame of function
'_ZN5media4cast11FrameSenderC2E13scoped_refptrINS0_15CastEnvironmentEEPNS0_13CastTransportERKNS0_17FrameSenderConfigEPNS0_17CongestionControlE'
    #0 0xad6c6e0 in FrameSender media/cast/sender/frame_sender.cc:78:0

SUMMARY: MemorySanitizer: use-of-uninitialized-value
(/b/swarm_slave/w/iriJwbdy/out/Release/browser_tests+0xaf3e2ba)

Powered by Google App Engine
This is Rietveld 408576698