文件最后提交记录最后更新时间
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}8 年前
Remove top-level const from parameters in function declarations. This is a safe cleanup change since top-level const applied to parameters in function declarations (that are not also definitions) are ignored by the compiler. Hence, such changes do not change the type of the declared functions and are simply no-ops. Bug: webrtc:13610 Change-Id: Ibafb92c45119a6d8bdb6f9109aa8dad6385163a9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249086 Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Ali Tofigh <alito@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35802} 4 年前
Use backticks not vertical bars to denote variables in comments for /modules/desktop_capture Bug: webrtc:12338 Change-Id: I300ba78fc4423db7030e555d7e51d2cb2246e9a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227162 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34678} 4 年前
Use backticks not vertical bars to denote variables in comments for /modules/desktop_capture Bug: webrtc:12338 Change-Id: I300ba78fc4423db7030e555d7e51d2cb2246e9a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227162 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34678} 4 年前
Use backticks not vertical bars to denote variables in comments for /modules/desktop_capture Bug: webrtc:12338 Change-Id: I300ba78fc4423db7030e555d7e51d2cb2246e9a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227162 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34678} 4 年前
Reformat the WebRTC code base Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}7 年前
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}8 年前
Fixing the error logging in desktop_capture for Windows The desktop_capture code logs failed HRESULTs in several places, the problem is that it tries to use a wchar* (when a char* is required) for the error message and doesn't display the HRESULT in hex. This makes the error logging less useful than it could be. Example failure: error 08406B28, with code -2005270488 In this CL, I add a simple utility function to convert a _com_error object to a std::string whic can be logged. With this change the output looks like this (linebreak added for CL description): Failed to capture frame: HRESULT: 0x887A0026, Message: 'The keyed mutex was abandoned.' I also adjusted the formatting of a few logging statements to be more consistent (adding '<<' operators mostly). Bug: webrtc:12051 Change-Id: I3e88ff6f2ff079fbe210626e1e89b2b053a742a9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188522 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/master@{#32417} 5 年前
Lowercase windows includes in desktop_capture/. Allows building on case-sensitive file systems. BUG=None Change-Id: I0ecd494a5ed6e6dc2658d3918f88fa8692a471cf Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138180 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Commit-Queue: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28031} 6 年前
Avoid sending wide strings to narrow streams. This overload was removed in C++20. Bug: chromium:1284275 Change-Id: I67a25ae23fa111e4972d1b207f1c078da13d86a3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269440 Reviewed-by: Mark Foltz <mfoltz@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Commit-Queue: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/main@{#37630} 3 年前
Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" This reverts commit 3f87250a4f0e6c69002fbcdfb995b0dfcd7bf710. Reason for revert: Downstream is fixed Original change's description: > Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" > > This reverts commit 5f0eb93d2a44cec2102fc8c3757d5bb814bd145f. > > Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after. > > Original change's description: > > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely > > > > Bug: webrtc:13555, webrtc:13082 > > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260 > > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > > Reviewed-by: Artem Titov <titovartem@webrtc.org> > > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com> > > Cr-Commit-Position: refs/heads/main@{#35805} > > TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com > > Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:13555, webrtc:13082 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364 > Reviewed-by: Artem Titov <titovartem@webrtc.org> > Owners-Override: Artem Titov <titovartem@webrtc.org> > Reviewed-by: Andrey Logvin <landrey@webrtc.org> > Reviewed-by: Björn Terelius <terelius@webrtc.org> > Commit-Queue: Artem Titov <titovartem@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#35807} # Not skipping CQ checks because this is a reland. Bug: webrtc:13555, webrtc:13082 Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35814} 4 年前
Fixing the error logging in desktop_capture for Windows The desktop_capture code logs failed HRESULTs in several places, the problem is that it tries to use a wchar* (when a char* is required) for the error message and doesn't display the HRESULT in hex. This makes the error logging less useful than it could be. Example failure: error 08406B28, with code -2005270488 In this CL, I add a simple utility function to convert a _com_error object to a std::string whic can be logged. With this change the output looks like this (linebreak added for CL description): Failed to capture frame: HRESULT: 0x887A0026, Message: 'The keyed mutex was abandoned.' I also adjusted the formatting of a few logging statements to be more consistent (adding '<<' operators mostly). Bug: webrtc:12051 Change-Id: I3e88ff6f2ff079fbe210626e1e89b2b053a742a9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188522 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/master@{#32417} 5 年前
Fixing the error logging in desktop_capture for Windows The desktop_capture code logs failed HRESULTs in several places, the problem is that it tries to use a wchar* (when a char* is required) for the error message and doesn't display the HRESULT in hex. This makes the error logging less useful than it could be. Example failure: error 08406B28, with code -2005270488 In this CL, I add a simple utility function to convert a _com_error object to a std::string whic can be logged. With this change the output looks like this (linebreak added for CL description): Failed to capture frame: HRESULT: 0x887A0026, Message: 'The keyed mutex was abandoned.' I also adjusted the formatting of a few logging statements to be more consistent (adding '<<' operators mostly). Bug: webrtc:12051 Change-Id: I3e88ff6f2ff079fbe210626e1e89b2b053a742a9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188522 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/master@{#32417} 5 年前
Re-initialize the DXGI capturer when the DPI of the monitor changes I am updating Chrome Remote Desktop to apply a scale factor when using curtain mode (i.e. a loopback RDP session) and I've found that while the changes are applied and the desktop is scaled, DXGI stops producing frames. This is essentially the same issue as crbug.com/1307357 except this issue is occurring when the DPI is changed rather than the desktop size. The fix is to look at the effective DPI for the source being captured (or the primary monitor when capturing the full desktop) and then signaling an environment change when the DPI differs. Bug: webrtc:14894,b:154733991 Change-Id: Id768d4a384434ba59e7396bc919d0ba30d0f6acc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292791 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/main@{#39305} 3 年前
Re-initialize the DXGI capturer when the DPI of the monitor changes I am updating Chrome Remote Desktop to apply a scale factor when using curtain mode (i.e. a loopback RDP session) and I've found that while the changes are applied and the desktop is scaled, DXGI stops producing frames. This is essentially the same issue as crbug.com/1307357 except this issue is occurring when the DPI is changed rather than the desktop size. The fix is to look at the effective DPI for the source being captured (or the primary monitor when capturing the full desktop) and then signaling an environment change when the DPI differs. Bug: webrtc:14894,b:154733991 Change-Id: Id768d4a384434ba59e7396bc919d0ba30d0f6acc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292791 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/main@{#39305} 3 年前
Fixing the error logging in desktop_capture for Windows The desktop_capture code logs failed HRESULTs in several places, the problem is that it tries to use a wchar* (when a char* is required) for the error message and doesn't display the HRESULT in hex. This makes the error logging less useful than it could be. Example failure: error 08406B28, with code -2005270488 In this CL, I add a simple utility function to convert a _com_error object to a std::string whic can be logged. With this change the output looks like this (linebreak added for CL description): Failed to capture frame: HRESULT: 0x887A0026, Message: 'The keyed mutex was abandoned.' I also adjusted the formatting of a few logging statements to be more consistent (adding '<<' operators mostly). Bug: webrtc:12051 Change-Id: I3e88ff6f2ff079fbe210626e1e89b2b053a742a9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188522 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/master@{#32417} 5 年前
Use backticks not vertical bars to denote variables in comments for /modules/desktop_capture Bug: webrtc:12338 Change-Id: I300ba78fc4423db7030e555d7e51d2cb2246e9a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227162 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34678} 4 年前
Format almost everything. This CL was generated by running git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \ grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \ grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \ grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \ grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \ | xargs clang-format -i ; git cl format Most of these changes are clang-format grouping and reordering includes differently. Bug: webrtc:9340 Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051 Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28505} 6 年前
Use backticks not vertical bars to denote variables in comments for /modules/desktop_capture Bug: webrtc:12338 Change-Id: I300ba78fc4423db7030e555d7e51d2cb2246e9a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227162 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34678} 4 年前
Re-initialize the DXGI capturer when the DPI of the monitor changes I am updating Chrome Remote Desktop to apply a scale factor when using curtain mode (i.e. a loopback RDP session) and I've found that while the changes are applied and the desktop is scaled, DXGI stops producing frames. This is essentially the same issue as crbug.com/1307357 except this issue is occurring when the DPI is changed rather than the desktop size. The fix is to look at the effective DPI for the source being captured (or the primary monitor when capturing the full desktop) and then signaling an environment change when the DPI differs. Bug: webrtc:14894,b:154733991 Change-Id: Id768d4a384434ba59e7396bc919d0ba30d0f6acc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292791 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/main@{#39305} 3 年前
Re-initialize the DXGI capturer when the DPI of the monitor changes I am updating Chrome Remote Desktop to apply a scale factor when using curtain mode (i.e. a loopback RDP session) and I've found that while the changes are applied and the desktop is scaled, DXGI stops producing frames. This is essentially the same issue as crbug.com/1307357 except this issue is occurring when the DPI is changed rather than the desktop size. The fix is to look at the effective DPI for the source being captured (or the primary monitor when capturing the full desktop) and then signaling an environment change when the DPI differs. Bug: webrtc:14894,b:154733991 Change-Id: Id768d4a384434ba59e7396bc919d0ba30d0f6acc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292791 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/main@{#39305} 3 年前
Remove unnecessary memset to DesktopFrame With a recent change, the webrtc::DesktopFrame is created and initialized with 0. So it's not necessary to call memset() to the frame again any more. See https://webrtc-review.googlesource.com/c/src/+/97184/ Bug: webrtc:9703 Change-Id: I27d096058ead075765f4c49bf60cb8d725da1afd Reviewed-on: https://webrtc-review.googlesource.com/c/120700 Commit-Queue: Brave Yao <braveyao@webrtc.org> Reviewed-by: Brave Yao <braveyao@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26504}7 年前
Use backticks not vertical bars to denote variables in comments for /modules/desktop_capture Bug: webrtc:12338 Change-Id: I300ba78fc4423db7030e555d7e51d2cb2246e9a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227162 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34678} 4 年前
DXGI now consumes may_contain_cursor Before: No attempt was made to figure out of the cursor was embedded into the captured video frame when using DXGI on Windows as screen capturer. Instead the cursor is superimposed on the frame by an external mouse and cursor composer. After: We now check if the display adapter supports embedding the mouse cursor and if so use it as is and thereby avoid adding it independently. Bug: chromium:1421656 Change-Id: Ie07fe13e1c8f9583769961328bb41fbc689cd8e0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299241 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39742} 3 年前
DXGI now consumes may_contain_cursor Before: No attempt was made to figure out of the cursor was embedded into the captured video frame when using DXGI on Windows as screen capturer. Instead the cursor is superimposed on the frame by an external mouse and cursor composer. After: We now check if the display adapter supports embedding the mouse cursor and if so use it as is and thereby avoid adding it independently. Bug: chromium:1421656 Change-Id: Ie07fe13e1c8f9583769961328bb41fbc689cd8e0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299241 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39742} 3 年前
Fixing the error logging in desktop_capture for Windows The desktop_capture code logs failed HRESULTs in several places, the problem is that it tries to use a wchar* (when a char* is required) for the error message and doesn't display the HRESULT in hex. This makes the error logging less useful than it could be. Example failure: error 08406B28, with code -2005270488 In this CL, I add a simple utility function to convert a _com_error object to a std::string whic can be logged. With this change the output looks like this (linebreak added for CL description): Failed to capture frame: HRESULT: 0x887A0026, Message: 'The keyed mutex was abandoned.' I also adjusted the formatting of a few logging statements to be more consistent (adding '<<' operators mostly). Bug: webrtc:12051 Change-Id: I3e88ff6f2ff079fbe210626e1e89b2b053a742a9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188522 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/master@{#32417} 5 年前
Use backticks not vertical bars to denote variables in comments for /modules/desktop_capture Bug: webrtc:12338 Change-Id: I300ba78fc4423db7030e555d7e51d2cb2246e9a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227162 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34678} 4 年前
Fixing the error logging in desktop_capture for Windows The desktop_capture code logs failed HRESULTs in several places, the problem is that it tries to use a wchar* (when a char* is required) for the error message and doesn't display the HRESULT in hex. This makes the error logging less useful than it could be. Example failure: error 08406B28, with code -2005270488 In this CL, I add a simple utility function to convert a _com_error object to a std::string whic can be logged. With this change the output looks like this (linebreak added for CL description): Failed to capture frame: HRESULT: 0x887A0026, Message: 'The keyed mutex was abandoned.' I also adjusted the formatting of a few logging statements to be more consistent (adding '<<' operators mostly). Bug: webrtc:12051 Change-Id: I3e88ff6f2ff079fbe210626e1e89b2b053a742a9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188522 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/master@{#32417} 5 年前
Use backticks not vertical bars to denote variables in comments for /modules/desktop_capture Bug: webrtc:12338 Change-Id: I300ba78fc4423db7030e555d7e51d2cb2246e9a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227162 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34678} 4 年前
Fixing the error logging in desktop_capture for Windows The desktop_capture code logs failed HRESULTs in several places, the problem is that it tries to use a wchar* (when a char* is required) for the error message and doesn't display the HRESULT in hex. This makes the error logging less useful than it could be. Example failure: error 08406B28, with code -2005270488 In this CL, I add a simple utility function to convert a _com_error object to a std::string whic can be logged. With this change the output looks like this (linebreak added for CL description): Failed to capture frame: HRESULT: 0x887A0026, Message: 'The keyed mutex was abandoned.' I also adjusted the formatting of a few logging statements to be more consistent (adding '<<' operators mostly). Bug: webrtc:12051 Change-Id: I3e88ff6f2ff079fbe210626e1e89b2b053a742a9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188522 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/master@{#32417} 5 年前
Lowercase windows includes in desktop_capture/. Allows building on case-sensitive file systems. BUG=None Change-Id: I0ecd494a5ed6e6dc2658d3918f88fa8692a471cf Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138180 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Commit-Queue: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28031} 6 年前
Add missing include Bug: webrtc:14009 Change-Id: I2d061266417b28d345e6bd88018380b01051952a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291113 Commit-Queue: Björn Terelius <terelius@webrtc.org> Reviewed-by: Alexander Cooper <alcooper@chromium.org> Cr-Commit-Position: refs/heads/main@{#39204} 3 年前
Format /modules git ls-files | grep -e "\(\.h\|\.cc\)$" | grep -e "^modules/" | xargs clang-format -i ; git cl format after landing: add to .git-blame-ignore-revs Bug: webrtc:15082 Change-Id: I2c3cd28740062794f8c10e39d8406aadb9e9a35a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301620 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Auto-Submit: Jared Siskin <jtsiskin@meta.com> Cr-Commit-Position: refs/heads/main@{#39901} 3 年前
Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" This reverts commit 3f87250a4f0e6c69002fbcdfb995b0dfcd7bf710. Reason for revert: Downstream is fixed Original change's description: > Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" > > This reverts commit 5f0eb93d2a44cec2102fc8c3757d5bb814bd145f. > > Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after. > > Original change's description: > > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely > > > > Bug: webrtc:13555, webrtc:13082 > > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260 > > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > > Reviewed-by: Artem Titov <titovartem@webrtc.org> > > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com> > > Cr-Commit-Position: refs/heads/main@{#35805} > > TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com > > Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:13555, webrtc:13082 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364 > Reviewed-by: Artem Titov <titovartem@webrtc.org> > Owners-Override: Artem Titov <titovartem@webrtc.org> > Reviewed-by: Andrey Logvin <landrey@webrtc.org> > Reviewed-by: Björn Terelius <terelius@webrtc.org> > Commit-Queue: Artem Titov <titovartem@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#35807} # Not skipping CQ checks because this is a reland. Bug: webrtc:13555, webrtc:13082 Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35814} 4 年前
Reformat the WebRTC code base Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}7 年前
Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" This reverts commit 3f87250a4f0e6c69002fbcdfb995b0dfcd7bf710. Reason for revert: Downstream is fixed Original change's description: > Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" > > This reverts commit 5f0eb93d2a44cec2102fc8c3757d5bb814bd145f. > > Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after. > > Original change's description: > > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely > > > > Bug: webrtc:13555, webrtc:13082 > > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260 > > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > > Reviewed-by: Artem Titov <titovartem@webrtc.org> > > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com> > > Cr-Commit-Position: refs/heads/main@{#35805} > > TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com > > Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:13555, webrtc:13082 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364 > Reviewed-by: Artem Titov <titovartem@webrtc.org> > Owners-Override: Artem Titov <titovartem@webrtc.org> > Reviewed-by: Andrey Logvin <landrey@webrtc.org> > Reviewed-by: Björn Terelius <terelius@webrtc.org> > Commit-Queue: Artem Titov <titovartem@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#35807} # Not skipping CQ checks because this is a reland. Bug: webrtc:13555, webrtc:13082 Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35814} 4 年前
Re-initialize the DXGI capturer when the DPI of the monitor changes I am updating Chrome Remote Desktop to apply a scale factor when using curtain mode (i.e. a loopback RDP session) and I've found that while the changes are applied and the desktop is scaled, DXGI stops producing frames. This is essentially the same issue as crbug.com/1307357 except this issue is occurring when the DPI is changed rather than the desktop size. The fix is to look at the effective DPI for the source being captured (or the primary monitor when capturing the full desktop) and then signaling an environment change when the DPI differs. Bug: webrtc:14894,b:154733991 Change-Id: Id768d4a384434ba59e7396bc919d0ba30d0f6acc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292791 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/main@{#39305} 3 年前
Format /modules git ls-files | grep -e "\(\.h\|\.cc\)$" | grep -e "^modules/" | xargs clang-format -i ; git cl format after landing: add to .git-blame-ignore-revs Bug: webrtc:15082 Change-Id: I2c3cd28740062794f8c10e39d8406aadb9e9a35a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301620 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Auto-Submit: Jared Siskin <jtsiskin@meta.com> Cr-Commit-Position: refs/heads/main@{#39901} 3 年前
Address followup feedback from webrtc-review 259457 https://webrtc-review.googlesource.com/c/src/+/259457 was a cherry-pick to M102; as such changes were not made there to keep the merge to just what had already landed. This addresses the issues raised on that CL. Bug: chromium:1316478 Change-Id: I94fad0aa6fe9c67aee5a2f2158524d75b51db48e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259660 Auto-Submit: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36631} 4 年前
DXGI now consumes may_contain_cursor Before: No attempt was made to figure out of the cursor was embedded into the captured video frame when using DXGI on Windows as screen capturer. Instead the cursor is superimposed on the frame by an external mouse and cursor composer. After: We now check if the display adapter supports embedding the mouse cursor and if so use it as is and thereby avoid adding it independently. Bug: chromium:1421656 Change-Id: Ie07fe13e1c8f9583769961328bb41fbc689cd8e0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299241 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39742} 3 年前
DXGI now consumes may_contain_cursor Before: No attempt was made to figure out of the cursor was embedded into the captured video frame when using DXGI on Windows as screen capturer. Instead the cursor is superimposed on the frame by an external mouse and cursor composer. After: We now check if the display adapter supports embedding the mouse cursor and if so use it as is and thereby avoid adding it independently. Bug: chromium:1421656 Change-Id: Ie07fe13e1c8f9583769961328bb41fbc689cd8e0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299241 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39742} 3 年前
Format almost everything. This CL was generated by running git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \ grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \ grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \ grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \ grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \ | xargs clang-format -i ; git cl format Most of these changes are clang-format grouping and reordering includes differently. Bug: webrtc:9340 Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051 Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28505} 6 年前
Re-initialize the DXGI capturer when the DPI of the monitor changes I am updating Chrome Remote Desktop to apply a scale factor when using curtain mode (i.e. a loopback RDP session) and I've found that while the changes are applied and the desktop is scaled, DXGI stops producing frames. This is essentially the same issue as crbug.com/1307357 except this issue is occurring when the DPI is changed rather than the desktop size. The fix is to look at the effective DPI for the source being captured (or the primary monitor when capturing the full desktop) and then signaling an environment change when the DPI differs. Bug: webrtc:14894,b:154733991 Change-Id: Id768d4a384434ba59e7396bc919d0ba30d0f6acc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292791 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/main@{#39305} 3 年前
Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" This reverts commit 3f87250a4f0e6c69002fbcdfb995b0dfcd7bf710. Reason for revert: Downstream is fixed Original change's description: > Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" > > This reverts commit 5f0eb93d2a44cec2102fc8c3757d5bb814bd145f. > > Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after. > > Original change's description: > > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely > > > > Bug: webrtc:13555, webrtc:13082 > > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260 > > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > > Reviewed-by: Artem Titov <titovartem@webrtc.org> > > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com> > > Cr-Commit-Position: refs/heads/main@{#35805} > > TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com > > Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:13555, webrtc:13082 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364 > Reviewed-by: Artem Titov <titovartem@webrtc.org> > Owners-Override: Artem Titov <titovartem@webrtc.org> > Reviewed-by: Andrey Logvin <landrey@webrtc.org> > Reviewed-by: Björn Terelius <terelius@webrtc.org> > Commit-Queue: Artem Titov <titovartem@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#35807} # Not skipping CQ checks because this is a reland. Bug: webrtc:13555, webrtc:13082 Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35814} 4 年前
Add telemetry to measure usage, perf, and errors in Desktop Capturers. As part of adding the new WgcCapturerWin implementation of the DesktopCapturer interface, we should ensure that we can measure the health and success of this new code. In order to quantify that, I've added telemetry to measure the usage of each capturer implementation, the time taken to capture a frame, and any errors that are encountered in the new implementation. I've also set the capturer id property of frames so that we can measure error rates and performance of each implementation in Chromium as well. This CL must be completed after this Chromium CL lands: 2806094: Add histograms to record new WebRTC DesktopCapturer telemetry | https://chromium-review.googlesource.com/c/chromium/src/+/2806094 Bug: webrtc:9273 Change-Id: I33b0a008568a4df4f95e705271badc3313872f17 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214060 Commit-Queue: Austin Orion <auorion@microsoft.com> Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Cr-Commit-Position: refs/heads/master@{#33716} 5 年前
Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" This reverts commit 3f87250a4f0e6c69002fbcdfb995b0dfcd7bf710. Reason for revert: Downstream is fixed Original change's description: > Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" > > This reverts commit 5f0eb93d2a44cec2102fc8c3757d5bb814bd145f. > > Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after. > > Original change's description: > > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely > > > > Bug: webrtc:13555, webrtc:13082 > > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260 > > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > > Reviewed-by: Artem Titov <titovartem@webrtc.org> > > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com> > > Cr-Commit-Position: refs/heads/main@{#35805} > > TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com > > Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:13555, webrtc:13082 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364 > Reviewed-by: Artem Titov <titovartem@webrtc.org> > Owners-Override: Artem Titov <titovartem@webrtc.org> > Reviewed-by: Andrey Logvin <landrey@webrtc.org> > Reviewed-by: Björn Terelius <terelius@webrtc.org> > Commit-Queue: Artem Titov <titovartem@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#35807} # Not skipping CQ checks because this is a reland. Bug: webrtc:13555, webrtc:13082 Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35814} 4 年前
Improve checks for "child" windows of selected capture targets. Previously windows other than the selected window will also be captured if they share the same process & thread, to allow child windows (e.g. popup menus) to be captured. This could result in child windows of other top-level windows run by the same process and thread being unintentionally captured. In attempt to err on the side of caution this check has been removed leaving some context menus and tooltips not recognized. Bug: webrtc:11455 Change-Id: I66acc4b133baa51a128202727c655c63b07b19ab Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176462 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Reviewed-by: Wez <wez@google.com> Commit-Queue: Jamie Walch <jamiewalch@chromium.org> Cr-Commit-Position: refs/heads/master@{#32395} 5 年前
Avoid capturing system UI over selected window This change avoids inadvertent capture of certain system windows (e.g. the Start menu, other taskbar menus, and notification toasts) when capturing a specific window on Windows. It stops using EnumWindows for detection of overlapping windows, because this API excludes these system windows from its enumeration. Using FindWindowEx instead enumerates these windows. The enumeration logic is refactored somewhat because a callback is no longer necessary. Bug: webrtc:10835 Change-Id: I1cccd44d6ef07f13a68e8daf2d2573d422001201 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161153 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Jamie Walch <jamiewalch@chromium.org> Cr-Commit-Position: refs/heads/master@{#30022} 6 年前
Reduces rate at which TryGetNextFrame returns NULL for WGC This CL is a follow-up of work done in https://webrtc-review.googlesource.com/c/src/+/323882 where the goal was to reduce the amount of FrameDropped error logs in WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult. The previous work avoids FrameDropped logs for a minimized window being captured with WGC but we still se a large amount of these error (or rather warning) logs. See [1] which comes from Canary. This CL does two different things to improve the situation: 1) It adds kFramePoolEmpty to the existing GetFrameResult::kFrameDropped enum to point out that the warning comes from the frame pool not being able to return a valid new frame. It also makes it more clear that it does not cause an outer/final error as WgcCapturerResult::kFrameDropped. We still keep the inner GetFrameResult::kFrameDropped but it is only produced when the frame pool returns NULL and our external queue is empty. Hence, a real frame-drop error. Note that, it is still easy to provoke kFramePoolEmpty simply by asking for a high resolution at a high rate. The example in [2] comes from a 4K screen @30fps. Hence, we have not fixed anything yet. 2) It also increases the size of the internal frame pool from 1 to 2. This does lead to an almost zero rate of kFramePoolEmpt warnings at the expense of a slightly reduced max capture rate. BUT, with 1 as size, we can "see" a higher max capture rate but it is not a true rate since it comes with a high rate of kFramePoolEmpty errors. Hence, we "emulate" a high capture rate by simply feeding copies of the last frame that we had stored in the external queue. Using 2 leads to a more "true" rate of what we actually can capture in terms of *new* frames and also a substantially lower rate of kFramePoolEmpty. In addition, with 1 as size, if we ask at a too high rate and provide a copy of the last frame, our CPU adaptation will not reduce its rate since we think that things are OK when it is actually not. Also, the samples in [3] and [4] both use 2 as numberOfBuffers as well. Let me also mention that with this small change, I a have not been able to provoke any kFramePoolEmpty error messages. Finally, geDisplayMedia can be called called with constraints where min and max framerate is defined. The mechanism which maintains the min rate is implemented via the RequestRefreshFrame API and it can be sent to the source (DesktopCaptureDevice) back to back with a previous timer interrupt for a capture request. Without this change, these RRFs were also a source of a large amount of kFramePoolEmpty error logs. With 2 buffers instead; this is no longer the case. [1] https://screenshot.googleplex.com/7sfv6HdGXLwyxdj [2] https://paste.googleplex.com/4795680001359872 [3] https://github.com/robmikh/Win32CaptureSample/blob/master/Win32CaptureSample/SimpleCapture.cpp [4] https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture#add-the-screen-capture-capability (cherry picked from commit 4be5927dc788b814dff2a6ca46175254dce59232) Bug: chromium:1314868 Change-Id: I73b823b31a993fd2cd6e007b212826dfe1a80012 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325521 Commit-Queue: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Alexander Cooper <alcooper@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#41079} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326960 Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Cr-Commit-Position: refs/branch-heads/6099@{#1} Cr-Branched-From: 507f1cc3270d0577f79882acbd78e63e66008f3d-refs/heads/main@{#41042} 2 年前
Reduces rate at which TryGetNextFrame returns NULL for WGC This CL is a follow-up of work done in https://webrtc-review.googlesource.com/c/src/+/323882 where the goal was to reduce the amount of FrameDropped error logs in WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult. The previous work avoids FrameDropped logs for a minimized window being captured with WGC but we still se a large amount of these error (or rather warning) logs. See [1] which comes from Canary. This CL does two different things to improve the situation: 1) It adds kFramePoolEmpty to the existing GetFrameResult::kFrameDropped enum to point out that the warning comes from the frame pool not being able to return a valid new frame. It also makes it more clear that it does not cause an outer/final error as WgcCapturerResult::kFrameDropped. We still keep the inner GetFrameResult::kFrameDropped but it is only produced when the frame pool returns NULL and our external queue is empty. Hence, a real frame-drop error. Note that, it is still easy to provoke kFramePoolEmpty simply by asking for a high resolution at a high rate. The example in [2] comes from a 4K screen @30fps. Hence, we have not fixed anything yet. 2) It also increases the size of the internal frame pool from 1 to 2. This does lead to an almost zero rate of kFramePoolEmpt warnings at the expense of a slightly reduced max capture rate. BUT, with 1 as size, we can "see" a higher max capture rate but it is not a true rate since it comes with a high rate of kFramePoolEmpty errors. Hence, we "emulate" a high capture rate by simply feeding copies of the last frame that we had stored in the external queue. Using 2 leads to a more "true" rate of what we actually can capture in terms of *new* frames and also a substantially lower rate of kFramePoolEmpty. In addition, with 1 as size, if we ask at a too high rate and provide a copy of the last frame, our CPU adaptation will not reduce its rate since we think that things are OK when it is actually not. Also, the samples in [3] and [4] both use 2 as numberOfBuffers as well. Let me also mention that with this small change, I a have not been able to provoke any kFramePoolEmpty error messages. Finally, geDisplayMedia can be called called with constraints where min and max framerate is defined. The mechanism which maintains the min rate is implemented via the RequestRefreshFrame API and it can be sent to the source (DesktopCaptureDevice) back to back with a previous timer interrupt for a capture request. Without this change, these RRFs were also a source of a large amount of kFramePoolEmpty error logs. With 2 buffers instead; this is no longer the case. [1] https://screenshot.googleplex.com/7sfv6HdGXLwyxdj [2] https://paste.googleplex.com/4795680001359872 [3] https://github.com/robmikh/Win32CaptureSample/blob/master/Win32CaptureSample/SimpleCapture.cpp [4] https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture#add-the-screen-capture-capability (cherry picked from commit 4be5927dc788b814dff2a6ca46175254dce59232) Bug: chromium:1314868 Change-Id: I73b823b31a993fd2cd6e007b212826dfe1a80012 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325521 Commit-Queue: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Alexander Cooper <alcooper@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#41079} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326960 Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Cr-Commit-Position: refs/branch-heads/6099@{#1} Cr-Branched-From: 507f1cc3270d0577f79882acbd78e63e66008f3d-refs/heads/main@{#41042} 2 年前
Improves comments for ShouldBeCapturable Bug: webrtc:1314868 Change-Id: Ia743d17d61d7d8ffc44030b5691efef1c7ed7991 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324305 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Alexander Cooper <alcooper@chromium.org> Cr-Commit-Position: refs/heads/main@{#40994} 2 年前
Improves comments for ShouldBeCapturable Bug: webrtc:1314868 Change-Id: Ia743d17d61d7d8ffc44030b5691efef1c7ed7991 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324305 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Alexander Cooper <alcooper@chromium.org> Cr-Commit-Position: refs/heads/main@{#40994} 2 年前
Fix failing WGC tests on Win10 Several tests starting failing when run on trybots on Win10. This CL fixes several issues that were uncovered. Issue 1: Capture failed to start because get_Size returned {0, 0}. This is a known issue in the WGC API that occurs when there are multiple user sessions on the same machine. Solution: Add a GetSize method to the WgcCaptureSource interface so we can fallback to other methods if get_Size fails. Issue 2: The screen capture tests assume there will be displays attached and fail if there aren't. Solution: Always run IsWgcSupported for the appropriate capture type. Issue 3: ASAN container-overflow in GetTestWindowIdFromSourceList Solution: Check the validity of the iterator before dereferencing. Issue 4: Occasionally, the call to GetMessage in the CloseWindowMidCapture test would hang because there were no messages in the queue. Solution: Use PeekMessage instead which will return if there are no messages. Bug: webrtc:14002 Change-Id: I69b2f765db87d34a41d6a1796cd5a81f4029be33 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260202 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Austin Orion <auorion@microsoft.com> Cr-Commit-Position: refs/heads/main@{#36802} 3 年前
Avoids spamming WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult with FrameDropped Without this change a FrameDropped sample will be added to WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult at the current capture rate as long as a captured window is minimized. Bug: webrtc:1314868 Change-Id: I9b68675486642e7ca25674df689c207ac94a206e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323882 Commit-Queue: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Alexander Cooper <alcooper@chromium.org> Cr-Commit-Position: refs/heads/main@{#40969} 2 年前
[DesktopCapture]: Allow toggling the visibility of the cursor This is a change needed to implement (cursor: 'never') https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings/cursor constraint. Bug: chromium:1007177 Change-Id: Id7fae62de180d46a3874856978a3fda559aa6477 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282861 Commit-Queue: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Alexander Cooper <alcooper@chromium.org> Cr-Commit-Position: refs/heads/main@{#38770} 3 年前
Replace Invoke in tests with SendTask test helper Bug: webrtc:11318 Change-Id: I14e3fbc694d41c785a61c88d8207005c681576c4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271540 Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37774} 3 年前
Refactor and implement WgcCapturerWin, a source agnostic capturer. This change refactors WgcWindowCapturer into WgcCapturerWin, a source agnostic capturer, and finishes the implementation to enable both window and screen capture. This CL depends on another which must complete first: 196622: Add ability to load CreateDirect3DDeviceFromDXGIDevice from d3d11.dll | https://webrtc-review.googlesource.com/c/src/+/196622 This feature remains off by default behind a build flag, due to it adding a depency on the Win10 SDK vv10.0.19041 which not all consumers of WebRTC have upgraded to. A follow up change later will enable the rtc_enable_win_wgc build flag, but for now it should remain off. The basic operation of this class is as follows: Consumers call either WgcCapturerWin::CreateRawWindowCapturer or CreateRawScreenCapturer to receive a correctly initialized WgcCapturerWin object suitable for the desired source type. Callers then indicate via SelectSource and a SourceId the desired capture target, and the capturer creates an appropriate WgcCaptureSource for the correct type (window or screen) using the WgcCaptureSourceFactory supplied at construction. Next, callers request frames for the currently selected source and the capturer then creates a WgcCaptureSession and stores it in a map for more efficient capture of multiple sources. The WgcCaptureSession is supplied with a GraphicsCaptureItem created by the WgcCaptureSource. It uses this item to create a Direct3D11CaptureFramePool and create and start a GraphicsCaptureSession. Once started, captured frames will begin to be deposited into the FramePool. Typically, one would listen for the FrameArrived event and process the frame then, but due to the synchronous nature of the DesktopCapturer interface, and to avoid a more complicated multi- threaded architecture we ignore the FrameArrived event. Instead, we wait for a request for a frame from the caller, then we check the FramePool for a frame, and process it on demand. Processing a frame involves moving the image data from an ID3D11Texture2D stored in the GPU into a texture that is accessible from the CPU, and then copying the data into the new WgcDesktopFrame class. This copy is necessary as otherwise we would need to manage the lifetimes of the CaptureFrame and ID3D11Texture2D objects, lest the buffer be invalidated. Once we've copied the data and returned it to the caller, we can unmap the texture and exit the scope of the GetFrame method, which will destruct the CaptureFrame object. At this point, the CaptureSession will begin capturing a new frame, and will soon deposit it into the FramePool and we can repeat. Bug: webrtc:9273 Change-Id: I02263c4fd587df652b04d5267fad8965330d0f5b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/200161 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Reviewed-by: Guido Urdaneta <guidou@webrtc.org> Commit-Queue: Austin Orion <auorion@microsoft.com> Cr-Commit-Position: refs/heads/master@{#33083} 5 年前
Use backticks not vertical bars to denote variables in comments for /modules/desktop_capture Bug: webrtc:12338 Change-Id: I300ba78fc4423db7030e555d7e51d2cb2246e9a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227162 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34678} 4 年前
win: Consolidate on a single version checking API No intended behavior change. Happens to remove one call to GetVersionEx. Bug: chromium:1255114 Change-Id: If4d1c57fa27ad4a7547f8f18c3abe38bc9b2a325 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234160 Reviewed-by: Joe Downing <joedow@chromium.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35146} 4 年前
Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" This reverts commit 3f87250a4f0e6c69002fbcdfb995b0dfcd7bf710. Reason for revert: Downstream is fixed Original change's description: > Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" > > This reverts commit 5f0eb93d2a44cec2102fc8c3757d5bb814bd145f. > > Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after. > > Original change's description: > > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely > > > > Bug: webrtc:13555, webrtc:13082 > > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260 > > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > > Reviewed-by: Artem Titov <titovartem@webrtc.org> > > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com> > > Cr-Commit-Position: refs/heads/main@{#35805} > > TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com > > Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:13555, webrtc:13082 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364 > Reviewed-by: Artem Titov <titovartem@webrtc.org> > Owners-Override: Artem Titov <titovartem@webrtc.org> > Reviewed-by: Andrey Logvin <landrey@webrtc.org> > Reviewed-by: Björn Terelius <terelius@webrtc.org> > Commit-Queue: Artem Titov <titovartem@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#35807} # Not skipping CQ checks because this is a reland. Bug: webrtc:13555, webrtc:13082 Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35814} 4 年前
Replace Invoke in tests with SendTask test helper Bug: webrtc:11318 Change-Id: I14e3fbc694d41c785a61c88d8207005c681576c4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271540 Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37774} 3 年前
Don't override permanent errors in WindowCapturerWinGdi. This is a follow up to this CL https://webrtc-review.googlesource.com/c/src/+/269223 which unintentionally prevents the WindowCapturerWinGdi from returning permanent errors. Bug: webrtc:14265 Change-Id: I8eb9f8852fb6247a045d32e407ebdd5f45e6aa9d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271880 Reviewed-by: Mark Foltz <mfoltz@chromium.org> Commit-Queue: Mark Foltz <mfoltz@chromium.org> Cr-Commit-Position: refs/heads/main@{#37847} 3 年前
Use backticks not vertical bars to denote variables in comments for /modules/desktop_capture Bug: webrtc:12338 Change-Id: I300ba78fc4423db7030e555d7e51d2cb2246e9a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227162 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34678} 4 年前