OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 if (interlaced != other.interlaced) | 62 if (interlaced != other.interlaced) |
63 return true; | 63 return true; |
64 return false; | 64 return false; |
65 } | 65 } |
66 bool operator==(const VideoCaptureCapability &other) const | 66 bool operator==(const VideoCaptureCapability &other) const |
67 { | 67 { |
68 return !operator!=(other); | 68 return !operator!=(other); |
69 } | 69 } |
70 }; | 70 }; |
71 | 71 |
72 enum VideoCaptureAlarm | |
73 { | |
74 Raised = 0, | |
75 Cleared = 1 | |
76 }; | |
77 | |
78 /* External Capture interface. Returned by Create | 72 /* External Capture interface. Returned by Create |
79 and implemented by the capture module. | 73 and implemented by the capture module. |
80 */ | 74 */ |
81 class VideoCaptureExternal | 75 class VideoCaptureExternal |
82 { | 76 { |
83 public: | 77 public: |
84 // |capture_time| must be specified in the NTP time format in milliseconds. | 78 // |capture_time| must be specified in the NTP time format in milliseconds. |
85 virtual int32_t IncomingFrame(uint8_t* videoFrame, | 79 virtual int32_t IncomingFrame(uint8_t* videoFrame, |
86 size_t videoFrameLength, | 80 size_t videoFrameLength, |
87 const VideoCaptureCapability& frameInfo, | 81 const VideoCaptureCapability& frameInfo, |
88 int64_t captureTime = 0) = 0; | 82 int64_t captureTime = 0) = 0; |
89 protected: | 83 protected: |
90 ~VideoCaptureExternal() {} | 84 ~VideoCaptureExternal() {} |
91 }; | 85 }; |
92 | 86 |
93 // Callback class to be implemented by module user | |
94 class VideoCaptureDataCallback | |
95 { | |
96 public: | |
97 virtual void OnIncomingCapturedFrame(const int32_t id, | |
98 const VideoFrame& videoFrame) = 0; | |
99 virtual void OnCaptureDelayChanged(const int32_t id, | |
100 const int32_t delay) = 0; | |
101 protected: | |
102 virtual ~VideoCaptureDataCallback(){} | |
103 }; | |
104 | |
105 class VideoCaptureFeedBack | |
106 { | |
107 public: | |
108 virtual void OnCaptureFrameRate(const int32_t id, | |
109 const uint32_t frameRate) = 0; | |
110 virtual void OnNoPictureAlarm(const int32_t id, | |
111 const VideoCaptureAlarm alarm) = 0; | |
112 protected: | |
113 virtual ~VideoCaptureFeedBack(){} | |
114 }; | |
115 | |
116 } // namespace webrtc | 87 } // namespace webrtc |
117 | 88 |
118 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ | 89 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ |
OLD | NEW |