
This reverts commit b49520bfc08f5c5832dda1d642125f0bb898f974. Reason for revert: Problem fixed in https://chromium-review.googlesource.com/c/chromium/src/+/1261398. Original change's description: > Revert "Reland "Export symbols needed by the Chromium component build (part 1)."" > > This reverts commit 588f4642d1a29f7beaf28265dbd08728191b4c52. > > Reason for revert: Breaks WebRTC Chromium FYI Win Builder (dbg). > lld-link: error: undefined symbol: "__declspec(dllimport) __thiscall webrtc::Config::Config(void)" (__imp_??0Config@webrtc@@QAE@XZ) > [...] > > Original change's description: > > Reland "Export symbols needed by the Chromium component build (part 1)." > > > > This reverts commit 2ea9af227517556136fd629dd2663c0d75d77c7b. > > > > Reason for revert: The problem will be fixed by > > https://chromium-review.googlesource.com/c/chromium/src/+/1261122. > > > > Original change's description: > > > Revert "Export symbols needed by the Chromium component build (part 1)." > > > > > > This reverts commit 9e24dcff167c4eb3555bf0ce6eaba090c10fbe53. > > > > > > Reason for revert: Breaks chromium.webrtc.fyi bots. > > > > > > Original change's description: > > > > Export symbols needed by the Chromium component build (part 1). > > > > > > > > This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h) > > > > to mark WebRTC symbols as visible from a shared library, this doesn't > > > > mean these symbols are part of the public API (please continue to refer > > > > to [1] for info about what is considered public WebRTC API). > > > > > > > > [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md > > > > > > > > Bug: webrtc:9419 > > > > Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99 > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103505 > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> > > > > Reviewed-by: Niels Moller <nisse@webrtc.org> > > > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > > > > Cr-Commit-Position: refs/heads/master@{#24969} > > > > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org > > > > > > Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: webrtc:9419 > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103720 > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> > > > Cr-Commit-Position: refs/heads/master@{#24974} > > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org > > > > Change-Id: I83bbc7f550fc23e823c4d055e0a6f60c828960dd > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: webrtc:9419 > > Reviewed-on: https://webrtc-review.googlesource.com/c/103740 > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24980} > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org > > Change-Id: I4b7cfe492f2c8eeda5c8ac52520e0cfc95ade9b0 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:9419 > Reviewed-on: https://webrtc-review.googlesource.com/c/103801 > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24983} TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:9419 Change-Id: Id986a0a03cdc2818690337784396882af067f7fa Reviewed-on: https://webrtc-review.googlesource.com/c/104602 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25049}
79 lines
3.0 KiB
C++
79 lines
3.0 KiB
C++
/*
|
|
* Copyright (c) 2013 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_DESKTOP_AND_CURSOR_COMPOSER_H_
|
|
#define MODULES_DESKTOP_CAPTURE_DESKTOP_AND_CURSOR_COMPOSER_H_
|
|
|
|
#include <memory>
|
|
|
|
#include "modules/desktop_capture/desktop_capture_options.h"
|
|
#include "modules/desktop_capture/desktop_capturer.h"
|
|
#include "modules/desktop_capture/mouse_cursor_monitor.h"
|
|
#include "rtc_base/constructormagic.h"
|
|
#include "rtc_base/system/rtc_export.h"
|
|
|
|
namespace webrtc {
|
|
|
|
// A wrapper for DesktopCapturer that also captures mouse using specified
|
|
// MouseCursorMonitor and renders it on the generated streams.
|
|
class RTC_EXPORT DesktopAndCursorComposer
|
|
: public DesktopCapturer,
|
|
public DesktopCapturer::Callback,
|
|
public MouseCursorMonitor::Callback {
|
|
public:
|
|
// Creates a new blender that captures mouse cursor using
|
|
// MouseCursorMonitor::Create(options) and renders it into the frames
|
|
// generated by |desktop_capturer|.
|
|
DesktopAndCursorComposer(std::unique_ptr<DesktopCapturer> desktop_capturer,
|
|
const DesktopCaptureOptions& options);
|
|
|
|
~DesktopAndCursorComposer() override;
|
|
|
|
// DesktopCapturer interface.
|
|
void Start(DesktopCapturer::Callback* callback) override;
|
|
void SetSharedMemoryFactory(
|
|
std::unique_ptr<SharedMemoryFactory> shared_memory_factory) override;
|
|
void CaptureFrame() override;
|
|
void SetExcludedWindow(WindowId window) override;
|
|
|
|
private:
|
|
// Allows test cases to use a fake MouseCursorMonitor implementation.
|
|
friend class DesktopAndCursorComposerTest;
|
|
|
|
// Constructor to delegate both deprecated and new constructors and allows
|
|
// test cases to use a fake MouseCursorMonitor implementation.
|
|
DesktopAndCursorComposer(DesktopCapturer* desktop_capturer,
|
|
MouseCursorMonitor* mouse_monitor);
|
|
|
|
// DesktopCapturer::Callback interface.
|
|
void OnCaptureResult(DesktopCapturer::Result result,
|
|
std::unique_ptr<DesktopFrame> frame) override;
|
|
|
|
// MouseCursorMonitor::Callback interface.
|
|
void OnMouseCursor(MouseCursor* cursor) override;
|
|
void OnMouseCursorPosition(MouseCursorMonitor::CursorState state,
|
|
const DesktopVector& position) override;
|
|
void OnMouseCursorPosition(const DesktopVector& position) override;
|
|
|
|
const std::unique_ptr<DesktopCapturer> desktop_capturer_;
|
|
const std::unique_ptr<MouseCursorMonitor> mouse_monitor_;
|
|
|
|
DesktopCapturer::Callback* callback_;
|
|
|
|
std::unique_ptr<MouseCursor> cursor_;
|
|
DesktopVector cursor_position_;
|
|
|
|
RTC_DISALLOW_COPY_AND_ASSIGN(DesktopAndCursorComposer);
|
|
};
|
|
|
|
} // namespace webrtc
|
|
|
|
#endif // MODULES_DESKTOP_CAPTURE_DESKTOP_AND_CURSOR_COMPOSER_H_
|