2 * Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
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.
10 #ifndef TEST_MAC_CAPTURER_H_
11 #define TEST_MAC_CAPTURER_H_
17 #include "api/media_stream_interface.h"
18 #include "api/scoped_refptr.h"
19 #include "modules/video_capture/video_capture.h"
20 #include "rtc_base/logging.h"
21 #include "rtc_base/thread.h"
22 #include "test/test_video_capturer.h"
27 class MacCapturer
: public TestVideoCapturer
,
28 public rtc::VideoSinkInterface
<VideoFrame
> {
30 static MacCapturer
* Create(size_t width
,
33 size_t capture_device_index
);
34 ~MacCapturer() override
;
36 void Start() override
{
37 RTC_LOG(LS_WARNING
) << "Capturer doesn't support resume/pause and always "
40 void Stop() override
{
41 RTC_LOG(LS_WARNING
) << "Capturer doesn't support resume/pause and always "
45 void OnFrame(const VideoFrame
& frame
) override
;
47 int GetFrameWidth() const override
{ return static_cast<int>(width_
); }
48 int GetFrameHeight() const override
{ return static_cast<int>(height_
); }
51 MacCapturer(size_t width
,
54 size_t capture_device_index
);
66 #endif // TEST_MAC_CAPTURER_H_