2022-01-21 08:58:04 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright 2022 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_SHARED_SCREENCAST_STREAM_H_
|
|
|
|
|
#define MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_SHARED_SCREENCAST_STREAM_H_
|
|
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
#include "api/ref_counted_base.h"
|
|
|
|
|
#include "api/scoped_refptr.h"
|
|
|
|
|
#include "modules/desktop_capture/desktop_frame.h"
|
|
|
|
|
#include "rtc_base/system/rtc_export.h"
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
class SharedScreenCastStreamPrivate;
|
|
|
|
|
|
|
|
|
|
class RTC_EXPORT SharedScreenCastStream
|
|
|
|
|
: public rtc::RefCountedNonVirtual<SharedScreenCastStream> {
|
|
|
|
|
public:
|
|
|
|
|
static rtc::scoped_refptr<SharedScreenCastStream> CreateDefault();
|
|
|
|
|
|
|
|
|
|
bool StartScreenCastStream(uint32_t stream_node_id, int fd);
|
|
|
|
|
void StopScreenCastStream();
|
2022-02-07 13:10:15 +01:00
|
|
|
std::unique_ptr<DesktopFrame> CaptureFrame();
|
2022-01-21 08:58:04 +01:00
|
|
|
|
|
|
|
|
~SharedScreenCastStream();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
SharedScreenCastStream();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
SharedScreenCastStream(const SharedScreenCastStream&) = delete;
|
|
|
|
|
SharedScreenCastStream& operator=(const SharedScreenCastStream&) = delete;
|
|
|
|
|
|
|
|
|
|
std::unique_ptr<SharedScreenCastStreamPrivate> private_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
#endif // MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_SHARED_SCREENCAST_STREAM_H_
|