mac_capturer.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) 2019 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 TEST_MAC_CAPTURER_H_
  11. #define TEST_MAC_CAPTURER_H_
  12. #include <memory>
  13. #include <vector>
  14. #include "api/media_stream_interface.h"
  15. #include "api/scoped_refptr.h"
  16. #include "modules/video_capture/video_capture.h"
  17. #include "rtc_base/thread.h"
  18. #include "test/test_video_capturer.h"
  19. namespace webrtc {
  20. namespace test {
  21. class MacCapturer : public TestVideoCapturer,
  22. public rtc::VideoSinkInterface<VideoFrame> {
  23. public:
  24. static MacCapturer* Create(size_t width,
  25. size_t height,
  26. size_t target_fps,
  27. size_t capture_device_index);
  28. ~MacCapturer() override;
  29. void OnFrame(const VideoFrame& frame) override;
  30. private:
  31. MacCapturer(size_t width,
  32. size_t height,
  33. size_t target_fps,
  34. size_t capture_device_index);
  35. void Destroy();
  36. void* capturer_;
  37. void* adapter_;
  38. };
  39. } // namespace test
  40. } // namespace webrtc
  41. #endif // TEST_MAC_CAPTURER_H_