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 // This file contains abstract classes used for media filter to handle video | 5 // This file contains abstract classes used for media filter to handle video |
6 // capture devices. | 6 // capture devices. |
7 | 7 |
8 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ | 8 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ |
9 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ | 9 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 base::Time timestamp; | 36 base::Time timestamp; |
37 | 37 |
38 private: | 38 private: |
39 friend class base::RefCountedThreadSafe<VideoFrameBuffer>; | 39 friend class base::RefCountedThreadSafe<VideoFrameBuffer>; |
40 ~VideoFrameBuffer() {} | 40 ~VideoFrameBuffer() {} |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(VideoFrameBuffer); | 42 DISALLOW_COPY_AND_ASSIGN(VideoFrameBuffer); |
43 }; | 43 }; |
44 | 44 |
45 // TODO(wjia): add error codes. | 45 // TODO(wjia): add error codes. |
| 46 // TODO(wjia): support weak ptr. |
46 // Callbacks provided by client for notification of events. | 47 // Callbacks provided by client for notification of events. |
47 class MEDIA_EXPORT EventHandler { | 48 class MEDIA_EXPORT EventHandler { |
48 public: | 49 public: |
49 // Notify client that video capture has been started. | 50 // Notify client that video capture has been started. |
50 virtual void OnStarted(VideoCapture* capture) = 0; | 51 virtual void OnStarted(VideoCapture* capture) = 0; |
51 | 52 |
52 // Notify client that video capture has been stopped. | 53 // Notify client that video capture has been stopped. |
53 virtual void OnStopped(VideoCapture* capture) = 0; | 54 virtual void OnStopped(VideoCapture* capture) = 0; |
54 | 55 |
55 // Notify client that video capture has been paused. | 56 // Notify client that video capture has been paused. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 protected: | 99 protected: |
99 virtual ~VideoCapture() {} | 100 virtual ~VideoCapture() {} |
100 | 101 |
101 private: | 102 private: |
102 DISALLOW_COPY_AND_ASSIGN(VideoCapture); | 103 DISALLOW_COPY_AND_ASSIGN(VideoCapture); |
103 }; | 104 }; |
104 | 105 |
105 } // namespace media | 106 } // namespace media |
106 | 107 |
107 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ | 108 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ |
OLD | NEW |