video_capture_defines.h (1671B)
1 /* 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ 12 #define MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_ 13 14 #include <cstdint> 15 16 #include "common_video/libyuv/include/webrtc_libyuv.h" 17 18 namespace webrtc { 19 20 enum { 21 kVideoCaptureUniqueNameLength = 1024 22 }; // Max unique capture device name lenght 23 enum { kVideoCaptureDeviceNameLength = 256 }; // Max capture device name lenght 24 enum { kVideoCaptureProductIdLength = 128 }; // Max product id length 25 26 struct VideoCaptureCapability { 27 int32_t width; 28 int32_t height; 29 int32_t maxFPS; 30 VideoType videoType; 31 bool interlaced; 32 33 VideoCaptureCapability() { 34 width = 0; 35 height = 0; 36 maxFPS = 0; 37 videoType = VideoType::kUnknown; 38 interlaced = false; 39 } 40 bool operator!=(const VideoCaptureCapability& other) const { 41 if (width != other.width) 42 return true; 43 if (height != other.height) 44 return true; 45 if (maxFPS != other.maxFPS) 46 return true; 47 if (videoType != other.videoType) 48 return true; 49 if (interlaced != other.interlaced) 50 return true; 51 return false; 52 } 53 bool operator==(const VideoCaptureCapability& other) const { 54 return !operator!=(other); 55 } 56 }; 57 58 } // namespace webrtc 59 60 #endif // MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_