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

Issue 1017503002: VideoCaptureHost/VideoCaptureControllerEventHandler cleanup (Closed)

Created:
5 years, 9 months ago by mcasas
Modified:
5 years, 9 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

VideoCaptureHost/VideoCaptureControllerEventHandler cleanup 1. VideoCaptureControllerID is a struct inside VCCEventHandler, just to wrap an int. It also defines operator< and operator== to enable using it in std::map. This is not needed, so I replaced it with a typedef int VideoCaptureControllerID; And s/const VideoCaptureControllerID&/VideoCaptureControllerID/ This enabled VideoCaptureControllerEventHandler to become a pure interface. Removed video_capture_controller_event_handler.cc. 2. VideoCaptureHost lives 100% in IO Thread, except ctor in UI thread. There's this idiom on IPC message sending where there's two methods OnBla() -> PostTask to DoBla() on IO -> Send msg. But all methods are living on IO and Send is asynchronous anyway, so those DoBla() dealing with Send() are folded into OnBla() methods -- trhose remain they mean basically a sophisticated DeleteLater(). 3. A few methods use base::TimeTicks as param, when they can use const base::TimeTicks&, replaced them (one less copy in the critical capture path). BUG=440843 Committed: https://crrev.com/abc12f001172a3df76199a07bc6972587a4f9775 Cr-Commit-Position: refs/heads/master@{#320933}

Patch Set 1 #

Patch Set 2 : Removed VCHost self PostTask()ing. Range-based loops in VCController. #

Patch Set 3 : s/base::TimeTicks/const base::TimeTicks&/, reinstalling OnEnded()/OnError->Do.. allowing for Delete… #

Total comments: 2

Patch Set 4 : Remove unneeded BindToCurrentLoop() #

Messages

Total messages: 10 (4 generated)
mcasas
tommi@/perkj@ PTAL.
5 years, 9 months ago (2015-03-17 03:42:39 UTC) #3
perkj_chrome
lgtm if the extra bindtocurrentloop is removed or clarified why its needed. https://codereview.chromium.org/1017503002/diff/60001/content/browser/renderer_host/media/video_capture_host.cc File content/browser/renderer_host/media/video_capture_host.cc ...
5 years, 9 months ago (2015-03-17 06:46:59 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1017503002/80001
5 years, 9 months ago (2015-03-17 15:57:24 UTC) #7
mcasas
https://codereview.chromium.org/1017503002/diff/60001/content/browser/renderer_host/media/video_capture_host.cc File content/browser/renderer_host/media/video_capture_host.cc (right): https://codereview.chromium.org/1017503002/diff/60001/content/browser/renderer_host/media/video_capture_host.cc#newcode201 content/browser/renderer_host/media/video_capture_host.cc:201: media::BindToCurrentLoop( On 2015/03/17 06:46:59, perkj wrote: > Why do ...
5 years, 9 months ago (2015-03-17 15:57:44 UTC) #8
commit-bot: I haz the power
Committed patchset #4 (id:80001)
5 years, 9 months ago (2015-03-17 17:30:03 UTC) #9
commit-bot: I haz the power
5 years, 9 months ago (2015-03-17 17:30:39 UTC) #10
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/abc12f001172a3df76199a07bc6972587a4f9775
Cr-Commit-Position: refs/heads/master@{#320933}

Powered by Google App Engine
This is Rietveld 408576698