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 "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "media/video/capture/video_capture_types.h" | 11 |
12 namespace gpu { | |
13 | |
wjia(left Chromium)
2014/02/19 22:05:19
nit: no blank line is needed here and below.
sheu
2014/02/19 23:18:35
Done.
| |
14 struct MailboxHolder; | |
15 | |
16 } // namespace gpu | |
17 | |
18 namespace media { | |
19 | |
20 class VideoCaptureFormat; | |
21 | |
22 } // namespace media | |
12 | 23 |
13 namespace content { | 24 namespace content { |
14 | 25 |
15 // ID used for identifying an object of VideoCaptureController. | 26 // ID used for identifying an object of VideoCaptureController. |
16 struct CONTENT_EXPORT VideoCaptureControllerID { | 27 struct CONTENT_EXPORT VideoCaptureControllerID { |
17 explicit VideoCaptureControllerID(int device_id); | 28 explicit VideoCaptureControllerID(int device_id); |
18 | 29 |
19 bool operator<(const VideoCaptureControllerID& vc) const; | 30 bool operator<(const VideoCaptureControllerID& vc) const; |
20 bool operator==(const VideoCaptureControllerID& vc) const; | 31 bool operator==(const VideoCaptureControllerID& vc) const; |
21 | 32 |
(...skipping 14 matching lines...) Expand all Loading... | |
36 int length, | 47 int length, |
37 int buffer_id) = 0; | 48 int buffer_id) = 0; |
38 | 49 |
39 // A previously created buffer has been freed and will no longer be used. | 50 // A previously created buffer has been freed and will no longer be used. |
40 virtual void OnBufferDestroyed(const VideoCaptureControllerID& id, | 51 virtual void OnBufferDestroyed(const VideoCaptureControllerID& id, |
41 int buffer_id) = 0; | 52 int buffer_id) = 0; |
42 | 53 |
43 // A buffer has been filled with I420 video. | 54 // A buffer has been filled with I420 video. |
44 virtual void OnBufferReady(const VideoCaptureControllerID& id, | 55 virtual void OnBufferReady(const VideoCaptureControllerID& id, |
45 int buffer_id, | 56 int buffer_id, |
46 base::TimeTicks timestamp, | 57 const media::VideoCaptureFormat& format, |
47 const media::VideoCaptureFormat& format) = 0; | 58 base::TimeTicks timestamp) = 0; |
59 | |
60 // A texture mailbox buffer has been filled with data. | |
61 virtual void OnMailboxBufferReady(const VideoCaptureControllerID& id, | |
62 int buffer_id, | |
63 const gpu::MailboxHolder& mailbox_holder, | |
64 const media::VideoCaptureFormat& format, | |
65 base::TimeTicks timestamp) = 0; | |
48 | 66 |
49 // The capture session has ended and no more frames will be sent. | 67 // The capture session has ended and no more frames will be sent. |
50 virtual void OnEnded(const VideoCaptureControllerID& id) = 0; | 68 virtual void OnEnded(const VideoCaptureControllerID& id) = 0; |
51 | 69 |
52 protected: | 70 protected: |
53 virtual ~VideoCaptureControllerEventHandler() {} | 71 virtual ~VideoCaptureControllerEventHandler() {} |
54 }; | 72 }; |
55 | 73 |
56 } // namespace content | 74 } // namespace content |
57 | 75 |
58 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA NDLER_H_ | 76 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA NDLER_H_ |
OLD | NEW |