| 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 14 matching lines...) Expand all Loading... |
| 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 RawVideoType rawType; |
| 35 VideoCodecType codecType; | |
| 36 bool interlaced; | 35 bool interlaced; |
| 37 | 36 |
| 38 VideoCaptureCapability() | 37 VideoCaptureCapability() |
| 39 { | 38 { |
| 40 width = 0; | 39 width = 0; |
| 41 height = 0; | 40 height = 0; |
| 42 maxFPS = 0; | 41 maxFPS = 0; |
| 43 rawType = kVideoUnknown; | 42 rawType = kVideoUnknown; |
| 44 codecType = kVideoCodecUnknown; | |
| 45 interlaced = false; | 43 interlaced = false; |
| 46 } | 44 } |
| 47 ; | 45 ; |
| 48 bool operator!=(const VideoCaptureCapability &other) const | 46 bool operator!=(const VideoCaptureCapability &other) const |
| 49 { | 47 { |
| 50 if (width != other.width) | 48 if (width != other.width) |
| 51 return true; | 49 return true; |
| 52 if (height != other.height) | 50 if (height != other.height) |
| 53 return true; | 51 return true; |
| 54 if (maxFPS != other.maxFPS) | 52 if (maxFPS != other.maxFPS) |
| 55 return true; | 53 return true; |
| 56 if (rawType != other.rawType) | 54 if (rawType != other.rawType) |
| 57 return true; | 55 return true; |
| 58 if (codecType != other.codecType) | |
| 59 return true; | |
| 60 if (interlaced != other.interlaced) | 56 if (interlaced != other.interlaced) |
| 61 return true; | 57 return true; |
| 62 return false; | 58 return false; |
| 63 } | 59 } |
| 64 bool operator==(const VideoCaptureCapability &other) const | 60 bool operator==(const VideoCaptureCapability &other) const |
| 65 { | 61 { |
| 66 return !operator!=(other); | 62 return !operator!=(other); |
| 67 } | 63 } |
| 68 }; | 64 }; |
| 69 | 65 |
| 70 /* External Capture interface. Returned by Create | 66 /* External Capture interface. Returned by Create |
| 71 and implemented by the capture module. | 67 and implemented by the capture module. |
| 72 */ | 68 */ |
| 73 class VideoCaptureExternal | 69 class VideoCaptureExternal |
| 74 { | 70 { |
| 75 public: | 71 public: |
| 76 // |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. |
| 77 virtual int32_t IncomingFrame(uint8_t* videoFrame, | 73 virtual int32_t IncomingFrame(uint8_t* videoFrame, |
| 78 size_t videoFrameLength, | 74 size_t videoFrameLength, |
| 79 const VideoCaptureCapability& frameInfo, | 75 const VideoCaptureCapability& frameInfo, |
| 80 int64_t captureTime = 0) = 0; | 76 int64_t captureTime = 0) = 0; |
| 81 protected: | 77 protected: |
| 82 ~VideoCaptureExternal() {} | 78 ~VideoCaptureExternal() {} |
| 83 }; | 79 }; |
| 84 | 80 |
| 85 } // namespace webrtc | 81 } // namespace webrtc |
| 86 | 82 |
| 87 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ | 83 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ |
| OLD | NEW |