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

Issue 398873005: Preparations for Cast Host Extension (Closed)

Created:
6 years, 5 months ago by aiguha
Modified:
6 years, 4 months ago
Reviewers:
Sergey Ulanov, Wez
CC:
chromium-reviews, chromoting-reviews_chromium.org, Wez
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Preparations for Cast Host Extension This CL contains all the modifications to existing code that are needed to make way for the CastHostExtension and related files. The extension is hidden behind a command line flag and without it, no modification affects regular functionality of the chromoting host.

Patch Set 1 #

Total comments: 3

Patch Set 2 : Added remoting_me2me_host #

Total comments: 19

Patch Set 3 : Clarified Cast Mode and Removed Me2Me Host #

Total comments: 8

Patch Set 4 : Removed enable-cast flag #

Patch Set 5 : Removed unnecessary getter methods #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -2 lines) Patch
M remoting/host/chromoting_host_context.cc View 1 chunk +2 lines, -2 lines 2 comments Download
M remoting/host/client_session.h View 1 2 3 4 2 chunks +5 lines, -0 lines 1 comment Download
M remoting/host/client_session.cc View 1 2 3 1 chunk +15 lines, -0 lines 2 comments Download

Messages

Total messages: 13 (0 generated)
aiguha
As planned, I'm breaking down the large CL of my work into several small CLs, ...
6 years, 5 months ago (2014-07-17 01:49:23 UTC) #1
aiguha
Added a small clarifying comment. https://codereview.chromium.org/398873005/diff/20001/remoting/host/remoting_me2me_host.cc File remoting/host/remoting_me2me_host.cc (right): https://codereview.chromium.org/398873005/diff/20001/remoting/host/remoting_me2me_host.cc#newcode1232 remoting/host/remoting_me2me_host.cc:1232: } Lines 1228-1230 are ...
6 years, 5 months ago (2014-07-17 17:51:03 UTC) #2
Sergey Ulanov
Instead of adding enable_cast_ flag, would it be easier to add something like "ReleaseScreenCapturer()" in ...
6 years, 5 months ago (2014-07-17 19:00:43 UTC) #3
Wez
https://codereview.chromium.org/398873005/diff/20001/remoting/host/chromoting_host.h File remoting/host/chromoting_host.h (right): https://codereview.chromium.org/398873005/diff/20001/remoting/host/chromoting_host.h#newcode160 remoting/host/chromoting_host.h:160: void set_enable_cast(bool enable) { Add a comment to explain ...
6 years, 5 months ago (2014-07-17 22:56:37 UTC) #4
aiguha
Cast-mode is now much better defined, in documentation and code. Switching from regular video streaming ...
6 years, 5 months ago (2014-07-18 21:30:37 UTC) #5
Sergey Ulanov
https://codereview.chromium.org/398873005/diff/40001/remoting/host/client_session.cc File remoting/host/client_session.cc (right): https://codereview.chromium.org/398873005/diff/40001/remoting/host/client_session.cc#newcode489 remoting/host/client_session.cc:489: if(!enable_cast_) { I still think you don't need this ...
6 years, 5 months ago (2014-07-24 19:11:37 UTC) #6
aiguha
I've removed the unnecessary usage of the enable_cast flag. The only remaining question is regarding ...
6 years, 4 months ago (2014-07-28 17:11:56 UTC) #7
Sergey Ulanov
https://codereview.chromium.org/398873005/diff/40001/remoting/host/client_session.h File remoting/host/client_session.h (right): https://codereview.chromium.org/398873005/diff/40001/remoting/host/client_session.h#newcode182 remoting/host/client_session.h:182: scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner() { On 2014/07/28 17:11:56, aiguha1 wrote: > ...
6 years, 4 months ago (2014-07-28 17:19:06 UTC) #8
aiguha
https://codereview.chromium.org/398873005/diff/40001/remoting/host/client_session.h File remoting/host/client_session.h (right): https://codereview.chromium.org/398873005/diff/40001/remoting/host/client_session.h#newcode182 remoting/host/client_session.h:182: scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner() { On 2014/07/28 17:19:06, Sergey Ulanov wrote: ...
6 years, 4 months ago (2014-07-28 17:44:34 UTC) #9
Sergey Ulanov
https://codereview.chromium.org/398873005/diff/80001/remoting/host/client_session.cc File remoting/host/client_session.cc (right): https://codereview.chromium.org/398873005/diff/80001/remoting/host/client_session.cc#newcode484 remoting/host/client_session.cc:484: scoped_ptr<webrtc::ScreenCapturer> ClientSession::RequestScreenCapturer() { After our discussion with Wez today, ...
6 years, 4 months ago (2014-07-29 06:59:18 UTC) #10
aiguha
Hey Wez, Sergey will be unavailable for the rest of the week. Would appreciate it ...
6 years, 4 months ago (2014-07-29 17:06:27 UTC) #11
Wez
Looks like this CL shouldn't be required, then? https://codereview.chromium.org/398873005/diff/80001/remoting/host/chromoting_host_context.cc File remoting/host/chromoting_host_context.cc (right): https://codereview.chromium.org/398873005/diff/80001/remoting/host/chromoting_host_context.cc#newcode38 remoting/host/chromoting_host_context.cc:38: "ChromotingCaptureThread", ...
6 years, 4 months ago (2014-08-01 01:14:14 UTC) #12
aiguha
6 years, 4 months ago (2014-08-02 01:18:05 UTC) #13
Yup, this CL is no longer needed. I'm now creating a worker thread inside
the CastExtensionSession itself. Still a few kinks to work out, but I think
it's clear that I need not modify the existing capture thread's
MessageLoopType. I'll go ahead and close this CL.


On Thu, Jul 31, 2014 at 6:14 PM, <wez@chromium.org> wrote:

> Looks like this CL shouldn't be required, then?
>
>
>
> https://codereview.chromium.org/398873005/diff/80001/
> remoting/host/chromoting_host_context.cc
> File remoting/host/chromoting_host_context.cc (right):
>
> https://codereview.chromium.org/398873005/diff/80001/
> remoting/host/chromoting_host_context.cc#newcode38
> remoting/host/chromoting_host_context.cc:38: "ChromotingCaptureThread",
> ui_task_runner_, base::MessageLoop::TYPE_IO);
> On 2014/07/29 17:06:26, aiguha wrote:
>
>> (Based on comment from previous patch, but modified).
>>
>
>  Discussed with wez@ offline but unresolved.
>> To summarize, the network and capture threads are provided to
>>
> PeerConnection as
>
>> signalling and worker threads respectively. During its ICE
>>
> establishment,
>
>> PeerConnection at some point calls
>> remoting::ChromiumSocketFactory::CreateUdpSocket() on the worker
>>
> thread
>
>> (capturer) and fails because of its non-IO MessageLoop. It looks like
>>
> this
>
>> method is called several times on the correct (network) thread (i.e.,
>>
> it being
>
>> called on this thread might be a webrtc bug), but I could be mistaken.
>>
>
> It may be possible to check in CreateUdpSocket() whether we're on an IO
> thread and have it immediately fail. Better still, let's get a
> call-stack for that case so we can determine whether it's a WebRTC bug.
> :)
>
>
>  Wez suggested we give PeerConnection two new chromium-compatible, IO
>>
> threads
>
>> rather than attempt to map our network/capture to their
>>
> signalling/worker. I
>
>> attempted to do this, but have three concerns:
>> 1. ChromotingHostContext manages all threads for the chromoting host
>>
> process, so
>
>> it seems incorrect to create threads outside of it, in a
>>
> HostExtensionSession. I
>
>> could create two additional threads in ChromotingHostContext and pass
>>
> them down,
>
>> but that sounds messy/overreaching for a HostExtension.
>>
>
> It's OK to have the extension create its own threads, if it really needs
> to.
>
>
>  2. Once CastExtensionSession gets a hold of a ScreenCapturer, it needs
>>
> to use
>
>> the existing capture thread (I believe) to capture frames. In the
>>
> current setup,
>
>> this constraint is satisfied. If we're creating new threads, I'm not
>>
> sure how
>
>> that would work.
>>
>
> When you "steal" the ScreenCapturer via the shiny new
> OnCreateScreenCapturer hook, you can use it on whichever thread you like
> so long as you also delete it on that thread.
>
>
>  3. Interaction between the ExtensionSession and ClientSession for
>> ExtensionMessages etc. needs to be on the network thread. Again, that
>>
> is true of
>
>> the current setup, but not sure how it would work in the alternative
>>
> one.
>
> Should be identical. There's nothing magical about the
> ChromotingHostContext's set of threads; it's really just a convenience
> class.
>
>
>  Any advice?
>>
>
> https://codereview.chromium.org/398873005/diff/80001/
> remoting/host/client_session.h
> File remoting/host/client_session.h (right):
>
> https://codereview.chromium.org/398873005/diff/80001/
> remoting/host/client_session.h#newcode171
> remoting/host/client_session.h:171: scoped_ptr<webrtc::ScreenCapturer>
> RequestScreenCapturer();
> We don't need this with the New Shiny OnCreateVideoCapturer hook for
> extensions.
>
> https://codereview.chromium.org/398873005/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698