Commit Graph

186 Commits

Author SHA1 Message Date
7eea667228 Fix bugs in discarding stun address
If mdns obfuscation is enabled, the stun address "MUST NOT be
considered redundant" when it is equal to local socket address.
Reference:
https://datatracker.ietf.org/doc/html/draft-ietf-mmusic-mdns-ice-candidates-03#section-3.1.2.2

This fixes

Bug: webrtc:13426
Change-Id: I28e981fd1b8818f6f8294bc3fedf23b8d9146819
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285421
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38774}
2022-11-30 13:51:41 +00:00
3f2a3b19e3 [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}
2022-11-29 23:06:44 +00:00
fd9a1e1d98 modules/video_capture: add NV12 support on Linux
Add native NV12 support on Linux v4l2 video_capture module.

Bug: webrtc:14650
Change-Id: I97e2010be4f15168b218da4855be8b0e985008a5
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282841
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38753}
2022-11-29 11:59:52 +00:00
45c882e4be Allow maxptime equal to minptime in the SDP.
The DCHECK crashes debug builds running some applications such as Webex.

Bug: None
Change-Id: I0061286c4c1d04964678a00014896f1fccd4685d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276460
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38644}
2022-11-16 10:54:03 +00:00
e457e43836 Fix bug where RTCTransportStats.dtlsCipher was missing when using OpenSSL
A bug in the id being searched for inside OpenSSLStreamAdapter::SslCipherSuiteToName prevented the lookup from ever succeeding.

This resulted in this stat being unavailable when calling PeerConnection::GetStats(). To fix the problem, look for (0x03000000L | cipher_suite) which matches what the BoringSSL codepath is doing.

Bug: webrtc:14596
Change-Id: Ic36d77dbc4c2378fbde1e2f21a9f5bd735b36741
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280100
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38460}
2022-10-24 20:51:33 +00:00
4dc6e05ac9 Expose peer connection's getStats by RtpSender/Receiver in Android SDK
Currently if you want to obtain the stats for a specific sender/receiver
in Android, you need to call peerConnection.getStats() and filter
manually the result by sender.

pc.getStats(receiver/sender) exists in c++ and ios but was not exposed
in Android

Bug: webrtc:14547
Change-Id: I9954434880f0f93821fcd2e2de24a875e8d136ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275880
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38428}
2022-10-18 09:41:26 +00:00
842858c6d0 loongarch: Add loongarch architecture support.
Copied from chromium's build/build_config.h

No-Try: True
Bug: webrtc:14433
Change-Id: I5ab4dbb49bd74aa8f6f6054776d9f1f3d606d914
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275288
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@google.com>
Cr-Commit-Position: refs/heads/main@{#38067}
2022-09-13 10:44:59 +00:00
bc8a62b244 Enable Multithreaded H264 Encoding For OpenH264
Re-enabled multithreaded encoding using OpenH264, as the issue described in crbug.com/583348 no longer applies.

Bug: webrtc:14368
Change-Id: I5ae768a6edf3b40d99c13fb4ee4662626c993a66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271820
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37837}
2022-08-19 10:30:37 +00:00
e04d0fa1b2 Fix Event Log For Video Receiver
Resolves an issue where, in Chrome, WebRTC event logs do not capture outgoing packets for video receivers because no reference to the event log was passed to the video receiver.

Bug: webrtc:14338
Change-Id: Ia33ce6f2d69a0e341530648b10a08516dc53abf3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271080
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37746}
2022-08-11 12:15:52 +00:00
a13b048870 Fixed mistake in DelayBasedBwe. Use audio_inter_arrival_delta_ when separate audio is enabled.
Bug: None
Change-Id: Ie657126a89d3a9177d2b76e876afa5da8cac9d48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266490
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37638}
2022-07-28 09:31:49 +00:00
275e2683b3 Fix sharing full screen PowerPoint pres on macOS
Before this change the full screen application handler was failing to
detect PowerPoint going into presentation mode, resulting in the editor
window continuing to be shared rather than the intended behavior of
sharing the presentation itself.

Fix this by always looking for the PowerPoint full screen presentation
window, regardless of whether the editor window is still open. In
the current version of PowerPoint, the editor stays open during
presentation.

Bug: chromium:1231437
Change-Id: I1b21e263d25320cc236d127d22d4d64bb52fcbda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269560
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#37632}
2022-07-27 23:53:00 +00:00
99465b1395 Add missing header to fix build error when using linux system libraries
Change-Id: I4fc04563c2cfe36fa2352f72f2ae61d47972f025
Bug: webrtc:11226
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268194
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Auto-Submit: Bruno Pitrus <brunopitrus@hotmail.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37555}
2022-07-19 12:25:42 +00:00
1e8bb67295 GCC: Avoid symbol clash in RenderBuffer
GCC fails to resolve getter for RenderBuffer::Block() because
its return type has the same name with the getter method.
Rename getter method with the prefix "Get" as guided in the
https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/blink-c++.md#Precede-setters-with-the-word-Set_use-bare-words-for-getters
"If a getter’s name collides with a type name, prefix it with “Get”."

Bug: chromium:819294, webrtc:14089
Change-Id: Ieaa3af27415eb8c39806aa8480897b47fd07baa8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263420
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36982}
2022-05-24 10:47:56 +00:00
abe523d0a5 Switch SSE2 architecture check to x86 platforms only
This allows builds on non-x86 architectures such
as ppc64el.

Bug: webrtc:14057
Signed-off-by: Timothy Pearson <tpearson@raptorcs.com>
Change-Id: Ie2c1023d2c1d041ba1d140f06af432ed9e9f7432
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262002
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#36856}
2022-05-11 18:12:54 +00:00
f2fe43b655 Don't round the computed time deltas to nearest ms.
Resolving https://bugs.chromium.org/p/webrtc/issues/detail?id=14023

At the moment, in DelayBasedBwe the time deltas are rounded to the
nearest millisecond. This change makes sure the numbers are passed as
doubles as expected by the TrendlineEstimator.

Change-Id: I68882547fb19af0e67e7b5d8de4159083a54d7eb
Bug: webrtc:14023
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261320
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36806}
2022-05-09 07:02:46 +00:00
901736fa3c Fix crash in peerconnection_client example code
Use rtc::scoped_refptr to keep object pointers valid

Bug: webrtc:13993
Change-Id: Iffb6bf47e97606bfa3c2e9d8814a56cf509abbd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259940
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36645}
2022-04-25 14:18:52 +00:00
edbaf57bd4 Fix a dead loop in tools_webrtc/libs/generate_licenses.py
Bug: webrtc:13975
Signed-off-by: hanpfei <hanpfei@gmail.com>
Change-Id: I3943f66b1a80e3f1e4b05f4436dbeff23f3d6285
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259280
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36596}
2022-04-21 07:43:05 +00:00
60c588d77e Fixed typos, candiate -> candidate
Bug: None
Change-Id: I2dee549aa79f1eb6bddd58cfc6c9f67eb6ba3663
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256147
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36273}
2022-03-21 06:30:32 +00:00
a2d0a2ad99 Ignore v4l2 select() return when stopping capture
With some slightly broken webcams, it's possible that the select()
returns with a timeout or no event. In that case, the v4l2 thread
never returns. To fix this, just check if quit_ is set and exit
unconditionally in that case.

https://bugzilla.mozilla.org/show_bug.cgi?id=1752326

Bug: None
Change-Id: Ic07ce15afd0016ff9f967c2cf64e646c20127457
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251540
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36200}
2022-03-15 08:52:26 +00:00
3aa9937e48 Fix for payload type id collision
This collision can occur when we have
asymetrical send and receive codecs. This is the case in the current
code base with the VP9 codec familly but is not visible untill more
codecs are added.

Added Nutanix Inc. to AUTHORS.

Bug: chromium:1291956
Change-Id: I09d3f76161d984d2a3edf721639753bffd4947b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250034
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35944}
2022-02-08 09:13:33 +00:00
3f42fdf19f Revert "Added support for H264 YUV444 (I444) decoding."
This reverts commit 3babb8af238a531cbff27951604b09bb78b762cd.

Reason for revert:
- Causes regressions to transceivers, see https://crbug.com/1291956 for more information, including tests to reproduce the issue.

This CL is not a pure revert. While it reverts everything else, it does
keep the new enum value (kProfilePredictiveHigh444). This is as to not
break Chromium which already depend on it. It is not listed in the
kProfilePatterns though so the enum value should never be applicable.

Original change's description:
> Added support for H264 YUV444 (I444) decoding.
>
> Added Nutanix Inc. to the AUTHORS file.
>
> PS#1 is a reland of "Added support for H264 YUV444 (I444) decoding." https://webrtc-review.googlesource.com/c/src/+/234540
>
> Bug: chromium:1251096
> Change-Id: I99a1b1e4d8b60192ff96f92334a430240875c66c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235340
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35684}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:1251096, chromium:1291956
Change-Id: Ib4d8ea4898f9832914d88e7076e6b39da0c804ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249791
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35835}
2022-01-29 10:45:39 +00:00
3babb8af23 Added support for H264 YUV444 (I444) decoding.
Added Nutanix Inc. to the AUTHORS file.

PS#1 is a reland of "Added support for H264 YUV444 (I444) decoding." https://webrtc-review.googlesource.com/c/src/+/234540

Bug: chromium:1251096
Change-Id: I99a1b1e4d8b60192ff96f92334a430240875c66c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235340
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35684}
2022-01-13 14:06:55 +00:00
9e1386095b Make the code conform to the code style.
Make the jsep_transport.cc code conform to WebRTC code style.

Bug: None
Change-Id: I9142c1e83d4006988e206aeb0bbe52dfffafda60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244600
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35631}
2022-01-05 11:28:25 +00:00
dfec7a664b Added main profile to supported H264 codecs
This adds the Main 3.1 profile to the list of supported H264 codecs. This unifies the output of WebRTC codecs among macOS/Windows (which both have Main 3.1 codecs) and headless Linux browsers.

Bug: None
Change-Id: Ife2fe8c1827be9368fabccc5f24ba316671b1b8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236600
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35328}
2021-11-10 10:56:13 +00:00
9ae0c1c348 Add *.jitsi.org to AUTHORS
bug: None
Change-Id: If231097bd02d4038edd6f18402c1b2bbca660ebc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230242
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#35271}
2021-10-28 07:54:19 +00:00
54f377308f Revert "Added support for H264 YUV444 (I444) decoding."
This reverts commit 7d8ed3437295bcad945dab69f042cf52a05c0985.

Reason for revert: Breaks internal builds

Original change's description:
> Added support for H264 YUV444 (I444) decoding.
>
> Added Nutanix Inc. to the AUTHORS file.
>
> Bug: chromium:1251096
> Change-Id: Ib47c2b1f94797afb6c5090f3c46eae6f13110992
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234540
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35200}

TBR=ilnik@webrtc.org,nisse@webrtc.org,stefan@webrtc.org,peterhanspers@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com,stefan.mitic@nutanix.com

Change-Id: I3048c353a2b6b4f3d4e5e53a88f48b456f1ce593
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1251096
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235203
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35207}
2021-10-14 12:59:29 +00:00
7d8ed34372 Added support for H264 YUV444 (I444) decoding.
Added Nutanix Inc. to the AUTHORS file.

Bug: chromium:1251096
Change-Id: Ib47c2b1f94797afb6c5090f3c46eae6f13110992
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234540
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35200}
2021-10-14 11:06:55 +00:00
52d97fd4cf Both build options for symbol export can be specified
Bug: None
Change-Id: I26c421811952ded7382b48cbe970b97f4ed4d9e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234640
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35176}
2021-10-11 12:48:32 +00:00
f270770679 video: Implement bandwidth based scaler
The |slice_qp_detla| reported by the hardware is not credible, which
causing the quality scaler cannot work properly,the resolution cannot
be adjusted correctly.

To fix this issue, this CL implements a bandwidth scaler which is used
for adjust resolution, this scaler will be used when QP based quality
scaler is not working due to untrusted QP reported by HW AVC encoder.

Bug: webrtc:12942
Change-Id: I2fc5f07a5400ec7e5ead2c2c502faee84d7f2a76
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228860
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35120}
2021-09-29 10:39:27 +00:00
ef4d0b6c7a rename use_x11 to ozone_platform_x11
Ozone is default now in Chromium and non-Ozone/X11 (aka use_x11) is
deprecated. During the transition period use_x11 == ozone_platform_x11.

Bug: chromium:1096425
Change-Id: Ie3643360ec6607796533054bdedf8e2bb8e7e749
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231650
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35040}
2021-09-20 15:13:55 +00:00
dc8fc72204 Fix potential crash during SimulcastEncoderAdapter tear down.
On the Android and iOS platforms, occasionally crash when using the SimulcastEncoderAdapter.

The Android platform reverted,
In function `SimulcastEncoderAdapter::EncoderContext::Release`,
After executing `encoder_->RegisterEncodeCompleteCallback(nullptr)`
before execute `encoder_->Release()`

If the encoder thread is executed here,
```
// out/xxx/xxx/gen/sdk/android/generated_video_jni/VideoEncoderWrapper_jni.h
JNI_GENERATOR_EXPORT void Java_org_webrtc_VideoEncoderWrapper_nativeOnEncodedFrame(
    JNIEnv* env,
    jclass jcaller,
    jlong nativeVideoEncoderWrapper,
    jobject frame) {
  VideoEncoderWrapper* native = reinterpret_cast<VideoEncoderWrapper*>(nativeVideoEncoderWrapper);
  CHECK_NATIVE_PTR(env, jcaller, native, "OnEncodedFrame");
  return native->OnEncodedFrame(env, base::android::JavaParamRef<jobject>(env, frame)); // HERE
}
```
it will cause `native` to nullptr.

iOS also.

Bug: webrtc:13156
Change-Id: Id5563b3fa2c11606ae7b35de56bbaa6adba59b14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231780
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34989}
2021-09-14 09:15:22 +00:00
593b4d550d Pipewire: Use xdg-portal provided file descriptor
The documentation for `OpenPipeWireRemote()` says:
> Open a file descriptor to the PipeWire remote where the camera nodes
> are available. The file descriptor should be used to create a
> pw_core object, by using pw_context_connect_fd.

In `InitPipeWire()` we already successfully requested the FD, but then
went on and used the unrestricted default socket.
This does not matter in non-sandboxed environments, as the stream we
want to use is available from both FDs. In flatpak sandboxes, however,
this requires to give full Pipewire access to the application.

Fix this by simply using the right, restricted FD, and while on it,
also make sure to not leak it.

This change has already landed in downstream in Firefox, see
https://phabricator.services.mozilla.com/D122904
https://phabricator.services.mozilla.com/D124508

Bug: webrtc:13152
Change-Id: I3f8995c54c797e1a90a980f231e496a13cbe65b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230803
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#34983}
2021-09-13 16:29:52 +00:00
0347a08ad3 Fix _hRecThread,_hPlayThread RTC_DCHECK reverse bug.
Bug: webrtc:6779
Change-Id: I030ec010c39ba3755f70b16a64a5163d0857c256
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228721
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34793}
2021-08-18 11:36:46 +00:00
ffbfba979f Added PeerConnectionObserverJni::OnRemoveTrack()
Change-Id: I0880caa77a1097f56c560152e85c9ca29242f825

This PR add support for the `PeerConnectionObserverJni::OnRemoveTrack()`
event on Java, allowing to be notified when a remote track has been
removed. It's a very thing JNI wrapper on top of C++ API, being mostly
similar to other already available events like `track` and `addTrack`.

In Javascript API, tracks are not "removed" explicitly from the
PeerConnection, but instead receiver PeerConnection gets notified that
they have been removed from the streams they are associated to, and when
no `MediaStream` object has that track, it's considered that the track
has been removed from the PeerConnection. In Java and C++ APIs there's no
`MediaStreamObserver` class, so there's no way to listen to the
`removeTrack` event the same way happens in Javascript API, but instead
C++ API has a `removeTrack` event at PeerConnection level. This patchset
just only wraps and expose this `removeTrack` event from the C++ API to
the Java API.

This PR has been sponsored by Atos Research and Innovation
(https://atos.net/en/about-us/innovation-and-research).

Bug: webrtc:12850
Change-Id: I0880caa77a1097f56c560152e85c9ca29242f825
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218847
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34225}
2021-06-03 19:24:55 +00:00
943e2e6a57 Revert "Fix incorrect SSRC in RtpPacketSendInfo for RTX packets."
This reverts commit 82aa094a970a2c37634378910116bbe1d5abc633.

Reason for revert: Causes regression for an upstream project

Original change's description:
> Fix incorrect SSRC in RtpPacketSendInfo for RTX packets.
>
> Bug: webrtc:12713
> Change-Id: I1b5fb947ffe4ac80e23a6b891ea1a2c2156ba81f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218000
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34177}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:12713
Change-Id: I20facf724bdb0136e7eb079c4834575184764174
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221202
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34218}
2021-06-03 11:59:39 +00:00
82aa094a97 Fix incorrect SSRC in RtpPacketSendInfo for RTX packets.
Bug: webrtc:12713
Change-Id: I1b5fb947ffe4ac80e23a6b891ea1a2c2156ba81f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218000
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34177}
2021-05-31 20:51:07 +00:00
924a2751e0 Revert "Ensure method which updates UI is called in main thread"
This reverts commit 0365c99474fd812283842f650cc090b957d73ef2.

Reason for revert: Breaks downstream project.

Original change's description:
> Ensure method which updates UI is called in main thread
>
> Bug: None
> Change-Id: I52d6871e7852e15ef8404377ed37ea894aedae5a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216500
> Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33881}

TBR=mbonadei@webrtc.org,kthelgason@webrtc.org,kthelgason@google.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com,aidenluo.me@gmail.com

Change-Id: I22e04cefd3766fc9118baaa3bb3464ff03b9bad3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216684
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33883}
2021-04-30 09:26:03 +00:00
0365c99474 Ensure method which updates UI is called in main thread
Bug: None
Change-Id: I52d6871e7852e15ef8404377ed37ea894aedae5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216500
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33881}
2021-04-30 07:45:02 +00:00
5d6abbddf4 Adds missing header to fix compilation error when compiling with use_custom_libcxx set to false.
Fixed: webrtc:12584
Change-Id: I8830095f887e7ee8887bc37106da847b60c1e996
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211762
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33557}
2021-03-25 09:57:00 +00:00
198299c161 Roll src/third_party/libjpeg_turbo/ fa0de0767..7b4981b65 (2 commits)
fa0de07678..7b4981b650

$ git log fa0de0767..7b4981b65 --date=short --no-merges --format='%ad %ae %s'
2021-02-23 enm10k Include jpeglibmangler.h
2021-02-02 ehmaldonado Move metadata in OWNERS files to DIR_METADATA files

Created with:
  roll-dep src/third_party/libjpeg_turbo

Bug: none
Change-Id: I034188911ccf8cee1e864cf156d0dd4c35759992
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208600
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33329}
2021-02-24 08:40:13 +00:00
8af6b4928a Populate jitter stats for video RTP streams
Trying to take my first stab at contributing to WebRTC and I chose to populate jitter stats for video RTP streams. Please yell at me if this isn't something I'm not supposed to pick up. Appreciate a review, thanks!

Bug: webrtc:12487
Change-Id: Ifda985e9e20b1d87e4a7268f34ef2e45b1cbefa3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208360
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33325}
2021-02-23 15:10:02 +00:00
426b6e49de changed src\modules\audio_device\win\audio_device_core_win.cc , and it is working
Bug: webrtc:12384
Change-Id: Ie9fddc3fa8016eb6a0bcc4c6757f30c4b087c10a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203821
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33158}
2021-02-04 09:31:33 +00:00
b853d72250 Update Apple device list
Added new apple devices to corresponding enumeration.
Added H264 profile level information.
Previous update was done as part of:
https://webrtc-review.googlesource.com/c/src/+/158744
Device machine names obtained from:
https://gist.github.com/adamawolf/3048717

Change-Id: Ibe71ec525679d34494b579f6da851c2b45b0cd86
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202743
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33119}
2021-02-01 09:35:03 +00:00
f8b5bfeaf2 Fix "control reaches end of non-void function" warnings
"warning: control reaches end of non-void function [-Wreturn-type]"
Reported by gcc (8.3)

In all the reported cases, the end of function is never actually
reached. Add RTC_CHECK(false) to ensure the compiler is aware that
this path is a dead-end.

Bug: webrtc:12008
Change-Id: I7f816fde3d1897ed2774057c7e05da66e1895e60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189784
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Fabien VALLÉE <fabien.vallee@netgem.com>
Cr-Commit-Position: refs/heads/master@{#32503}
2020-10-27 10:22:23 +00:00
f288f5b2d4 Fix bug with the sps-pps-idr-in-keyframe fmtp parameter.
RtpVideoStreamReceiver was forked to RtpVideoStreamReceiver2
recently, so the code that checks for this parameter needs to
be present in the forked location, but it wasn't.

This also enables RtpVideoStreamReceiver2TestH264.InBandSpsPps test
on MSAN, which was another already fixed bug that wasn't ported over
to the recently forked RtpVideoStreamReceiver2.

See webrtc:11595 for information about the fork.
See webrtc:11769 for information about this fmtp parameter.
See webrtc:11376 for the original MSAN issue.

Bug: webrtc:11957, webrtc:11595, webrtc:11769, webrtc:8423
Change-Id: I3734d077b2883c2f747ad35a0189b83c1915c3ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184524
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32144}
2020-09-19 09:23:39 +00:00
1a68aefaac authors: add comments about individual / org sections
following
  https://chromium.googlesource.com/chromium/src/+/refs/heads/master/AUTHORS
style-wise and sorting the lists

NOTRY=true
BUG=None

Change-Id: I2a2bbf959e4470827f25cf383750f53bb868b2de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183543
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#32054}
2020-09-07 18:33:21 +00:00
2a8f226374 Changed AndroidVideoDecoder to also handle IllegalArgumentException and IllegalStateException during the init of the decoder and fallback to a software decoder
Bug: webrtc:11785
Change-Id: I984d65947274b62fdcae20772537d20851cb25ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180460
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31856}
2020-08-05 09:41:49 +00:00
13fbc08b93 Explicitly set presentation style to full screen, because,
otherwise it is showing in page sheet.

Bug: webrtc:11786
Change-Id: I66e24127c249d342dc3cc3df20a78dcde0429da3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179040
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31751}
2020-07-17 07:15:36 +00:00
c2128738a8 Relanding: Fix data channel message integrity violation
Patch originally submitted by Lennart Grahl:
https://webrtc-review.googlesource.com/c/src/+/177527

SCTP message chunks and notifications are being delivered interleaved.
However, the way the code was structured previously, a notification
would interrupt reassembly of a message chunk and hand out the partial
message, thereby violating message integrity. This patch separates the
handling of notifications and reassembly of messages.

Additional changes:

- Remove illegal cast from non-validated u32 to enum (PPID)
- Drop partial messages if the SID has been changed but EOR not yet
  received instead of delivering them. (This should never happen
  anyway.)
- Don't treat TSN as timestamp (wat)
- Replace "usrsctplib/usrsctp.h" with <usrsctp.h>, allowing a hack
  to be removed from media/BUILD.gn

Bug: webrtc:11708
Change-Id: I29733b03f67a3d840104b8608a7f0083466c2d0f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178469
Commit-Queue: Taylor <deadbeef@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31641}
2020-07-07 03:06:24 +00:00
51e08b8c19 Revert "Fix data channel message integrity violation"
This reverts commit 6cbff752f52bf3f70168d551c33ce719bd8e0663.

Reason for revert: breaking downstream projects, Win MSVC x86 dbg and Win x86 Clang rel

Original change's description:
> Fix data channel message integrity violation
> 
> SCTP message chunks and notifications are being delivered interleaved.
> However, the way the code was structured previously, a notification
> would interrupt reassembly of a message chunk and hand out the partial
> message, thereby violating message integrity. This patch separates the
> handling of notifications and reassembly of messages.
> 
> Additional changes:
> 
> - Remove illegal cast from non-validated u32 to enum (PPID)
> - Drop partial messages if the SID has been changed but EOR not yet
>   received instead of delivering them. (This should never happen
>   anyway.)
> - Don't treat TSN as timestamp (wat)
> 
> Bug: webrtc:11708
> Change-Id: I4e2fe2262feda2a96d2ae3f6ce9b06370d9878ae
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177527
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Taylor <deadbeef@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31605}

TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,tommi@webrtc.org,hta@webrtc.org,lennart.grahl@gmail.com

Change-Id: I6d6c5a11835f155f8c449b996d034f43b8db452c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11708
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178488
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31606}
2020-07-01 14:45:27 +00:00