The SrtpTransport takes the SRTP responsibilities from the BaseChannel
and SrtpFilter. SrtpTransport is now responsible for setting the crypto
keys, protecting and unprotecting the packets. SrtpTransport doesn't know
if the keys are from SDES or DTLS handshake.
BaseChannel is now only responsible setting the offer/answer for SDES
or extracting the key from DtlsTransport and configuring the
SrtpTransport.
SrtpFilter is used by BaseChannel as a helper for SDES negotiation.
BUG=webrtc:7013
Review-Url: https://codereview.webrtc.org/2997983002
Cr-Commit-Position: refs/heads/master@{#19636}
This is good for a few reasons:
- We avoid grabing a lock twice.
- We avoid an unnecessary copy.
- We avoid a race where a packet could potentially be removed before the
second time we call GetCodecHeader.
BUG=None
Review-Url: https://codereview.webrtc.org/3009833002
Cr-Commit-Position: refs/heads/master@{#19635}
Ownership of EglBase is moved to PeerConnectionClient.
BUG=webrtc:8135
Review-Url: https://codereview.webrtc.org/3007893002
Cr-Commit-Position: refs/heads/master@{#19634}
Receive logic in voe::Channel attempted to handle RTX if
RTPPayloadRegistry::IsRtx returns true, but the audio code never calls
the config methods (SetRtxSsrc or SetRtxPayloadType) required for that
to ever happen.
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/3006913002
Cr-Commit-Position: refs/heads/master@{#19633}
This CL contains automatically applied fixes suggested by the
ClangTidy analyzer (http://clang.llvm.org/extra/clang-tidy/). The
following kinds of fixes is present:
* renaming variables when the names in the method signature don't
match the names in the method definition
(ClangTidy:readability-inconsistent-declaration-parameter-name)
* ClangTidy:readability-container-size-empty,
ClangTidy:misc-unused-using-decls,
ClangTidy:performance-unnecessary-value-param,
ClangTidy:readability-redundant-control-flow
This is a 'pilot' CL to check if automatic code analyzers can
feasibly be integrated into the WebRTC infrastructuve.
The renamings have been manually expected for consistency with
surrounding code. In echo_cancellation.cc, I changed several names in
the function implementation to match the function declaration. The
tool suggested changing everything to match the function definitions
instead.
Bug: None
Change-Id: Id3b7ba18c51f15b025f26090c7bdcc642e48d8fd
Reviewed-on: https://chromium-review.googlesource.com/635766
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19630}
We want to reuse some of this functionality for the new video codec
factories, but not of all it, so this CL refactors out what we want to
reuse to a static function.
BUG=webrtc:7925
Review-Url: https://codereview.webrtc.org/3010743002
Cr-Commit-Position: refs/heads/master@{#19628}
Problem fixed by this CL: Let DerivedQueuedTask be a custom derivation of QueuedTask. Calling PostTask() with a std::unique_ptr<DerivedQueuedTask> does not work, because overload resolution sees PostTask(const Closure& closure) as a better match. The workaround of explicitly converting to std::unique_ptr<QueuedTask> before calling PostTask() results in less readable code.
Solution: Use std::enable_if to limit the template, thereby making the compiler use the right version of PostTask().
BUG=webrtc:8188
Review-Url: https://codereview.webrtc.org/3006933002
Cr-Commit-Position: refs/heads/master@{#19625}
The millisecond field is deprecated and will be removed once the
dependencies have been updated.
BUG=webrtc:7760
Review-Url: https://codereview.webrtc.org/3010623002
Cr-Commit-Position: refs/heads/master@{#19622}
This is the first step towards supporting multiple audio/video
channels in PeerConnection/WebRtcSession. For now, there can only
be 0 or 1 channels in the vector. This adds the framework so that
all the other code that assumes a single audio/video channel can
be transitioned one-by-one to multiple channels.
Bug: webrtc:8183
Change-Id: I6456af32d6e3adf7eb83e281e43253ea973c4eb9
Reviewed-on: https://chromium-review.googlesource.com/644222
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19615}
GetCroppingWindowRect() is too generic and easy to be misused. For example, in
WindowCapturerWin, it's used to calculate the DesktopRect of the target window,
which is inaccurate. See the screenshot in the bug, it wrongly crops borders on
Windows 8+.
So GetCroppingWindowRect() should be removed eventually, the logic should be
placed in CroppingWindowCapturerWin. But since it's still used in the deprecated
logic in MouseCursorMonitorWin, I would prefer to remove this function after
MouseCursorMonitor improvement has been finished.
But before that, WindowCapturerWin should use GetWindowDrawableRect() instead of
GetCroppedWindowRect() to avoid the wrongly cropping behavior on Windows 8+.
Bug: webrtc:8157
Change-Id: I012b663dced8105623c563dbe55ffcb8d7f17f75
Reviewed-on: https://chromium-review.googlesource.com/642092
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19614}
As discussed in change
https://chromium-review.googlesource.com/c/external/webrtc/+/634043, the name of
IsWindowMinimized() functions is too confusing. IsWindowOnScreen() is preferred,
since it describes the behavior of the functions more accurately.
This change does not flip the default behavior of these functions to avoid a
behavior change. TODO has been added; and the flipping will happen in a
following change.
Bug: chromium:758554
Change-Id: I009c0fa57142756e5c83f76b2a3561253db1b67f
Reviewed-on: https://chromium-review.googlesource.com/641814
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19613}
also C++ code (see https://bugs.chromium.org/p/webrtc/issues/detail?id=7743
for more information).
To achieve this we have created 2 targets (desktop_capture_objc and
desktop_capture_generic) and desktop_capture will act as a proxy between these
targets (this way we can avoid a circular dependency between
desktop_capture_generic and desktop_capture_objc).
BUG=webrtc:7743
Review-Url: https://codereview.webrtc.org/2989053002
Cr-Commit-Position: refs/heads/master@{#19607}
* First do all frame processing, then do all rate control
statistics calculations. This means that we only need to
synchronize once.
* Run the VideoProcessor on a task queue, thus supporting Android
HW codecs.
* Add some unit tests for the VideoProcessor.
BUG=webrtc:6634
Review-Url: https://codereview.webrtc.org/2997283002
Cr-Commit-Position: refs/heads/master@{#19604}
This CL increases the amount of API call jitter that is allowed in AEC3
without causing resets of AEC3. This increase is now possible, as non-
causal alignments will be detected by the newly imposed delay bound.
BUG=8175
Review-Url: https://codereview.webrtc.org/3012553002
Cr-Commit-Position: refs/heads/master@{#19603}
We were leaking a fragmentation header object on each frame.
BUG=webrtc:8132
Review-Url: https://codereview.webrtc.org/3004013002
Cr-Commit-Position: refs/heads/master@{#19602}
directives in our DEPS files are not needed anymore.
Includes from webrtc/rtc_base are also whitelisted in webrtc/DEPS
so we don't have to whitelist it in all the others DEPS files.
BUG=webrtc:7634
NOTRY=True
Review-Url: https://codereview.webrtc.org/3006583002
Cr-Commit-Position: refs/heads/master@{#19601}
This CL encapsulates the logic for unifying the internal and external
video encoders into a helper class. The purpose is to prepare for
introducing a new video encoder factory interface that inherently
represents all encoders (i.e. both internal and external). A helper
interface EncoderFactoryAdapter is introduced that both the old
WebRtcVideoEncoderFactory and the new factory interface can implement
and serves as common point to leave the rest of the code unchanged.
BUG=webrtc:7925
Review-Url: https://codereview.webrtc.org/3006713002
Cr-Commit-Position: refs/heads/master@{#19600}
New metric is a ratio between SentFramesPerSecond and
InputFramesPerSecond. It's needed to measure how much of input frames
are actually sent.
BUG=webrtc:8178
Review-Url: https://codereview.webrtc.org/3010723002
Cr-Commit-Position: refs/heads/master@{#19596}
The extension ID for transport sequence number is added to the list of
known RTP header extensions. Also, the minimum and maximum waiting
time for packets is now aggregated as minimum and maximum,
respectively, not as averages.
BUG=none
Review-Url: https://codereview.webrtc.org/3004783003
Cr-Commit-Position: refs/heads/master@{#19593}
This change adds one temporary use_desktop_relative_cursor_position_ flag in
DesktopAndCursorComposer. It's automatically set according to the consturctor
used.
When the flag is true, DesktopAndCursorComposer uses the newly added
MouseCursorMonitor::Callback::OnCursorPosition(), which is the absolute position
of the cursor in the full desktop coordinate, and DesktopCapturer::IsOccluded()
to decide whether the mouse cursor should be drawn on the DesktopFrame.
When the flag is false, the behavior of DesktopAndCursorComposer is unchanged.
This flag will be removed together with the deprecated constructor of
DesktopAndCursorComposer.
Currently the new DesktopAndCursorComposer constructor is not used, so no
behavior change is expected.
Bug: webrtc:7950
Change-Id: I7235e32fa325a21c4a2594613764a9f81d76dfbc
Reviewed-on: https://chromium-review.googlesource.com/641075
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19592}
XWindowAttributes.x and y are in the coordinate of the parent window, so
XTranslateCoordinates() should be used to do the translation.
Meanwhile this change reduces the scope of the XErrorTrap in GetWindowList()
function to ensure the callback can use other XErrorTrap to cover other X
function calls.
Bug: webrtc:7950
Change-Id: I520227b11704c5a0cb665d9de86925ed4e86540d
Reviewed-on: https://chromium-review.googlesource.com/639590
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Zijie He <zijiehe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19591}
In this change,
bool DesktopCapturer::IsOccluded(const DesktopVector& pos);
is added to DesktopCapturer interface. This function returns true if the |pos|
is hidden by other elements on the display.
The function expects to return false for ScreenCapturer implementations:
everything is visible on the screen.
In WindowCapturer implementations, WindowFinder is expected to be used to help
detect the WindowId under |pos|. If the window_id_ equals to the window id
returned by WindowFinder, this function returns false.
To ensure the correct coordinate is used, a comment is also added to
WindowFinder::GetWindowUnderPoint() function. Considering it's used only in
desktop_capture module, using system coordinate is simpler.
Bug: webrtc:7950
Change-Id: I8ac4fbd5f4a612388f1593907805cfb2c359f70f
Reviewed-on: https://chromium-review.googlesource.com/636784
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Zijie He <zijiehe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19590}
Replacing the RTC_DCHECK with an if condition so that the method GetOptionsForAnswer
won't crash when there is no remote description. WebRtcSessionDescriptionFactory
will handle the null remote description.
TBR=deadbeef@webrtc.org
BUG=chromium:757830
Review-Url: https://codereview.webrtc.org/3006723002
Cr-Commit-Position: refs/heads/master@{#19589}
This CL fixes a small bug, causing the matlab plot script to contain
empty vectors. Also, the script file name is fixed, to avoid two
periods (.) in the file name; matlab did not like that.
BUG=none
Review-Url: https://codereview.webrtc.org/3004813002
Cr-Commit-Position: refs/heads/master@{#19586}
Like YuvFileGenerator, this also updates the display with a new slide on every Nth frame, but it generates the slides itself instead of reading them from files.
BUG=webrtc:8138
Review-Url: https://codereview.webrtc.org/3003193002
Cr-Commit-Position: refs/heads/master@{#19585}
DirectTransport::task_queue_ previously could not be const, because of a hack for the deprecated version of DirectTransport. That is no longer the case.
BUG=webrtc:8125
TBR=stefan@webrtc.org
Review-Url: https://codereview.webrtc.org/3012483002
Cr-Commit-Position: refs/heads/master@{#19583}
Increase timeout since the wait function timed out in certain debugging
circumstances. Also change the check to a DCHECK since it is not really
a critical error if it would time out.
BUG=None
Review-Url: https://codereview.webrtc.org/3007773002
Cr-Commit-Position: refs/heads/master@{#19582}
Will remove default implementations as well once landed and removed
in Chrome as well.
These two AudioDeviceModule APIs are removed:
int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight)
int32_t WaveOutVolume(uint16_t* volumeLeft, uint16_t* volumeRight) const
BUG=webrtc:7306
Review-Url: https://codereview.webrtc.org/3006793002
Cr-Commit-Position: refs/heads/master@{#19581}
The native interface is added in the private file
webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h.
BUG=webrtc:8093
Review-Url: https://codereview.webrtc.org/3012443002
Cr-Commit-Position: refs/heads/master@{#19576}
The following fields are logged:
- error, if there was an error.
- elapsed time in milliseconds
BUG=webrtc:8100
Review-Url: https://codereview.webrtc.org/2996933003
Cr-Commit-Position: refs/heads/master@{#19574}