2013-04-29 20:10:57 +00:00
|
|
|
/*
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_
|
|
|
|
|
#define MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_
|
2013-04-29 20:10:57 +00:00
|
|
|
|
2018-11-28 16:47:49 +01:00
|
|
|
#include <stdint.h>
|
2019-07-05 19:08:33 +02:00
|
|
|
|
2016-03-16 15:58:08 -07:00
|
|
|
#include <memory>
|
2019-04-19 14:32:56 -07:00
|
|
|
#include <vector>
|
2016-03-16 15:58:08 -07:00
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/desktop_capture/desktop_geometry.h"
|
|
|
|
|
#include "modules/desktop_capture/desktop_region.h"
|
|
|
|
|
#include "modules/desktop_capture/shared_memory.h"
|
Reland "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 16fe3f290a524a136f71660a114d0b03ef501f10.
Reason for revert:
After discussing this problem with nisse@ and yvesg@, we decided to modify
how RTC_EXPORT works and avoid to depend on the macro COMPONENT_BUILD.
RTC_EXPORT will instead depend on a macro WEBRTC_COMPONENT_BUILD (which
can be set as a GN argument which defaults to false).
When all the symbols needed by Chromium will be marked with RTC_EXPORT we
will flip the GN arg in Chromium, setting to to `component_build` and from
that moment, Chromium will depend on a WebRTC shared library when
`component_build=true`.
Original change's description:
> Revert "Export symbols needed by the Chromium component build (part 1)."
>
> This reverts commit 99eea42fc1fe0be0ebed13c5eba7e1e42059bc5a.
>
> Reason for revert:
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::UnwrapTurnPacket(unsigned char const *, unsigned int, unsigned int *, unsigned int *)" (__imp_?UnwrapTurnPacket@cricket@@YA_NPBEIPAI1@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ValidateRtpHeader(unsigned char const *, unsigned int, unsigned int *)" (__imp_?ValidateRtpHeader@cricket@@YA_NPBEIPAI@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketStunTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketStunTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_udp.obj:("bool __thiscall network::P2PSocketUdp::DoSend(struct network::P2PSocketUdp::PendingPacket const &)" (?DoSend@P2PSocketUdp@network@@AAE_NABUPendingPacket@12@@Z))
>
> Original change's description:
> > Reland "Reland "Export symbols needed by the Chromium component build (part 1).""
> >
> > 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}
>
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
>
> Change-Id: I6f58b9c90defccdb160307783fb55271ab424fa1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/104623
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25050}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
Change-Id: I4d01ed96ae40a8f9ca42c466be5c87653d75d7c1
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/104641
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25108}
2018-10-11 10:50:45 +02:00
|
|
|
#include "rtc_base/system/rtc_export.h"
|
2013-04-29 20:10:57 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2019-04-02 10:01:36 -07:00
|
|
|
const float kStandardDPI = 96.0f;
|
2018-05-17 10:30:35 -07:00
|
|
|
|
2013-04-29 20:10:57 +00:00
|
|
|
// DesktopFrame represents a video frame captured from the screen.
|
Reland "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 16fe3f290a524a136f71660a114d0b03ef501f10.
Reason for revert:
After discussing this problem with nisse@ and yvesg@, we decided to modify
how RTC_EXPORT works and avoid to depend on the macro COMPONENT_BUILD.
RTC_EXPORT will instead depend on a macro WEBRTC_COMPONENT_BUILD (which
can be set as a GN argument which defaults to false).
When all the symbols needed by Chromium will be marked with RTC_EXPORT we
will flip the GN arg in Chromium, setting to to `component_build` and from
that moment, Chromium will depend on a WebRTC shared library when
`component_build=true`.
Original change's description:
> Revert "Export symbols needed by the Chromium component build (part 1)."
>
> This reverts commit 99eea42fc1fe0be0ebed13c5eba7e1e42059bc5a.
>
> Reason for revert:
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::UnwrapTurnPacket(unsigned char const *, unsigned int, unsigned int *, unsigned int *)" (__imp_?UnwrapTurnPacket@cricket@@YA_NPBEIPAI1@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ValidateRtpHeader(unsigned char const *, unsigned int, unsigned int *)" (__imp_?ValidateRtpHeader@cricket@@YA_NPBEIPAI@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketStunTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketStunTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_udp.obj:("bool __thiscall network::P2PSocketUdp::DoSend(struct network::P2PSocketUdp::PendingPacket const &)" (?DoSend@P2PSocketUdp@network@@AAE_NABUPendingPacket@12@@Z))
>
> Original change's description:
> > Reland "Reland "Export symbols needed by the Chromium component build (part 1).""
> >
> > 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}
>
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
>
> Change-Id: I6f58b9c90defccdb160307783fb55271ab424fa1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/104623
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25050}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
Change-Id: I4d01ed96ae40a8f9ca42c466be5c87653d75d7c1
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/104641
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25108}
2018-10-11 10:50:45 +02:00
|
|
|
class RTC_EXPORT DesktopFrame {
|
2013-04-29 20:10:57 +00:00
|
|
|
public:
|
2020-10-01 13:47:54 -07:00
|
|
|
// DesktopFrame objects always hold BGRA data.
|
2013-04-29 20:10:57 +00:00
|
|
|
static const int kBytesPerPixel = 4;
|
|
|
|
|
|
|
|
|
|
virtual ~DesktopFrame();
|
|
|
|
|
|
2022-01-21 09:49:39 +09:00
|
|
|
DesktopFrame(const DesktopFrame&) = delete;
|
|
|
|
|
DesktopFrame& operator=(const DesktopFrame&) = delete;
|
|
|
|
|
|
2018-05-17 10:30:35 -07:00
|
|
|
// Returns the rectangle in full desktop coordinates to indicate it covers
|
|
|
|
|
// the area of top_left() to top_letf() + size() / scale_factor().
|
2017-08-29 18:03:46 -07:00
|
|
|
DesktopRect rect() const;
|
|
|
|
|
|
2018-05-17 10:30:35 -07:00
|
|
|
// Returns the scale factor from DIPs to physical pixels of the frame.
|
|
|
|
|
// Assumes same scale in both X and Y directions at present.
|
|
|
|
|
float scale_factor() const;
|
|
|
|
|
|
|
|
|
|
// Size of the frame. In physical coordinates, mapping directly from the
|
|
|
|
|
// underlying buffer.
|
Add DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom()
The original change https://chromium-review.googlesource.com/c/575315 and
https://chromium-review.googlesource.com/c/590508 have not been well-considered.
So this change reverts part of two changes and adds a
DesktopFrame::set_top_left() function
A DesktopFrame usually contains a very large chunk of memory, which should be
reused as much as possible to reduce the memory allocations. The size of the
memory usually controls by the DesktopFrame::size(). So it's reasonable to const
DesktopFrame::size_: changing it is wrong if the underly buffer is not large
enough.
But DesktopFrame::top_left() is a different story, same as capturer_id,
capture_time_ms and other information in the DesktopFrame, it can be changed to
any value without needing to reconstruct a DesktopFrame instance. So instead of
adding it to the constructor, a DesktopFrame::set_top_left() is added to adjust
the top-left of the DesktopFrame in the entire display coordinate.
After adding DesktopFrame::set_top_left(), we have five variables in a
DesktopFrame which is not initialized in the constructor. For any kind of
wrapper DesktopFrame, say, SharedDesktopFrame and CroppedDesktopFrame, they
needs to copy these five variables after constructing themselves. This is not
convenient and easily to be broken if an implementation forgot to copy them.
So DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom() are
added to the DesktopFrame to help derived classes to copy or move these
variables in one function call.
The difference between MoveFrameInfoFrom() and CopyFrameInfoFrom() is that the
former one uses DesktopRegion::Swap() to move the DesktopRegion from the source
DesktopFrame to this instance, while the later one uses copy-operator to copy
the DesktopRegion from the source DesktopFrame.
So CopyFrameInfoFrom() is usually used when sharing a source DesktopFrame with
several clients. I.e. the source DesktopFrame should be kept unchanged. For
example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
On the other side, MoveFrameInfoFrom() is usually used when wrapping a
DesktopFrame. E.g. CroppedDesktopFrame and DesktopFrameWithCursor.
Bug: webrtc:7950
Change-Id: I8b23418960fb681d2ea1f012d1b453f514da2272
Reviewed-on: https://chromium-review.googlesource.com/622453
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19504}
2017-08-24 12:41:53 -07:00
|
|
|
const DesktopSize& size() const { return size_; }
|
2017-07-21 14:13:46 -07:00
|
|
|
|
|
|
|
|
// The top-left of the frame in full desktop coordinates. E.g. the top left
|
2018-05-17 10:30:35 -07:00
|
|
|
// monitor should start from (0, 0). The desktop coordinates may be scaled by
|
|
|
|
|
// OS, but this is always consistent with the MouseCursorMonitor.
|
Add DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom()
The original change https://chromium-review.googlesource.com/c/575315 and
https://chromium-review.googlesource.com/c/590508 have not been well-considered.
So this change reverts part of two changes and adds a
DesktopFrame::set_top_left() function
A DesktopFrame usually contains a very large chunk of memory, which should be
reused as much as possible to reduce the memory allocations. The size of the
memory usually controls by the DesktopFrame::size(). So it's reasonable to const
DesktopFrame::size_: changing it is wrong if the underly buffer is not large
enough.
But DesktopFrame::top_left() is a different story, same as capturer_id,
capture_time_ms and other information in the DesktopFrame, it can be changed to
any value without needing to reconstruct a DesktopFrame instance. So instead of
adding it to the constructor, a DesktopFrame::set_top_left() is added to adjust
the top-left of the DesktopFrame in the entire display coordinate.
After adding DesktopFrame::set_top_left(), we have five variables in a
DesktopFrame which is not initialized in the constructor. For any kind of
wrapper DesktopFrame, say, SharedDesktopFrame and CroppedDesktopFrame, they
needs to copy these five variables after constructing themselves. This is not
convenient and easily to be broken if an implementation forgot to copy them.
So DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom() are
added to the DesktopFrame to help derived classes to copy or move these
variables in one function call.
The difference between MoveFrameInfoFrom() and CopyFrameInfoFrom() is that the
former one uses DesktopRegion::Swap() to move the DesktopRegion from the source
DesktopFrame to this instance, while the later one uses copy-operator to copy
the DesktopRegion from the source DesktopFrame.
So CopyFrameInfoFrom() is usually used when sharing a source DesktopFrame with
several clients. I.e. the source DesktopFrame should be kept unchanged. For
example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
On the other side, MoveFrameInfoFrom() is usually used when wrapping a
DesktopFrame. E.g. CroppedDesktopFrame and DesktopFrameWithCursor.
Bug: webrtc:7950
Change-Id: I8b23418960fb681d2ea1f012d1b453f514da2272
Reviewed-on: https://chromium-review.googlesource.com/622453
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19504}
2017-08-24 12:41:53 -07:00
|
|
|
const DesktopVector& top_left() const { return top_left_; }
|
|
|
|
|
void set_top_left(const DesktopVector& top_left) { top_left_ = top_left; }
|
2013-04-29 20:10:57 +00:00
|
|
|
|
|
|
|
|
// Distance in the buffer between two neighboring rows in bytes.
|
|
|
|
|
int stride() const { return stride_; }
|
|
|
|
|
|
|
|
|
|
// Data buffer used for the frame.
|
|
|
|
|
uint8_t* data() const { return data_; }
|
|
|
|
|
|
|
|
|
|
// SharedMemory used for the buffer or NULL if memory is allocated on the
|
|
|
|
|
// heap. The result is guaranteed to be deleted only after the frame is
|
|
|
|
|
// deleted (classes that inherit from DesktopFrame must ensure it).
|
|
|
|
|
SharedMemory* shared_memory() const { return shared_memory_; }
|
|
|
|
|
|
|
|
|
|
// Indicates region of the screen that has changed since the previous frame.
|
|
|
|
|
const DesktopRegion& updated_region() const { return updated_region_; }
|
|
|
|
|
DesktopRegion* mutable_updated_region() { return &updated_region_; }
|
|
|
|
|
|
|
|
|
|
// DPI of the screen being captured. May be set to zero, e.g. if DPI is
|
|
|
|
|
// unknown.
|
|
|
|
|
const DesktopVector& dpi() const { return dpi_; }
|
|
|
|
|
void set_dpi(const DesktopVector& dpi) { dpi_ = dpi; }
|
|
|
|
|
|
2021-04-15 16:15:52 -07:00
|
|
|
// Indicates if this frame may have the mouse cursor in it. Capturers that
|
|
|
|
|
// support cursor capture may set this to true. If the cursor was
|
|
|
|
|
// outside of the captured area, this may be true even though the cursor is
|
|
|
|
|
// not in the image.
|
|
|
|
|
bool may_contain_cursor() const { return may_contain_cursor_; }
|
|
|
|
|
void set_may_contain_cursor(bool may_contain_cursor) {
|
|
|
|
|
may_contain_cursor_ = may_contain_cursor;
|
|
|
|
|
}
|
|
|
|
|
|
2013-04-29 20:10:57 +00:00
|
|
|
// Time taken to capture the frame in milliseconds.
|
2015-01-12 21:51:21 +00:00
|
|
|
int64_t capture_time_ms() const { return capture_time_ms_; }
|
|
|
|
|
void set_capture_time_ms(int64_t time_ms) { capture_time_ms_ = time_ms; }
|
2013-04-29 20:10:57 +00:00
|
|
|
|
2021-07-28 23:35:39 +02:00
|
|
|
// Copies pixels from a buffer or another frame. `dest_rect` rect must lay
|
2013-11-19 02:15:47 +00:00
|
|
|
// within bounds of this frame.
|
2016-09-21 16:44:55 -07:00
|
|
|
void CopyPixelsFrom(const uint8_t* src_buffer,
|
2016-05-20 22:08:00 -07:00
|
|
|
int src_stride,
|
2013-11-19 02:15:47 +00:00
|
|
|
const DesktopRect& dest_rect);
|
|
|
|
|
void CopyPixelsFrom(const DesktopFrame& src_frame,
|
|
|
|
|
const DesktopVector& src_pos,
|
|
|
|
|
const DesktopRect& dest_rect);
|
|
|
|
|
|
2019-08-20 17:12:52 -07:00
|
|
|
// Copies pixels from another frame, with the copied & overwritten regions
|
|
|
|
|
// representing the intersection between the two frames. Returns true if
|
|
|
|
|
// pixels were copied, or false if there's no intersection. The scale factors
|
|
|
|
|
// represent the ratios between pixel space & offset coordinate space (e.g.
|
|
|
|
|
// 2.0 would indicate the frames are scaled down by 50% for display, so any
|
|
|
|
|
// offset between their origins should be doubled).
|
|
|
|
|
bool CopyIntersectingPixelsFrom(const DesktopFrame& src_frame,
|
|
|
|
|
double horizontal_scale,
|
|
|
|
|
double vertical_scale);
|
|
|
|
|
|
2014-11-11 18:15:55 +00:00
|
|
|
// A helper to return the data pointer of a frame at the specified position.
|
|
|
|
|
uint8_t* GetFrameDataAtPos(const DesktopVector& pos) const;
|
|
|
|
|
|
2017-03-22 11:38:46 -07:00
|
|
|
// The DesktopCapturer implementation which generates current DesktopFrame.
|
|
|
|
|
// Not all DesktopCapturer implementations set this field; it's set to
|
|
|
|
|
// kUnknown by default.
|
|
|
|
|
uint32_t capturer_id() const { return capturer_id_; }
|
|
|
|
|
void set_capturer_id(uint32_t capturer_id) { capturer_id_ = capturer_id; }
|
|
|
|
|
|
2021-07-28 23:35:39 +02:00
|
|
|
// Copies various information from `other`. Anything initialized in
|
Add DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom()
The original change https://chromium-review.googlesource.com/c/575315 and
https://chromium-review.googlesource.com/c/590508 have not been well-considered.
So this change reverts part of two changes and adds a
DesktopFrame::set_top_left() function
A DesktopFrame usually contains a very large chunk of memory, which should be
reused as much as possible to reduce the memory allocations. The size of the
memory usually controls by the DesktopFrame::size(). So it's reasonable to const
DesktopFrame::size_: changing it is wrong if the underly buffer is not large
enough.
But DesktopFrame::top_left() is a different story, same as capturer_id,
capture_time_ms and other information in the DesktopFrame, it can be changed to
any value without needing to reconstruct a DesktopFrame instance. So instead of
adding it to the constructor, a DesktopFrame::set_top_left() is added to adjust
the top-left of the DesktopFrame in the entire display coordinate.
After adding DesktopFrame::set_top_left(), we have five variables in a
DesktopFrame which is not initialized in the constructor. For any kind of
wrapper DesktopFrame, say, SharedDesktopFrame and CroppedDesktopFrame, they
needs to copy these five variables after constructing themselves. This is not
convenient and easily to be broken if an implementation forgot to copy them.
So DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom() are
added to the DesktopFrame to help derived classes to copy or move these
variables in one function call.
The difference between MoveFrameInfoFrom() and CopyFrameInfoFrom() is that the
former one uses DesktopRegion::Swap() to move the DesktopRegion from the source
DesktopFrame to this instance, while the later one uses copy-operator to copy
the DesktopRegion from the source DesktopFrame.
So CopyFrameInfoFrom() is usually used when sharing a source DesktopFrame with
several clients. I.e. the source DesktopFrame should be kept unchanged. For
example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
On the other side, MoveFrameInfoFrom() is usually used when wrapping a
DesktopFrame. E.g. CroppedDesktopFrame and DesktopFrameWithCursor.
Bug: webrtc:7950
Change-Id: I8b23418960fb681d2ea1f012d1b453f514da2272
Reviewed-on: https://chromium-review.googlesource.com/622453
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19504}
2017-08-24 12:41:53 -07:00
|
|
|
// constructor are not copied.
|
|
|
|
|
// This function is usually used when sharing a source DesktopFrame with
|
|
|
|
|
// several clients: the original DesktopFrame should be kept unchanged. For
|
|
|
|
|
// example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
|
|
|
|
|
void CopyFrameInfoFrom(const DesktopFrame& other);
|
|
|
|
|
|
2021-07-28 23:35:39 +02:00
|
|
|
// Copies various information from `other`. Anything initialized in
|
Add DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom()
The original change https://chromium-review.googlesource.com/c/575315 and
https://chromium-review.googlesource.com/c/590508 have not been well-considered.
So this change reverts part of two changes and adds a
DesktopFrame::set_top_left() function
A DesktopFrame usually contains a very large chunk of memory, which should be
reused as much as possible to reduce the memory allocations. The size of the
memory usually controls by the DesktopFrame::size(). So it's reasonable to const
DesktopFrame::size_: changing it is wrong if the underly buffer is not large
enough.
But DesktopFrame::top_left() is a different story, same as capturer_id,
capture_time_ms and other information in the DesktopFrame, it can be changed to
any value without needing to reconstruct a DesktopFrame instance. So instead of
adding it to the constructor, a DesktopFrame::set_top_left() is added to adjust
the top-left of the DesktopFrame in the entire display coordinate.
After adding DesktopFrame::set_top_left(), we have five variables in a
DesktopFrame which is not initialized in the constructor. For any kind of
wrapper DesktopFrame, say, SharedDesktopFrame and CroppedDesktopFrame, they
needs to copy these five variables after constructing themselves. This is not
convenient and easily to be broken if an implementation forgot to copy them.
So DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom() are
added to the DesktopFrame to help derived classes to copy or move these
variables in one function call.
The difference between MoveFrameInfoFrom() and CopyFrameInfoFrom() is that the
former one uses DesktopRegion::Swap() to move the DesktopRegion from the source
DesktopFrame to this instance, while the later one uses copy-operator to copy
the DesktopRegion from the source DesktopFrame.
So CopyFrameInfoFrom() is usually used when sharing a source DesktopFrame with
several clients. I.e. the source DesktopFrame should be kept unchanged. For
example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
On the other side, MoveFrameInfoFrom() is usually used when wrapping a
DesktopFrame. E.g. CroppedDesktopFrame and DesktopFrameWithCursor.
Bug: webrtc:7950
Change-Id: I8b23418960fb681d2ea1f012d1b453f514da2272
Reviewed-on: https://chromium-review.googlesource.com/622453
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19504}
2017-08-24 12:41:53 -07:00
|
|
|
// constructor are not copied. Not like CopyFrameInfoFrom() function, this
|
|
|
|
|
// function uses swap or move constructor to avoid data copy. It won't break
|
2021-07-28 23:35:39 +02:00
|
|
|
// the `other`, but some of its information may be missing after this
|
Add DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom()
The original change https://chromium-review.googlesource.com/c/575315 and
https://chromium-review.googlesource.com/c/590508 have not been well-considered.
So this change reverts part of two changes and adds a
DesktopFrame::set_top_left() function
A DesktopFrame usually contains a very large chunk of memory, which should be
reused as much as possible to reduce the memory allocations. The size of the
memory usually controls by the DesktopFrame::size(). So it's reasonable to const
DesktopFrame::size_: changing it is wrong if the underly buffer is not large
enough.
But DesktopFrame::top_left() is a different story, same as capturer_id,
capture_time_ms and other information in the DesktopFrame, it can be changed to
any value without needing to reconstruct a DesktopFrame instance. So instead of
adding it to the constructor, a DesktopFrame::set_top_left() is added to adjust
the top-left of the DesktopFrame in the entire display coordinate.
After adding DesktopFrame::set_top_left(), we have five variables in a
DesktopFrame which is not initialized in the constructor. For any kind of
wrapper DesktopFrame, say, SharedDesktopFrame and CroppedDesktopFrame, they
needs to copy these five variables after constructing themselves. This is not
convenient and easily to be broken if an implementation forgot to copy them.
So DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom() are
added to the DesktopFrame to help derived classes to copy or move these
variables in one function call.
The difference between MoveFrameInfoFrom() and CopyFrameInfoFrom() is that the
former one uses DesktopRegion::Swap() to move the DesktopRegion from the source
DesktopFrame to this instance, while the later one uses copy-operator to copy
the DesktopRegion from the source DesktopFrame.
So CopyFrameInfoFrom() is usually used when sharing a source DesktopFrame with
several clients. I.e. the source DesktopFrame should be kept unchanged. For
example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
On the other side, MoveFrameInfoFrom() is usually used when wrapping a
DesktopFrame. E.g. CroppedDesktopFrame and DesktopFrameWithCursor.
Bug: webrtc:7950
Change-Id: I8b23418960fb681d2ea1f012d1b453f514da2272
Reviewed-on: https://chromium-review.googlesource.com/622453
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19504}
2017-08-24 12:41:53 -07:00
|
|
|
// operation. E.g. other->updated_region_;
|
|
|
|
|
// This function is usually used when wrapping a DesktopFrame: the wrapper
|
2021-07-28 23:35:39 +02:00
|
|
|
// instance takes the ownership of `other`, so other components cannot access
|
|
|
|
|
// `other` anymore. For example, CroppedDesktopFrame and
|
Add DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom()
The original change https://chromium-review.googlesource.com/c/575315 and
https://chromium-review.googlesource.com/c/590508 have not been well-considered.
So this change reverts part of two changes and adds a
DesktopFrame::set_top_left() function
A DesktopFrame usually contains a very large chunk of memory, which should be
reused as much as possible to reduce the memory allocations. The size of the
memory usually controls by the DesktopFrame::size(). So it's reasonable to const
DesktopFrame::size_: changing it is wrong if the underly buffer is not large
enough.
But DesktopFrame::top_left() is a different story, same as capturer_id,
capture_time_ms and other information in the DesktopFrame, it can be changed to
any value without needing to reconstruct a DesktopFrame instance. So instead of
adding it to the constructor, a DesktopFrame::set_top_left() is added to adjust
the top-left of the DesktopFrame in the entire display coordinate.
After adding DesktopFrame::set_top_left(), we have five variables in a
DesktopFrame which is not initialized in the constructor. For any kind of
wrapper DesktopFrame, say, SharedDesktopFrame and CroppedDesktopFrame, they
needs to copy these five variables after constructing themselves. This is not
convenient and easily to be broken if an implementation forgot to copy them.
So DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom() are
added to the DesktopFrame to help derived classes to copy or move these
variables in one function call.
The difference between MoveFrameInfoFrom() and CopyFrameInfoFrom() is that the
former one uses DesktopRegion::Swap() to move the DesktopRegion from the source
DesktopFrame to this instance, while the later one uses copy-operator to copy
the DesktopRegion from the source DesktopFrame.
So CopyFrameInfoFrom() is usually used when sharing a source DesktopFrame with
several clients. I.e. the source DesktopFrame should be kept unchanged. For
example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
On the other side, MoveFrameInfoFrom() is usually used when wrapping a
DesktopFrame. E.g. CroppedDesktopFrame and DesktopFrameWithCursor.
Bug: webrtc:7950
Change-Id: I8b23418960fb681d2ea1f012d1b453f514da2272
Reviewed-on: https://chromium-review.googlesource.com/622453
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19504}
2017-08-24 12:41:53 -07:00
|
|
|
// DesktopFrameWithCursor.
|
|
|
|
|
void MoveFrameInfoFrom(DesktopFrame* other);
|
|
|
|
|
|
2019-04-19 14:32:56 -07:00
|
|
|
// Set and get the ICC profile of the frame data pixels. Useful to build the
|
|
|
|
|
// a ColorSpace object from clients of webrtc library like chromium. The
|
|
|
|
|
// format of an ICC profile is defined in the following specification
|
|
|
|
|
// http://www.color.org/specification/ICC1v43_2010-12.pdf.
|
|
|
|
|
const std::vector<uint8_t>& icc_profile() const { return icc_profile_; }
|
|
|
|
|
void set_icc_profile(const std::vector<uint8_t>& icc_profile) {
|
|
|
|
|
icc_profile_ = icc_profile;
|
|
|
|
|
}
|
|
|
|
|
|
2013-04-29 20:10:57 +00:00
|
|
|
protected:
|
|
|
|
|
DesktopFrame(DesktopSize size,
|
|
|
|
|
int stride,
|
|
|
|
|
uint8_t* data,
|
|
|
|
|
SharedMemory* shared_memory);
|
|
|
|
|
|
|
|
|
|
// Ownership of the buffers is defined by the classes that inherit from this
|
|
|
|
|
// class. They must guarantee that the buffer is not deleted before the frame
|
|
|
|
|
// is deleted.
|
|
|
|
|
uint8_t* const data_;
|
|
|
|
|
SharedMemory* const shared_memory_;
|
|
|
|
|
|
2016-05-20 22:08:00 -07:00
|
|
|
private:
|
Add DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom()
The original change https://chromium-review.googlesource.com/c/575315 and
https://chromium-review.googlesource.com/c/590508 have not been well-considered.
So this change reverts part of two changes and adds a
DesktopFrame::set_top_left() function
A DesktopFrame usually contains a very large chunk of memory, which should be
reused as much as possible to reduce the memory allocations. The size of the
memory usually controls by the DesktopFrame::size(). So it's reasonable to const
DesktopFrame::size_: changing it is wrong if the underly buffer is not large
enough.
But DesktopFrame::top_left() is a different story, same as capturer_id,
capture_time_ms and other information in the DesktopFrame, it can be changed to
any value without needing to reconstruct a DesktopFrame instance. So instead of
adding it to the constructor, a DesktopFrame::set_top_left() is added to adjust
the top-left of the DesktopFrame in the entire display coordinate.
After adding DesktopFrame::set_top_left(), we have five variables in a
DesktopFrame which is not initialized in the constructor. For any kind of
wrapper DesktopFrame, say, SharedDesktopFrame and CroppedDesktopFrame, they
needs to copy these five variables after constructing themselves. This is not
convenient and easily to be broken if an implementation forgot to copy them.
So DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom() are
added to the DesktopFrame to help derived classes to copy or move these
variables in one function call.
The difference between MoveFrameInfoFrom() and CopyFrameInfoFrom() is that the
former one uses DesktopRegion::Swap() to move the DesktopRegion from the source
DesktopFrame to this instance, while the later one uses copy-operator to copy
the DesktopRegion from the source DesktopFrame.
So CopyFrameInfoFrom() is usually used when sharing a source DesktopFrame with
several clients. I.e. the source DesktopFrame should be kept unchanged. For
example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
On the other side, MoveFrameInfoFrom() is usually used when wrapping a
DesktopFrame. E.g. CroppedDesktopFrame and DesktopFrameWithCursor.
Bug: webrtc:7950
Change-Id: I8b23418960fb681d2ea1f012d1b453f514da2272
Reviewed-on: https://chromium-review.googlesource.com/622453
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19504}
2017-08-24 12:41:53 -07:00
|
|
|
const DesktopSize size_;
|
2016-05-20 22:08:00 -07:00
|
|
|
const int stride_;
|
|
|
|
|
|
2013-04-29 20:10:57 +00:00
|
|
|
DesktopRegion updated_region_;
|
Add DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom()
The original change https://chromium-review.googlesource.com/c/575315 and
https://chromium-review.googlesource.com/c/590508 have not been well-considered.
So this change reverts part of two changes and adds a
DesktopFrame::set_top_left() function
A DesktopFrame usually contains a very large chunk of memory, which should be
reused as much as possible to reduce the memory allocations. The size of the
memory usually controls by the DesktopFrame::size(). So it's reasonable to const
DesktopFrame::size_: changing it is wrong if the underly buffer is not large
enough.
But DesktopFrame::top_left() is a different story, same as capturer_id,
capture_time_ms and other information in the DesktopFrame, it can be changed to
any value without needing to reconstruct a DesktopFrame instance. So instead of
adding it to the constructor, a DesktopFrame::set_top_left() is added to adjust
the top-left of the DesktopFrame in the entire display coordinate.
After adding DesktopFrame::set_top_left(), we have five variables in a
DesktopFrame which is not initialized in the constructor. For any kind of
wrapper DesktopFrame, say, SharedDesktopFrame and CroppedDesktopFrame, they
needs to copy these five variables after constructing themselves. This is not
convenient and easily to be broken if an implementation forgot to copy them.
So DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom() are
added to the DesktopFrame to help derived classes to copy or move these
variables in one function call.
The difference between MoveFrameInfoFrom() and CopyFrameInfoFrom() is that the
former one uses DesktopRegion::Swap() to move the DesktopRegion from the source
DesktopFrame to this instance, while the later one uses copy-operator to copy
the DesktopRegion from the source DesktopFrame.
So CopyFrameInfoFrom() is usually used when sharing a source DesktopFrame with
several clients. I.e. the source DesktopFrame should be kept unchanged. For
example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
On the other side, MoveFrameInfoFrom() is usually used when wrapping a
DesktopFrame. E.g. CroppedDesktopFrame and DesktopFrameWithCursor.
Bug: webrtc:7950
Change-Id: I8b23418960fb681d2ea1f012d1b453f514da2272
Reviewed-on: https://chromium-review.googlesource.com/622453
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19504}
2017-08-24 12:41:53 -07:00
|
|
|
DesktopVector top_left_;
|
2013-04-29 20:10:57 +00:00
|
|
|
DesktopVector dpi_;
|
2021-04-15 16:15:52 -07:00
|
|
|
bool may_contain_cursor_ = false;
|
2015-01-12 21:51:21 +00:00
|
|
|
int64_t capture_time_ms_;
|
2017-03-22 11:38:46 -07:00
|
|
|
uint32_t capturer_id_;
|
2019-04-19 14:32:56 -07:00
|
|
|
std::vector<uint8_t> icc_profile_;
|
2013-04-29 20:10:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// A DesktopFrame that stores data in the heap.
|
Reland "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 16fe3f290a524a136f71660a114d0b03ef501f10.
Reason for revert:
After discussing this problem with nisse@ and yvesg@, we decided to modify
how RTC_EXPORT works and avoid to depend on the macro COMPONENT_BUILD.
RTC_EXPORT will instead depend on a macro WEBRTC_COMPONENT_BUILD (which
can be set as a GN argument which defaults to false).
When all the symbols needed by Chromium will be marked with RTC_EXPORT we
will flip the GN arg in Chromium, setting to to `component_build` and from
that moment, Chromium will depend on a WebRTC shared library when
`component_build=true`.
Original change's description:
> Revert "Export symbols needed by the Chromium component build (part 1)."
>
> This reverts commit 99eea42fc1fe0be0ebed13c5eba7e1e42059bc5a.
>
> Reason for revert:
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::UnwrapTurnPacket(unsigned char const *, unsigned int, unsigned int *, unsigned int *)" (__imp_?UnwrapTurnPacket@cricket@@YA_NPBEIPAI1@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ValidateRtpHeader(unsigned char const *, unsigned int, unsigned int *)" (__imp_?ValidateRtpHeader@cricket@@YA_NPBEIPAI@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketStunTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketStunTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_udp.obj:("bool __thiscall network::P2PSocketUdp::DoSend(struct network::P2PSocketUdp::PendingPacket const &)" (?DoSend@P2PSocketUdp@network@@AAE_NABUPendingPacket@12@@Z))
>
> Original change's description:
> > Reland "Reland "Export symbols needed by the Chromium component build (part 1).""
> >
> > 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}
>
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
>
> Change-Id: I6f58b9c90defccdb160307783fb55271ab424fa1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/104623
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25050}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
Change-Id: I4d01ed96ae40a8f9ca42c466be5c87653d75d7c1
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/104641
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25108}
2018-10-11 10:50:45 +02:00
|
|
|
class RTC_EXPORT BasicDesktopFrame : public DesktopFrame {
|
2013-04-29 20:10:57 +00:00
|
|
|
public:
|
2019-01-31 15:55:26 -08:00
|
|
|
// The entire data buffer used for the frame is initialized with zeros.
|
2013-04-29 20:10:57 +00:00
|
|
|
explicit BasicDesktopFrame(DesktopSize size);
|
2017-07-31 20:26:11 -07:00
|
|
|
|
2015-09-01 11:36:40 -07:00
|
|
|
~BasicDesktopFrame() override;
|
2013-04-29 20:10:57 +00:00
|
|
|
|
2022-01-21 09:49:39 +09:00
|
|
|
BasicDesktopFrame(const BasicDesktopFrame&) = delete;
|
|
|
|
|
BasicDesktopFrame& operator=(const BasicDesktopFrame&) = delete;
|
|
|
|
|
|
2021-07-28 23:35:39 +02:00
|
|
|
// Creates a BasicDesktopFrame that contains copy of `frame`.
|
Add DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom()
The original change https://chromium-review.googlesource.com/c/575315 and
https://chromium-review.googlesource.com/c/590508 have not been well-considered.
So this change reverts part of two changes and adds a
DesktopFrame::set_top_left() function
A DesktopFrame usually contains a very large chunk of memory, which should be
reused as much as possible to reduce the memory allocations. The size of the
memory usually controls by the DesktopFrame::size(). So it's reasonable to const
DesktopFrame::size_: changing it is wrong if the underly buffer is not large
enough.
But DesktopFrame::top_left() is a different story, same as capturer_id,
capture_time_ms and other information in the DesktopFrame, it can be changed to
any value without needing to reconstruct a DesktopFrame instance. So instead of
adding it to the constructor, a DesktopFrame::set_top_left() is added to adjust
the top-left of the DesktopFrame in the entire display coordinate.
After adding DesktopFrame::set_top_left(), we have five variables in a
DesktopFrame which is not initialized in the constructor. For any kind of
wrapper DesktopFrame, say, SharedDesktopFrame and CroppedDesktopFrame, they
needs to copy these five variables after constructing themselves. This is not
convenient and easily to be broken if an implementation forgot to copy them.
So DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom() are
added to the DesktopFrame to help derived classes to copy or move these
variables in one function call.
The difference between MoveFrameInfoFrom() and CopyFrameInfoFrom() is that the
former one uses DesktopRegion::Swap() to move the DesktopRegion from the source
DesktopFrame to this instance, while the later one uses copy-operator to copy
the DesktopRegion from the source DesktopFrame.
So CopyFrameInfoFrom() is usually used when sharing a source DesktopFrame with
several clients. I.e. the source DesktopFrame should be kept unchanged. For
example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
On the other side, MoveFrameInfoFrom() is usually used when wrapping a
DesktopFrame. E.g. CroppedDesktopFrame and DesktopFrameWithCursor.
Bug: webrtc:7950
Change-Id: I8b23418960fb681d2ea1f012d1b453f514da2272
Reviewed-on: https://chromium-review.googlesource.com/622453
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19504}
2017-08-24 12:41:53 -07:00
|
|
|
// TODO(zijiehe): Return std::unique_ptr<DesktopFrame>
|
2013-10-17 19:47:18 +00:00
|
|
|
static DesktopFrame* CopyOf(const DesktopFrame& frame);
|
2013-04-29 20:10:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// A DesktopFrame that stores data in shared memory.
|
2019-09-23 14:54:28 +02:00
|
|
|
class RTC_EXPORT SharedMemoryDesktopFrame : public DesktopFrame {
|
2013-04-29 20:10:57 +00:00
|
|
|
public:
|
2021-07-28 23:35:39 +02:00
|
|
|
// May return nullptr if `shared_memory_factory` failed to create a
|
2017-07-31 20:26:11 -07:00
|
|
|
// SharedMemory instance.
|
2021-07-28 23:35:39 +02:00
|
|
|
// `shared_memory_factory` should not be nullptr.
|
2016-03-16 15:58:08 -07:00
|
|
|
static std::unique_ptr<DesktopFrame> Create(
|
2016-02-09 15:13:26 -08:00
|
|
|
DesktopSize size,
|
|
|
|
|
SharedMemoryFactory* shared_memory_factory);
|
|
|
|
|
|
2021-07-28 23:35:39 +02:00
|
|
|
// Takes ownership of `shared_memory`.
|
2017-07-31 20:26:11 -07:00
|
|
|
// Deprecated, use the next constructor.
|
2013-04-29 20:10:57 +00:00
|
|
|
SharedMemoryDesktopFrame(DesktopSize size,
|
|
|
|
|
int stride,
|
|
|
|
|
SharedMemory* shared_memory);
|
2017-07-31 20:26:11 -07:00
|
|
|
|
|
|
|
|
// Preferred.
|
Add DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom()
The original change https://chromium-review.googlesource.com/c/575315 and
https://chromium-review.googlesource.com/c/590508 have not been well-considered.
So this change reverts part of two changes and adds a
DesktopFrame::set_top_left() function
A DesktopFrame usually contains a very large chunk of memory, which should be
reused as much as possible to reduce the memory allocations. The size of the
memory usually controls by the DesktopFrame::size(). So it's reasonable to const
DesktopFrame::size_: changing it is wrong if the underly buffer is not large
enough.
But DesktopFrame::top_left() is a different story, same as capturer_id,
capture_time_ms and other information in the DesktopFrame, it can be changed to
any value without needing to reconstruct a DesktopFrame instance. So instead of
adding it to the constructor, a DesktopFrame::set_top_left() is added to adjust
the top-left of the DesktopFrame in the entire display coordinate.
After adding DesktopFrame::set_top_left(), we have five variables in a
DesktopFrame which is not initialized in the constructor. For any kind of
wrapper DesktopFrame, say, SharedDesktopFrame and CroppedDesktopFrame, they
needs to copy these five variables after constructing themselves. This is not
convenient and easily to be broken if an implementation forgot to copy them.
So DesktopFrame::MoveFrameInfoFrom() and DesktopFrame::CopyFrameInfoFrom() are
added to the DesktopFrame to help derived classes to copy or move these
variables in one function call.
The difference between MoveFrameInfoFrom() and CopyFrameInfoFrom() is that the
former one uses DesktopRegion::Swap() to move the DesktopRegion from the source
DesktopFrame to this instance, while the later one uses copy-operator to copy
the DesktopRegion from the source DesktopFrame.
So CopyFrameInfoFrom() is usually used when sharing a source DesktopFrame with
several clients. I.e. the source DesktopFrame should be kept unchanged. For
example, BasicDesktopFrame::CopyOf() and SharedDesktopFrame::Share().
On the other side, MoveFrameInfoFrom() is usually used when wrapping a
DesktopFrame. E.g. CroppedDesktopFrame and DesktopFrameWithCursor.
Bug: webrtc:7950
Change-Id: I8b23418960fb681d2ea1f012d1b453f514da2272
Reviewed-on: https://chromium-review.googlesource.com/622453
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19504}
2017-08-24 12:41:53 -07:00
|
|
|
SharedMemoryDesktopFrame(DesktopSize size,
|
2017-07-31 20:26:11 -07:00
|
|
|
int stride,
|
|
|
|
|
std::unique_ptr<SharedMemory> shared_memory);
|
|
|
|
|
|
2015-09-01 11:36:40 -07:00
|
|
|
~SharedMemoryDesktopFrame() override;
|
2013-04-29 20:10:57 +00:00
|
|
|
|
2022-01-21 09:49:39 +09:00
|
|
|
SharedMemoryDesktopFrame(const SharedMemoryDesktopFrame&) = delete;
|
|
|
|
|
SharedMemoryDesktopFrame& operator=(const SharedMemoryDesktopFrame&) = delete;
|
|
|
|
|
|
2013-04-29 20:10:57 +00:00
|
|
|
private:
|
2017-07-31 20:26:11 -07:00
|
|
|
// Avoid unexpected order of parameter evaluation.
|
|
|
|
|
// Executing both std::unique_ptr<T>::operator->() and
|
|
|
|
|
// std::unique_ptr<T>::release() in the member initializer list is not safe.
|
|
|
|
|
// Depends on the order of parameter evaluation,
|
|
|
|
|
// std::unique_ptr<T>::operator->() may trigger assertion failure if it has
|
|
|
|
|
// been evaluated after std::unique_ptr<T>::release(). By using this
|
|
|
|
|
// constructor, std::unique_ptr<T>::operator->() won't be involved anymore.
|
|
|
|
|
SharedMemoryDesktopFrame(DesktopRect rect,
|
|
|
|
|
int stride,
|
|
|
|
|
SharedMemory* shared_memory);
|
2013-04-29 20:10:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_
|