BlueGit

ict rusty-teams

Files

rusty-teams / vendor / webrtc-sys / include / livekit / sck_window_capturer.h

sck_window_capturer.h

sck_window_capturer.h 1.5 KiB Download Raw
1/*
2 * Copyright 2025 LiveKit, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
20
21#include <memory>
22
23#include "modules/desktop_capture/desktop_capture_options.h"
24#include "modules/desktop_capture/desktop_capturer.h"
25
26namespace livekit_ffi {
27
28enum class SckCaptureStatus {
29 kActive,
30 kPickerCancelled,
31 kStartFailed,
32 kStoppedByUser,
33 kWindowGone,
34 kInterrupted,
35};
36
37// ScreenCaptureKit single-window DesktopCapturer backed by
38// SCContentSharingPicker. WebRTC's DesktopCapturer::CreateWindowCapturer on
39// macOS only creates legacy WindowCapturerMac (CGWindowList without a system
40// picker).
41class SckWindowCapturer : public webrtc::DesktopCapturer {
42 public:
43 virtual SckCaptureStatus last_status() const = 0;
44};
45
46std::unique_ptr<SckWindowCapturer> CreateSckWindowCapturer(
47 const webrtc::DesktopCaptureOptions& options);
48
49} // namespace livekit_ffi
50
51#endif // defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)