video_capture_defines.h 1.6 KB

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