When Windows is switching display mode, DirectX based capturer may not be able
to create a new IDXGIOutputDuplication instance, which is expected. So it should
return a temporary error instead of a permanent error.
BUG=
Review-Url: https://codereview.webrtc.org/2092543003
Cr-Commit-Position: refs/heads/master@{#13279}
The method was deprecated and shouldn't be used anywhere now.
BUG=webrtc:5950
Review-Url: https://codereview.webrtc.org/2080573004
Cr-Commit-Position: refs/heads/master@{#13248}
Changes:
* Enabled protobuf for iOS globally.
* Set WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE on a global
scope similar to GYP since tests depend on it.
* Added missing rtc_libvpx_build_vp9 variable.
* Moved out audio_coding defines into .gni file to avoid code duplication
* Renamed files to avoid object naming conflicts that GN disallows:
* webrtc/modules/audio_processing/{echo_cancellation_unittest.cc->echo_cancellation_bit_exact_unittest.cc}
* webrtc/modules/video_coding/codecs/vp9/{screenshare_layers_unittest.cc->vp9_screenshare_layers_unittest.cc}
BUG=webrtc:5949
TESTED=Built and ran the tests on Mac. Also ran:
gn gen out/Default --args="rtc_enable_bwe_test_logging=true"
and verified that more objects are being built (1885 vs 1883)
when compiling modules_unittests.
NOTRY=True
NOPRESUBMIT=True
Review-Url: https://codereview.webrtc.org/2041233006
Cr-Commit-Position: refs/heads/master@{#13108}
Previously RefCountedObject was passing all parameters by value.
This meant that it was hard to use it with movable types, such
as unique_ptr<>. Now there is a constructor that takes r-value,
which means that RefCountedObject<std::unique_ptr<foo>> can be
initialized by passing std::unique_ptr<foo> to the constructor.
Review-Url: https://codereview.webrtc.org/2036123002
Cr-Commit-Position: refs/heads/master@{#13079}
Previously raw pointers were used for owned DesktopFrame instances.
Updated all screen and window capturer implementations to use
std::unique_ptr<>.
Also includes some other cleanups in the capturers:
- s/NULL/nullptr
- moved default initializers to class definition.
BUG=webrtc:5950
Review-Url: https://codereview.webrtc.org/1988783003
Cr-Commit-Position: refs/heads/master@{#13058}
Reason for revert:
Broke chromium builder
Original issue's description:
> Use std::unique_ptr<> to pass frame ownership in DesktopCapturer impls.
>
> Previously raw pointers were used for owned DesktopFrame instances.
> Updated all screen and window capturer implementations to use
> std::unique_ptr<>.
>
> Also includes some other cleanups in the capturers:
> - s/NULL/nullptr
> - moved default initializers to class definition.
>
> BUG=webrtc:5950
>
> Committed: https://crrev.com/4a627a8c13554d12412cabb8f751caee6e61ee32
> Cr-Commit-Position: refs/heads/master@{#13032}
TBR=wez@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5950
Review-Url: https://codereview.webrtc.org/2030333003
Cr-Commit-Position: refs/heads/master@{#13033}
Previously raw pointers were used for owned DesktopFrame instances.
Updated all screen and window capturer implementations to use
std::unique_ptr<>.
Also includes some other cleanups in the capturers:
- s/NULL/nullptr
- moved default initializers to class definition.
BUG=webrtc:5950
Review-Url: https://codereview.webrtc.org/1988783003
Cr-Commit-Position: refs/heads/master@{#13032}
Reason for revert:
Breaks user code. Said code needs to stop using scoped_ptr!
Original issue's description:
> Remove webrtc/base/scoped_ptr.h
>
> BUG=webrtc:5520
>
> NOTRY=True
>
> Committed: https://crrev.com/65fc62e9dd8a8716db625aaef76ab92f542ecc5a
> Cr-Commit-Position: refs/heads/master@{#12684}
TBR=tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5520
Review-Url: https://codereview.webrtc.org/1965063003
Cr-Commit-Position: refs/heads/master@{#12686}
They're just no-ops now, and will soon go away.
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1914153002
Cr-Commit-Position: refs/heads/master@{#12510}
Any file that uses the RTC_DISALLOW_* macros should #include
"webrtc/base/constructormagic.h", but a shocking number of them don't.
This causes trouble when we try to wean files off of #including
scoped_ptr.h, since a bunch of files get their constructormagic macros
only from there.
Rather than fixing these errors one by one as they turn up, this CL
simply ensures that every file in the WebRTC tree that uses the
RTC_DISALLOW_* macros #includes "webrtc/base/constructormagic.h".
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1917043005
Cr-Commit-Position: refs/heads/master@{#12509}
They can all benefit from moving, since they contain std::string and
std::vector. We intended to add these in
https://codereview.webrtc.org/1896953004/, but got compiler errors we
couldn't make sense of, so we skipped them. It turns out that what the
compiler was complaining about was that when we said we'd have a
user-defined move constructor, it stopped generating a copy assignment
operator for us. This CL solves the problem by outfitting the types
with defaulted copy and move assignment operators too.
Review URL: https://codereview.webrtc.org/1899173002
Cr-Commit-Position: refs/heads/master@{#12469}
Removed deprecated files, types and methods in modules/webrtc that were
kept there to avoid breaking chromium, and which are no longer needed.
BUG=172183
Review URL: https://codereview.webrtc.org/1909593002
Cr-Commit-Position: refs/heads/master@{#12457}
Reason for revert:
This is preventing a WebRTC roll into Chromium. See https://codereview.chromium.org/1877263003/
Original issue's description:
> Fix screen capturers to initialize on the same thread on which Start() is called.
>
> Previously screen capturers were initialized when they are created.
> This means that in the CRD host they were initialized on the thread
> that's different from the thread on which they are used. Because of this
> on Linux the host was using XErrorTrap() on two different threads and
> this is not supported. Now ScreenCapturer implementations always
> initialize themselves on the thread on which Start() is called.
>
> Also added ThreadChecker to make sure the capturers are always called
> from the same thread.
>
> BUG=600432
>
> Committed: https://crrev.com/e8d4b7d8a3d298438a2ebd9ee8d5aa71f42cf033
> Cr-Commit-Position: refs/heads/master@{#12285}
TBR=jamiewalch@chromium.org,sergeyu@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=600432
Review URL: https://codereview.webrtc.org/1882083002
Cr-Commit-Position: refs/heads/master@{#12334}
Previously screen capturers were initialized when they are created.
This means that in the CRD host they were initialized on the thread
that's different from the thread on which they are used. Because of this
on Linux the host was using XErrorTrap() on two different threads and
this is not supported. Now ScreenCapturer implementations always
initialize themselves on the thread on which Start() is called.
Also added ThreadChecker to make sure the capturers are always called
from the same thread.
BUG=600432
Review URL: https://codereview.webrtc.org/1861893002
Cr-Commit-Position: refs/heads/master@{#12285}
ScreenCapturerMac wasn't handling the following two cases properly
which could cause crashes:
1. CGDisplayCreateImage() returns image with depth other than 32-bit
2. CGDisplayCreateImage() returns image with dimensions different
from expected (e.g. when screen resolution is being changed).
I suspect that (2) was causing the linked bug.
BUG=crbug.com/504927
R=jiayl@webrtc.org
Review URL: https://codereview.webrtc.org/1816723002 .
Cr-Commit-Position: refs/heads/master@{#12077}
Removes code duplication and use of the dangerous public destructor in
RefCountImpl.
Also making wider use of scoped_refptr and fixing various leaks in the
process.
BUG=webrtc:5229
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1477013005 .
Cr-Commit-Position: refs/heads/master@{#12075}
Reason for revert:
The openmax_dl include change breaks downstream projects.
Original issue's description:
> Add check_deps rules in DEPS files.
>
> Add fine-grained check_deps rules for all of WebRTC.
> This will help both maintaining sane dependencies and provides a way
> to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.
>
> Example:
> buildtools/checkdeps/graphdeps.py --root=. --format=png \
> --out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
> --excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'
>
> will produce a neat webrtc.png image showcasing the dependencies
> (according to the DEPS file) for the bitrate_controller module.
> Some dependencies are filtered out for readability.
>
> BUG=webrtc:5623
> TESTED=Passing runs using:
> buildtools/checkdeps/checkdeps.py --root=. talk
> buildtools/checkdeps/checkdeps.py --root=. webrtc
>
> R=tommi@webrtc.org
>
> Committed: https://crrev.com/086f851b7b9b4bcbd4fe507c3bf83b760bd7f4d9
> Cr-Commit-Position: refs/heads/master@{#12008}
TBR=tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5623
Review URL: https://codereview.webrtc.org/1808573002
Cr-Commit-Position: refs/heads/master@{#12009}
Add fine-grained check_deps rules for all of WebRTC.
This will help both maintaining sane dependencies and provides a way
to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.
Example:
buildtools/checkdeps/graphdeps.py --root=. --format=png \
--out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
--excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'
will produce a neat webrtc.png image showcasing the dependencies
(according to the DEPS file) for the bitrate_controller module.
Some dependencies are filtered out for readability.
BUG=webrtc:5623
TESTED=Passing runs using:
buildtools/checkdeps/checkdeps.py --root=. talk
buildtools/checkdeps/checkdeps.py --root=. webrtc
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1796413002 .
Cr-Commit-Position: refs/heads/master@{#12008}
Previously shared memory buffers for DesktopCapturer were created
using DesktopCapturer::Callback::CreateSharedBuffer(). That made it
difficult to proxy DesktopCapturer interface from one thread to another.
This CL adds SharedBufferFactory interface that's allowed to be called
on a background thread. This also simplifies clients that don't
need to use shared memory, as they no longer need to override
CreateSharedBuffer().
Review URL: https://codereview.webrtc.org/1678073003
Cr-Commit-Position: refs/heads/master@{#11543}
BUG=chromium:575990
TEST: Manual test using TextEdit full screen mode.
Review URL: https://codereview.webrtc.org/1579213007
Cr-Commit-Position: refs/heads/master@{#11311}
This removes a dependency on Chromium's build/build_config.h
(which is not allowed).
The added defines are identical to the ones in build/build_config.h.
NOTRY=True
Review URL: https://codereview.webrtc.org/1532333002
Cr-Commit-Position: refs/heads/master@{#11082}
We can now use std::move instead!
This CL leaves the Pass methods in place; a follow-up CL will add deprecation annotations to them.
Review URL: https://codereview.webrtc.org/1460043002
Cr-Commit-Position: refs/heads/master@{#11064}
Fixes one sign mismatch warning, and one "const has no effect and is
ignored" warning.
BUG=chromium:567877
Review URL: https://codereview.webrtc.org/1510233002
Cr-Commit-Position: refs/heads/master@{#10976}
Microsoft introduced modern app from win8. Modern apps can be used cross Microsoft's platforms.
It was confirmed from Microsoft that there is no support for modern app's window capture.
BUG=526883
Review URL: https://codereview.webrtc.org/1371383003
Cr-Commit-Position: refs/heads/master@{#10154}
We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.
Alternative solutions:
* Check if we already have defined e.g. CHECK, and don't define them in that case. This makes us depend on include order in Chromium, which is not acceptable.
* Don't allow using the macros in WebRTC headers. Error prone since if someone adds it there by mistake it may compile fine, but later break if a header in added or order is changed in Chromium. That will be confusing and hard to enforce.
* Ensure that headers that are included by an embedder don't include our macros. This would require some heavy refactoring to be maintainable and enforcable.
* Changes in Chromium for this is obviously not an option.
BUG=chromium:468375
NOTRY=true
Review URL: https://codereview.webrtc.org/1335923002
Cr-Commit-Position: refs/heads/master@{#9964}
We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.
* DISALLOW_ASSIGN -> RTC_DISALLOW_ASSIGN
* DISALLOW_COPY_AND_ASSIGN -> RTC_DISALLOW_COPY_AND_ASSIGN
* DISALLOW_IMPLICIT_CONSTRUCTORS -> RTC_DISALLOW_IMPLICIT_CONSTRUCTORS
Related CL: https://codereview.webrtc.org/1335923002/
BUG=chromium:468375
NOTRY=true
Review URL: https://codereview.webrtc.org/1345433002
Cr-Commit-Position: refs/heads/master@{#9953}
DesktopFrameWin::Create() may return nullptr when it fails to allocate
windows bitmap. ScreenCapturerWinGdi wasn't handling that case properly.
BUG=527660
Review URL: https://codereview.webrtc.org/1309143007
Cr-Commit-Position: refs/heads/master@{#9865}