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

Side by Side Diff: content/renderer/media/rtc_video_capture_delegate.h

Issue 13616004: Switch event type when a capture device has been stopped from the render process. This make sure th… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed code review comments. Created 7 years, 8 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 | Annotate | Revision Log
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 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_ 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "content/common/media/video_capture.h" 10 #include "content/common/media/video_capture.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const media::VideoCaptureParams& device_info) OVERRIDE; 56 const media::VideoCaptureParams& device_info) OVERRIDE;
57 57
58 private: 58 private:
59 friend class base::RefCountedThreadSafe<RtcVideoCaptureDelegate>; 59 friend class base::RefCountedThreadSafe<RtcVideoCaptureDelegate>;
60 60
61 virtual ~RtcVideoCaptureDelegate(); 61 virtual ~RtcVideoCaptureDelegate();
62 62
63 void OnBufferReadyOnCaptureThread( 63 void OnBufferReadyOnCaptureThread(
64 media::VideoCapture* capture, 64 media::VideoCapture* capture,
65 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf); 65 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf);
66 void OnErrorOnCaptureThread(media::VideoCapture* capture, int error_code); 66 void OnErrorOnCaptureThread(media::VideoCapture* capture);
67 void OnRemovedOnCaptureThread(media::VideoCapture* capture);
67 68
68 // The id identifies which video capture device is used for this video 69 // The id identifies which video capture device is used for this video
69 // capture session. 70 // capture session.
70 media::VideoCaptureSessionId session_id_; 71 media::VideoCaptureSessionId session_id_;
71 // The video capture manager handles open/close of video capture devices. 72 // The video capture manager handles open/close of video capture devices.
72 scoped_refptr<VideoCaptureImplManager> vc_manager_; 73 scoped_refptr<VideoCaptureImplManager> vc_manager_;
73 media::VideoCapture* capture_engine_; 74 media::VideoCapture* capture_engine_;
74 75
75 // Accessed on the thread where StartCapture is called. 76 // Accessed on the thread where StartCapture is called.
76 bool got_first_frame_; 77 bool got_first_frame_;
78 bool error_occured_;
77 79
78 // |captured_callback_| is provided to this class in StartCapture and must be 80 // |captured_callback_| is provided to this class in StartCapture and must be
79 // valid until StopCapture is called. 81 // valid until StopCapture is called.
80 FrameCapturedCallback captured_callback_; 82 FrameCapturedCallback captured_callback_;
81 // |state_callback_| is provided to this class in StartCapture and must be 83 // |state_callback_| is provided to this class in StartCapture and must be
82 // valid until StopCapture is called. 84 // valid until StopCapture is called.
83 StateChangeCallback state_callback_; 85 StateChangeCallback state_callback_;
84 // MessageLoop of the caller of StartCapture. 86 // MessageLoop of the caller of StartCapture.
85 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; 87 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
86 }; 88 };
87 89
88 } // namespace content 90 } // namespace content
89 91
90 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_ 92 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/common/media/video_capture.h ('k') | content/renderer/media/rtc_video_capture_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698