OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/shared_memory.h" | 8 #include "base/shared_memory.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 | 10 |
11 // ID used for identifying an object of VideoCaptureController. | 11 // ID used for identifying an object of VideoCaptureController. |
12 struct VideoCaptureControllerID { | 12 struct VideoCaptureControllerID { |
13 VideoCaptureControllerID(int32 routing_id, int device_id); | 13 VideoCaptureControllerID(int device_id); |
14 | 14 |
15 bool operator<(const VideoCaptureControllerID& vc) const; | 15 bool operator<(const VideoCaptureControllerID& vc) const; |
16 | 16 |
17 int32 routing_id; | |
18 int device_id; | 17 int device_id; |
19 }; | 18 }; |
20 | 19 |
21 // VideoCaptureControllerEventHandler is the interface for | 20 // VideoCaptureControllerEventHandler is the interface for |
22 // VideoCaptureController to notify clients about the events such as | 21 // VideoCaptureController to notify clients about the events such as |
23 // BufferReady, FrameInfo, Error, etc. | 22 // BufferReady, FrameInfo, Error, etc. |
24 class VideoCaptureControllerEventHandler { | 23 class VideoCaptureControllerEventHandler { |
25 public: | 24 public: |
26 // An Error has occurred in the VideoCaptureDevice. | 25 // An Error has occurred in the VideoCaptureDevice. |
27 virtual void OnError(const VideoCaptureControllerID& id) = 0; | 26 virtual void OnError(const VideoCaptureControllerID& id) = 0; |
(...skipping 15 matching lines...) Expand all Loading... |
43 int frame_rate) = 0; | 42 int frame_rate) = 0; |
44 | 43 |
45 // Report that this object can be deleted. | 44 // Report that this object can be deleted. |
46 virtual void OnReadyToDelete(const VideoCaptureControllerID& id) = 0; | 45 virtual void OnReadyToDelete(const VideoCaptureControllerID& id) = 0; |
47 | 46 |
48 protected: | 47 protected: |
49 virtual ~VideoCaptureControllerEventHandler() {} | 48 virtual ~VideoCaptureControllerEventHandler() {} |
50 }; | 49 }; |
51 | 50 |
52 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA
NDLER_H_ | 51 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA
NDLER_H_ |
OLD | NEW |