• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "api/video/video_frame.h"
15 #include "common_video/libyuv/include/webrtc_libyuv.h"
16 
17 namespace webrtc {
18 
19 enum {
20   kVideoCaptureUniqueNameLength = 1024
21 };  // Max unique capture device name lenght
22 enum { kVideoCaptureDeviceNameLength = 256 };  // Max capture device name lenght
23 enum { kVideoCaptureProductIdLength = 128 };   // Max product id length
24 
25 struct VideoCaptureCapability {
26   int32_t width;
27   int32_t height;
28   int32_t maxFPS;
29   VideoType videoType;
30   bool interlaced;
31 
VideoCaptureCapabilityVideoCaptureCapability32   VideoCaptureCapability() {
33     width = 0;
34     height = 0;
35     maxFPS = 0;
36     videoType = VideoType::kUnknown;
37     interlaced = false;
38   }
39   bool operator!=(const VideoCaptureCapability& other) const {
40     if (width != other.width)
41       return true;
42     if (height != other.height)
43       return true;
44     if (maxFPS != other.maxFPS)
45       return true;
46     if (videoType != other.videoType)
47       return true;
48     if (interlaced != other.interlaced)
49       return true;
50     return false;
51   }
52   bool operator==(const VideoCaptureCapability& other) const {
53     return !operator!=(other);
54   }
55 };
56 
57 }  // namespace webrtc
58 
59 #endif  // MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEFINES_H_
60