OLD | NEW |
---|---|
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_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDL ER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDL ER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDL ER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDL ER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 29 matching lines...) Expand all Loading... | |
40 int buffer_id) = 0; | 40 int buffer_id) = 0; |
41 | 41 |
42 // A buffer has been filled with a captured VideoFrame. | 42 // A buffer has been filled with a captured VideoFrame. |
43 virtual void OnBufferReady(VideoCaptureControllerID id, | 43 virtual void OnBufferReady(VideoCaptureControllerID id, |
44 int buffer_id, | 44 int buffer_id, |
45 const scoped_refptr<media::VideoFrame>& frame) = 0; | 45 const scoped_refptr<media::VideoFrame>& frame) = 0; |
46 | 46 |
47 // The capture session has ended and no more frames will be sent. | 47 // The capture session has ended and no more frames will be sent. |
48 virtual void OnEnded(VideoCaptureControllerID id) = 0; | 48 virtual void OnEnded(VideoCaptureControllerID id) = 0; |
49 | 49 |
50 // VideoCaptureDevice has successfully started the device. | |
51 // OnStarted can be forwarded directly, while OnError&OnEnded need to be | |
52 // scheduled to the end of message queue to guarantee some other clearing | |
53 // jobs are done before they are handled. | |
54 virtual void OnStarted(VideoCaptureControllerID id) = 0; | |
chfremer
2017/02/17 23:51:14
The second sentence of the comment for this method
braveyao
2017/02/22 18:06:44
Done.
| |
55 | |
50 protected: | 56 protected: |
51 virtual ~VideoCaptureControllerEventHandler() {} | 57 virtual ~VideoCaptureControllerEventHandler() {} |
52 }; | 58 }; |
53 | 59 |
54 } // namespace content | 60 } // namespace content |
55 | 61 |
56 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA NDLER_H_ | 62 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA NDLER_H_ |
OLD | NEW |