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

Issue 263323003: Revert of Refactor video capturing code in the render process (Closed)

Created:
6 years, 7 months ago by tonyg
Modified:
6 years, 7 months ago
CC:
chromium-reviews, fischman+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, perkj_chrome
Visibility:
Public.

Description

Revert of Refactor video capturing code in the render process (https://codereview.chromium.org/242013002/) Reason for revert: "FATAL:video_capture_impl.cc(140)] Check failed: removed. Removing a non-existent client." BUG=369129 TBR=hclam@chromium.org Original issue's description: > Refactor video capturing code in the render process > > This is a large refactoring to cleanup the code that handles video > capturing in the render process. The goal of this change is to: > * Simplify threading model for objects involved. > * Clarify ownership model. > * Remove extra complexity caused by media::VideoCapture. > > Summary of this change: > * Interface media::VideoCapture is removed completely. > This interface doesn't add much value. It fails to define threading > model and ownership. Some of the methods are obsolete. > * Pepper code that performs video capturing now do not inherit from > media::VideoCapture. > The inheritance is not necessary > * VideoCaptureImpl is now a purely IO thread object. > VideoCaptureImpl can only be accessed on the IO thread. It now becomes > and inner object of VideoCaptureImplManager. Client is not allowed to > access this object directly. This helps remove code that accepts > call from the render thread and hopping to the IO thread. This also > makes cleanup much simpler. > * VideoCaptureHandle is removed. > The function of VideoCaptureHandle, i.e. handle cleanup of video > capture resource is now folded into VideoCaptureImplManager. It's > function is now replaced by a closure. > * VideoCaptureImplManager becomes the public interface for accessing > video capture device and start/stop capture. > It takes VideoCaptureImpl as an internal object and sheild it from > clients. We can now perform cleanup to prevent leak. Also ensures > VideoCaptureImpl objects are deleted on the IO thread. > * VideoFrames delivery done using callback insteasd of an interface. > Using callback to deliver VideoFrames and state changes make thread > hopping much simpler. Clients no longer need to provide an > EventHandler interface. > * Net deleted 450 lines of code. > > Tested with apprtc.appspot.com and example pepper plugin. > Additional test to verify there's no leakage of VideoCaptureImpl objects. > > BUG=335327, 362558 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266492

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1194 lines, -844 lines) Patch
M content/browser/renderer_host/media/video_capture_controller.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/media/video_capture.h View 2 chunks +0 lines, -13 lines 0 comments Download
M content/renderer/media/media_stream_video_capture_source_unittest.cc View 3 chunks +7 lines, -7 lines 0 comments Download
M content/renderer/media/media_stream_video_capturer_source.h View 4 chunks +41 lines, -27 lines 0 comments Download
M content/renderer/media/media_stream_video_capturer_source.cc View 6 chunks +89 lines, -86 lines 0 comments Download
M content/renderer/media/media_stream_video_source.h View 1 chunk +1 line, -3 lines 0 comments Download
M content/renderer/media/media_stream_video_source.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/renderer/media/media_stream_video_source_unittest.cc View 4 chunks +4 lines, -7 lines 0 comments Download
M content/renderer/media/video_capture_impl.h View 6 chunks +50 lines, -59 lines 0 comments Download
M content/renderer/media/video_capture_impl.cc View 15 chunks +165 lines, -129 lines 0 comments Download
M content/renderer/media/video_capture_impl_manager.h View 3 chunks +45 lines, -61 lines 0 comments Download
M content/renderer/media/video_capture_impl_manager.cc View 2 chunks +62 lines, -135 lines 0 comments Download
M content/renderer/media/video_capture_impl_manager_unittest.cc View 7 chunks +36 lines, -54 lines 0 comments Download
M content/renderer/media/video_capture_impl_unittest.cc View 6 chunks +133 lines, -123 lines 0 comments Download
M content/renderer/media/video_capture_message_filter.h View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/webrtc/media_stream_remote_video_source.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/webrtc/video_destination_handler.cc View 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_platform_video_capture.h View 2 chunks +44 lines, -17 lines 0 comments Download
M content/renderer/pepper/pepper_platform_video_capture.cc View 5 chunks +92 lines, -62 lines 0 comments Download
M content/renderer/pepper/pepper_video_capture_host.h View 3 chunks +14 lines, -29 lines 0 comments Download
M content/renderer/pepper/pepper_video_capture_host.cc View 10 chunks +30 lines, -27 lines 0 comments Download
M media/media.gyp View 2 chunks +5 lines, -0 lines 0 comments Download
A media/video/capture/mock_video_capture_event_handler.h View 1 chunk +40 lines, -0 lines 0 comments Download
A media/video/capture/mock_video_capture_event_handler.cc View 1 chunk +15 lines, -0 lines 0 comments Download
A media/video/capture/video_capture.h View 1 chunk +95 lines, -0 lines 0 comments Download
A media/video/capture/video_capture_proxy.h View 1 chunk +85 lines, -0 lines 0 comments Download
A media/video/capture/video_capture_proxy.cc View 1 chunk +135 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
tonyg
Created Revert of Refactor video capturing code in the render process
6 years, 7 months ago (2014-05-05 23:16:33 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tonyg@chromium.org/263323003/1
6 years, 7 months ago (2014-05-05 23:17:50 UTC) #2
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-05 23:17:51 UTC) #3
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
6 years, 7 months ago (2014-05-05 23:17:52 UTC) #4
tonyg
The CQ bit was checked by tonyg@chromium.org
6 years, 7 months ago (2014-05-05 23:18:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tonyg@chromium.org/263323003/1
6 years, 7 months ago (2014-05-05 23:20:01 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-06 01:18:47 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #2). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-06 03:10:12 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-06 03:13:44 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_clang_dbg on tryserver.chromium
6 years, 7 months ago (2014-05-06 03:13:44 UTC) #10
Alpha Left Google
6 years, 7 months ago (2014-05-09 00:46:12 UTC) #11
This change should not be necessary now since the DCHECK is no more.

Powered by Google App Engine
This is Rietveld 408576698