|
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
|
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
|
Total messages: 11 (0 generated)
|