Commit Graph

21 Commits

Author SHA1 Message Date
604fd2f1ab Remove RTC_DISALLOW_COPY_AND_ASSIGN from modules/
Bug: webrtc:13555, webrtc:13082
Change-Id: I2c2cbcbd918f0cfa970c1a964893220ba11d4b41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247960
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35771}
2022-01-24 11:50:20 +00:00
190244bb59 Remove all #include <assert.h>/<cassert> and usage in Obj-C code.
This CL completes the removal of assert() and relative headers from
the codebase (excluded
//examples/objc/AppRTCMobile/third_party/SocketRocket which is in a
third_party sub-directory).

Bug: webrtc:6779
Change-Id: I93ed57168d2c0e011626873d66529488c5f484f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225546
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34528}
2021-07-22 14:00:26 +00:00
439ffe462a Add Presentation Mode Support for Capturing OpenOffice Impress document windows
* Add OpenOfficeApplicationHandler for MacOS and MS Windows.
* List of available sources for FullScreenWindowDetector on MacOS can include a window with empty title along with titled window for one application.
* List of available sources for FullScreenWindowDetector on MS Windows can include a window with empty title or invisible ones.

Bug: webrtc:11462
Change-Id: Id09537579ef6617dee29759c66dc9f7493166ca8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171723
Commit-Queue: Jamie Walch <jamiewalch@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Reviewed-by: Wez <wez@google.com>
Cr-Commit-Position: refs/heads/master@{#32561}
2020-11-05 21:22:19 +00:00
b588353543 Implement handling for MS PowerPoint Presentation Mode.
* Introduce a FullScreenWindowDetector to manage routines for updating the list of sources being application agnostic, inspired by FullScreenChromeWindowDetector.
* Introduce a FullScreenApplicationHandler to make a decision about changing window to share in application specific way, inspired by FullScreenChromeWindowDetector.
* Remove FullScreenChromeWindowDetector as redundant.
* Add FullScreenApplicationHandler for MS PowerPoint and Apple Keynote on MacOS.
* Add FullScreenApplicationHandler for MS PowerPoint on Windows.

Bug: webrtc:3852
Change-Id: I06507d929308e85b882b2f8210a025afef7f26a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156020
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Reviewed-by: Justin Uberti <juberti@webrtc.org>
Reviewed-by: Wez <wez@google.com>
Cr-Commit-Position: refs/heads/master@{#29993}
2019-12-03 19:17:24 +00:00
5e8ddc360b Reland "Delete mac_utils.h and mac_utils.cc"
This is a reland of ada8e17125d2124f5bcdc1558182ce95d6311d93

Original change's description:
> Delete mac_utils.h and mac_utils.cc
>
> They defined two functions: ToUtf16 and ToUtf8. The former was unused,
> and the latter is moved to
> modules/desktop_capture/mac/window_list_utils.cc, the only user.
>
> Tbr: sergeyu@chromium.org
> Bug: None
> Change-Id: Ib8a513da42e43ba8d41a2de4c1645b3f48448dc9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148531
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Sergey Ulanov <sergeyu@google.com>
> Cr-Commit-Position: refs/heads/master@{#28913}

Tbr: kthelgason@webrtc.org
Bug: None
Change-Id: Icda3a2d6e98cfcaf8618035c248104c234e809ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150109
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28979}
2019-08-28 09:30:32 +00:00
a2dae38ee7 Revert "Reland "Delete mac_utils.h and mac_utils.cc""
This reverts commit df578330b8a0b1a003a37ca34253e7344caf17f4.

Reason for revert: Still results in link errors for chromium on mac.

Original change's description:
> Reland "Delete mac_utils.h and mac_utils.cc"
> 
> This is a reland of ada8e17125d2124f5bcdc1558182ce95d6311d93
> 
> Chromium link error should be fixed with
> https://chromium-review.googlesource.com/c/chromium/src/+/1762071
> 
> Original change's description:
> > Delete mac_utils.h and mac_utils.cc
> >
> > They defined two functions: ToUtf16 and ToUtf8. The former was unused,
> > and the latter is moved to
> > modules/desktop_capture/mac/window_list_utils.cc, the only user.
> >
> > Tbr: sergeyu@chromium.org
> > Bug: None
> > Change-Id: Ib8a513da42e43ba8d41a2de4c1645b3f48448dc9
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148531
> > Commit-Queue: Niels Moller <nisse@webrtc.org>
> > Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> > Reviewed-by: Sergey Ulanov <sergeyu@google.com>
> > Cr-Commit-Position: refs/heads/master@{#28913}
> 
> Tbr: kthelgason@webrtc.org
> Bug: None
> Change-Id: If6d186d565c73e36ddb81b3ff05f6de6c9201326
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149831
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28934}

TBR=zijiehe@chromium.org,nisse@webrtc.org,kthelgason@webrtc.org,sergeyu@chromium.org

Change-Id: I295cd23e63e17186f4c3c857ac0242467b7a68bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150107
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28937}
2019-08-22 09:58:31 +00:00
df578330b8 Reland "Delete mac_utils.h and mac_utils.cc"
This is a reland of ada8e17125d2124f5bcdc1558182ce95d6311d93

Chromium link error should be fixed with
https://chromium-review.googlesource.com/c/chromium/src/+/1762071

Original change's description:
> Delete mac_utils.h and mac_utils.cc
>
> They defined two functions: ToUtf16 and ToUtf8. The former was unused,
> and the latter is moved to
> modules/desktop_capture/mac/window_list_utils.cc, the only user.
>
> Tbr: sergeyu@chromium.org
> Bug: None
> Change-Id: Ib8a513da42e43ba8d41a2de4c1645b3f48448dc9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148531
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Sergey Ulanov <sergeyu@google.com>
> Cr-Commit-Position: refs/heads/master@{#28913}

Tbr: kthelgason@webrtc.org
Bug: None
Change-Id: If6d186d565c73e36ddb81b3ff05f6de6c9201326
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149831
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28934}
2019-08-22 08:30:57 +00:00
e21f3f574b Revert "Delete mac_utils.h and mac_utils.cc"
This reverts commit ada8e17125d2124f5bcdc1558182ce95d6311d93.

Reason for revert: Breaks chromium, due to undeclared dependency on SystemConfiguration.framework

Original change's description:
> Delete mac_utils.h and mac_utils.cc
> 
> They defined two functions: ToUtf16 and ToUtf8. The former was unused,
> and the latter is moved to
> modules/desktop_capture/mac/window_list_utils.cc, the only user.
> 
> Tbr: sergeyu@chromium.org
> Bug: None
> Change-Id: Ib8a513da42e43ba8d41a2de4c1645b3f48448dc9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148531
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Sergey Ulanov <sergeyu@google.com>
> Cr-Commit-Position: refs/heads/master@{#28913}

TBR=zijiehe@chromium.org,nisse@webrtc.org,kthelgason@webrtc.org,sergeyu@google.com,sergeyu@chromium.org

Change-Id: I9d6a2f63b3acde0eefab92d034529b800d6adcab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149811
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28915}
2019-08-20 09:58:37 +00:00
ada8e17125 Delete mac_utils.h and mac_utils.cc
They defined two functions: ToUtf16 and ToUtf8. The former was unused,
and the latter is moved to
modules/desktop_capture/mac/window_list_utils.cc, the only user.

Tbr: sergeyu@chromium.org
Bug: None
Change-Id: Ib8a513da42e43ba8d41a2de4c1645b3f48448dc9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148531
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sergey Ulanov <sergeyu@google.com>
Cr-Commit-Position: refs/heads/master@{#28913}
2019-08-20 08:52:28 +00:00
5665572f47 Avoid a frame copy in WindowCapturerMac
By wraping the cg_data instead of copying it. We had the infrastructure
for it since the work around iosurface, we were just not using it.

Also having a centralized DesktopFrameCGImage::CreateFromCGImage helper
will be useful to parse the ICC Profile at only one place.

Bug: chromium:945468
Change-Id: I69f179064fd9045d992a7baea35820c38e24dacc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133640
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#27696}
2019-04-19 05:05:50 +00:00
d970807e0c Remove rtc_base/scoped_ref_ptr.h.
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.

More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.

Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
2019-01-25 20:29:58 +00:00
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
eaf337a141 Remove event wait logic from DesktopConfigurationMonitor
This class exposes Wait()-Set() logic to synchronize events.
- There is a bug in checking EventWrapper::Wait() as it returns [1,2]. Negating
these values cause us to always pass timeout checks.
- There is a general problem in this class with waiter. There are 2 scenarios:
1) Lock()-Unlock()-DisplaysReconfigured()
In this scenario, Wait() in DisplaysReconfigured() immediately passes as event
is already signaled. Next Lock() call won't continue until Set() is called in
DisplaysReconfigured(). This blocks capture thread from accessing display until
reconfiguration completes.
2) Lock()-DisplaysReconfigured()-Unlock()
In this scenario, Wait() in DisplaysReconfigured() passes when Unlock() called.
Capture thread accesses display while reconfiguration happens. Note that we are
only delaying the OS delegate thread here. As an experiment, adding Sleep() in
DisplaysReconfigured() results in no change, because it looks like OS uses this
thread for only delegates but not for the actual display switch.

Overall, (1) doesnt seem necessary as (2) already accesses display while
reconfiguration happens. (2) doesn't seem necessary as blocking system delegate
thread doesn't help. Therefore, I changed the class to only protect from race
condition on |desktop_configuration_|.

Bug: chromium:796889
Change-Id: I37263305e5ac629e21ff9e977952cf4a21bae19f
Reviewed-on: https://webrtc-review.googlesource.com/c/108560
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25437}
2018-10-30 16:05:21 +00:00
90394a4db3 Reland "[desktopCapture] Unify the position info in DIP coordinates on Mac."
This is a reland of 89653d5db46419d2a80898635cb27fed64898db2

Original change's description:
> [desktopCapture] Unify the position info in DIP coordinates on Mac.
> 
> On OSX, the logical(DIP) and physical coordinates are used mixingly.
> For example, the captured image has its size in physical pixels(2x) and
> location in logical(DIP) pixels. Same to the cursor position. This
> causes trouble when we check the relative position of image and cursor
> when there are multiple monitors with different DIP setting connected.
> 
> This cl proposed a solution to use DIP pixel for any location info,
> i.e. top-left of a frame and cursor position. Also propose a method to
> get the current scale factor of a window across multiple monitors. And
> save the current scale factor in DPI of the capture frame.
> Then we can check relative position of cursor and frame correctly
> in DIP pixel and compose them in physical pixel.
> 
> Bug: webrtc:9178
> Change-Id: I3c076aeac2d6f2c1f63d000d7fff03500aa375ac
> Reviewed-on: https://webrtc-review.googlesource.com/71621
> Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
> Reviewed-by: Zijie He <zijiehe@chromium.org>
> Commit-Queue: Brave Yao <braveyao@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23263}

Bug: webrtc:9178
Change-Id: I97d9150f7b9a4ed6671733b75613ea9c315d5c1d
Reviewed-on: https://webrtc-review.googlesource.com/77481
Reviewed-by: Zijie He <zijiehe@chromium.org>
Commit-Queue: Brave Yao <braveyao@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23289}
2018-05-17 18:45:42 +00:00
e1c3c01a90 Revert "[desktopCapture] Unify the position info in DIP coordinates on Mac."
This reverts commit 89653d5db46419d2a80898635cb27fed64898db2.

Reason for revert: 

Tentatively revert since I believe this break remoting unittests on Asan/Tsan

https://chromium-review.googlesource.com/c/chromium/src/+/1063330

https://chromium-swarm.appspot.com/task?id=3d8692bedcc85c10&refresh=10&show_raw=1


Original change's description:
> [desktopCapture] Unify the position info in DIP coordinates on Mac.
> 
> On OSX, the logical(DIP) and physical coordinates are used mixingly.
> For example, the captured image has its size in physical pixels(2x) and
> location in logical(DIP) pixels. Same to the cursor position. This
> causes trouble when we check the relative position of image and cursor
> when there are multiple monitors with different DIP setting connected.
> 
> This cl proposed a solution to use DIP pixel for any location info,
> i.e. top-left of a frame and cursor position. Also propose a method to
> get the current scale factor of a window across multiple monitors. And
> save the current scale factor in DPI of the capture frame.
> Then we can check relative position of cursor and frame correctly
> in DIP pixel and compose them in physical pixel.
> 
> Bug: webrtc:9178
> Change-Id: I3c076aeac2d6f2c1f63d000d7fff03500aa375ac
> Reviewed-on: https://webrtc-review.googlesource.com/71621
> Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
> Reviewed-by: Zijie He <zijiehe@chromium.org>
> Commit-Queue: Brave Yao <braveyao@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23263}

TBR=zijiehe@chromium.org,jamiewalch@chromium.org,perkj@webrtc.org,braveyao@webrtc.org

Change-Id: Ica02365925623e21b256d20a21b5625e7ed6f49b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9178
Reviewed-on: https://webrtc-review.googlesource.com/77461
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23280}
2018-05-17 12:11:22 +00:00
89653d5db4 [desktopCapture] Unify the position info in DIP coordinates on Mac.
On OSX, the logical(DIP) and physical coordinates are used mixingly.
For example, the captured image has its size in physical pixels(2x) and
location in logical(DIP) pixels. Same to the cursor position. This
causes trouble when we check the relative position of image and cursor
when there are multiple monitors with different DIP setting connected.

This cl proposed a solution to use DIP pixel for any location info,
i.e. top-left of a frame and cursor position. Also propose a method to
get the current scale factor of a window across multiple monitors. And
save the current scale factor in DPI of the capture frame.
Then we can check relative position of cursor and frame correctly
in DIP pixel and compose them in physical pixel.

Bug: webrtc:9178
Change-Id: I3c076aeac2d6f2c1f63d000d7fff03500aa375ac
Reviewed-on: https://webrtc-review.googlesource.com/71621
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Reviewed-by: Zijie He <zijiehe@chromium.org>
Commit-Queue: Brave Yao <braveyao@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23263}
2018-05-16 16:44:01 +00:00
c6416fbe16 [desktopCapture] add some logs into trace event
While investigating some screen-capture-track-end-in-meeting issues, the
relevant rtc error logs are not uploaded to server as other webrtc
modules do, which cause great hardness to identify the reason.
This cl is to use existing trace event methods to store error logs of
desktop capturers.

Bug: chromium:831756
Change-Id: Id0c1b439f9b63916fb9417cf4e6f2b8f3c556fcd
Reviewed-on: https://webrtc-review.googlesource.com/69783
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Brave Yao <braveyao@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22866}
2018-04-13 21:15:59 +00:00
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

for m in PLOG \
  LOG_TAG \
  LOG_GLEM \
  LOG_GLE_EX \
  LOG_GLE \
  LAST_SYSTEM_ERROR \
  LOG_ERRNO_EX \
  LOG_ERRNO \
  LOG_ERR_EX \
  LOG_ERR \
  LOG_V \
  LOG_F \
  LOG_T_F \
  LOG_E \
  LOG_T \
  LOG_CHECK_LEVEL_V \
  LOG_CHECK_LEVEL \
  LOG
do
  git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
411582b13a [Window Capturer] Implement scaling in GetWindowBounds()
On Mac OSX system, if retina screen is used, the GetWindowBounds() returns
pre-scaled values instead of system coordinates. So this fix considers
per-monitor scale-factor, and stretchs the DesktopRect.

Bug: chromium:778049
Change-Id: I9dc51e08235eba9b3ef6378eaa15737aa444b0c8
Reviewed-on: https://webrtc-review.googlesource.com/17600
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#20578}
2017-11-07 01:49:35 +00:00
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00