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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.h

Issue 2643463002: Fix for Crash in VideoCaptureController::DoNewBufferOnIOThread (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // VideoCaptureController is the glue between a VideoCaptureDevice and all 5 // VideoCaptureController is the glue between a VideoCaptureDevice and all
6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of 6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of
7 // one (and only one) VideoCaptureDevice; both are owned by the 7 // one (and only one) VideoCaptureDevice; both are owned by the
8 // VideoCaptureManager. 8 // VideoCaptureManager.
9 // 9 //
10 // The VideoCaptureController is responsible for: 10 // The VideoCaptureController is responsible for:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 namespace content { 61 namespace content {
62 62
63 class CONTENT_EXPORT VideoCaptureController : public media::VideoFrameReceiver { 63 class CONTENT_EXPORT VideoCaptureController : public media::VideoFrameReceiver {
64 public: 64 public:
65 VideoCaptureController(); 65 VideoCaptureController();
66 ~VideoCaptureController() override; 66 ~VideoCaptureController() override;
67 67
68 base::WeakPtr<VideoCaptureController> GetWeakPtrForIOThread(); 68 base::WeakPtr<VideoCaptureController> GetWeakPtrForIOThread();
69 69
70 // Factory code creating instances of VideoCaptureController must set a 70 // A FrameBufferPool must to be set in order for video frames to be
71 // FrameBufferPool before any of the media::VideoFrameReceiver are used. 71 // processed. While no FrameBufferPool is set, incoming video frames are
72 // Setting the observer is done in this method separate from the constructor 72 // ignored. It is legal to reset a previously set FrameBufferPool by calling
73 // in order to allow use the media::VideoFrameReceiver methods 73 // this method with a nullptr.
74 // before the observer can be provided. (This is the case with
75 // VideoCaptureManager).
76 void SetFrameBufferPool( 74 void SetFrameBufferPool(
77 std::unique_ptr<media::FrameBufferPool> frame_buffer_pool); 75 std::unique_ptr<media::FrameBufferPool> frame_buffer_pool);
78 76
79 // Factory code creating instances of VideoCaptureController may optionally 77 // Factory code creating instances of VideoCaptureController may optionally
80 // set a VideoFrameConsumerFeedbackObserver. Setting the observer is done in 78 // set a VideoFrameConsumerFeedbackObserver. Setting the observer is done in
81 // this method separate from the constructor to allow clients to create and 79 // this method separate from the constructor to allow clients to create and
82 // use instances before they can provide the observer. (This is the case with 80 // use instances before they can provide the observer. (This is the case with
83 // VideoCaptureManager). 81 // VideoCaptureManager).
84 void SetConsumerFeedbackObserver( 82 void SetConsumerFeedbackObserver(
85 std::unique_ptr<media::VideoFrameConsumerFeedbackObserver> observer); 83 std::unique_ptr<media::VideoFrameConsumerFeedbackObserver> observer);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 media::VideoCaptureFormat video_capture_format_; 204 media::VideoCaptureFormat video_capture_format_;
207 205
208 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; 206 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_;
209 207
210 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); 208 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController);
211 }; 209 };
212 210
213 } // namespace content 211 } // namespace content
214 212
215 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 213 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698