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 13 matching lines...) Expand all Loading... |
24 | 24 |
25 enum {kVideoCaptureUniqueNameLength =1024}; //Max unique capture device name len
ght | 25 enum {kVideoCaptureUniqueNameLength =1024}; //Max unique capture device name len
ght |
26 enum {kVideoCaptureDeviceNameLength =256}; //Max capture device name lenght | 26 enum {kVideoCaptureDeviceNameLength =256}; //Max capture device name lenght |
27 enum {kVideoCaptureProductIdLength =128}; //Max product id length | 27 enum {kVideoCaptureProductIdLength =128}; //Max product id length |
28 | 28 |
29 struct VideoCaptureCapability | 29 struct VideoCaptureCapability |
30 { | 30 { |
31 int32_t width; | 31 int32_t width; |
32 int32_t height; | 32 int32_t height; |
33 int32_t maxFPS; | 33 int32_t maxFPS; |
34 RawVideoType rawType; | 34 VideoType videoType; |
35 bool interlaced; | 35 bool interlaced; |
36 | 36 |
37 VideoCaptureCapability() | 37 VideoCaptureCapability() |
38 { | 38 { |
39 width = 0; | 39 width = 0; |
40 height = 0; | 40 height = 0; |
41 maxFPS = 0; | 41 maxFPS = 0; |
42 rawType = kVideoUnknown; | 42 videoType = VideoType::kUnknown; |
43 interlaced = false; | 43 interlaced = false; |
44 } | 44 } |
45 ; | 45 ; |
46 bool operator!=(const VideoCaptureCapability &other) const | 46 bool operator!=(const VideoCaptureCapability &other) const |
47 { | 47 { |
48 if (width != other.width) | 48 if (width != other.width) |
49 return true; | 49 return true; |
50 if (height != other.height) | 50 if (height != other.height) |
51 return true; | 51 return true; |
52 if (maxFPS != other.maxFPS) | 52 if (maxFPS != other.maxFPS) |
53 return true; | 53 return true; |
54 if (rawType != other.rawType) | 54 if (videoType != other.videoType) |
55 return true; | 55 return true; |
56 if (interlaced != other.interlaced) | 56 if (interlaced != other.interlaced) |
57 return true; | 57 return true; |
58 return false; | 58 return false; |
59 } | 59 } |
60 bool operator==(const VideoCaptureCapability &other) const | 60 bool operator==(const VideoCaptureCapability &other) const |
61 { | 61 { |
62 return !operator!=(other); | 62 return !operator!=(other); |
63 } | 63 } |
64 }; | 64 }; |
65 | 65 |
66 /* External Capture interface. Returned by Create | 66 /* External Capture interface. Returned by Create |
67 and implemented by the capture module. | 67 and implemented by the capture module. |
68 */ | 68 */ |
69 class VideoCaptureExternal | 69 class VideoCaptureExternal |
70 { | 70 { |
71 public: | 71 public: |
72 // |capture_time| must be specified in the NTP time format in milliseconds. | 72 // |capture_time| must be specified in the NTP time format in milliseconds. |
73 virtual int32_t IncomingFrame(uint8_t* videoFrame, | 73 virtual int32_t IncomingFrame(uint8_t* videoFrame, |
74 size_t videoFrameLength, | 74 size_t videoFrameLength, |
75 const VideoCaptureCapability& frameInfo, | 75 const VideoCaptureCapability& frameInfo, |
76 int64_t captureTime = 0) = 0; | 76 int64_t captureTime = 0) = 0; |
77 protected: | 77 protected: |
78 ~VideoCaptureExternal() {} | 78 ~VideoCaptureExternal() {} |
79 }; | 79 }; |
80 | 80 |
81 } // namespace webrtc | 81 } // namespace webrtc |
82 | 82 |
83 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ | 83 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ |
OLD | NEW |