Make DesktopFrame::CreateFromCGImage() accessible for external targets
The build target that CreateFromCGImage() belongs to, desktop_capture_obj is not visible externally. A utility header is created to make it accessible. Bug: chromium:1471931 Change-Id: Ie40f39114d277dc4b62fe2ce95a6b0c7b61a3943 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318123 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Auto-Submit: Johannes Kron <kron@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40659}
This commit is contained in:
parent
4ef01d41b7
commit
d23d450a50
@ -334,6 +334,8 @@ rtc_library("desktop_capture") {
|
||||
"mac/desktop_configuration.h",
|
||||
"mac/desktop_configuration_monitor.cc",
|
||||
"mac/desktop_configuration_monitor.h",
|
||||
"mac/desktop_frame_utils.cc",
|
||||
"mac/desktop_frame_utils.h",
|
||||
"mac/full_screen_mac_application_handler.cc",
|
||||
"mac/full_screen_mac_application_handler.h",
|
||||
"mac/window_list_utils.cc",
|
||||
|
||||
22
modules/desktop_capture/mac/desktop_frame_utils.cc
Normal file
22
modules/desktop_capture/mac/desktop_frame_utils.cc
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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.
|
||||
*/
|
||||
|
||||
#include "modules/desktop_capture/mac/desktop_frame_utils.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
std::unique_ptr<DesktopFrame> CreateDesktopFrameFromCGImage(
|
||||
rtc::ScopedCFTypeRef<CGImageRef> cg_image) {
|
||||
return DesktopFrameCGImage::CreateFromCGImage(cg_image);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
27
modules/desktop_capture/mac/desktop_frame_utils.h
Normal file
27
modules/desktop_capture/mac/desktop_frame_utils.h
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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_MAC_DESKTOP_FRAME_UTILS_H_
|
||||
#define MODULES_DESKTOP_CAPTURE_MAC_DESKTOP_FRAME_UTILS_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "modules/desktop_capture/desktop_frame.h"
|
||||
#include "modules/desktop_capture/mac/desktop_frame_cgimage.h"
|
||||
#include "rtc_base/system/rtc_export.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
std::unique_ptr<DesktopFrame> RTC_EXPORT
|
||||
CreateDesktopFrameFromCGImage(rtc::ScopedCFTypeRef<CGImageRef> cg_image);
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // MODULES_DESKTOP_CAPTURE_MAC_DESKTOP_FRAME_UTILS_H_
|
||||
Loading…
x
Reference in New Issue
Block a user