Commit graph

201 commits

Author SHA1 Message Date
memetao
decc48fd97 Fix 'Screen flickering on ScreenCapturerWinDirectx'
Bug: webrtc:15718
Change-Id: I230a0a7d196a4a3aea3b3e47cdf4f47c437e7196
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330800
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Reviewed-by: Zijie He <zijiehe@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#42177}
2024-04-25 21:18:27 +00:00
Vinzenz Feenstra
454d65196e Fix build errors on GCC w/ libstdc++ 13.2.1 missing cstdint
Bug: webrtc:15870
Change-Id: Id91f6d603c777312eda6d3bc9f03c78109737372
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343000
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42150}
2024-04-23 12:28:46 +00:00
Karim H
1b61c7161e Expose setCodecPreferences/getCapabilities for iOS
Bug: webrtc:15749
Change-Id: I92f5d5dc5d9eb4d0a60c33ed724a0d3e8b4fa1a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333402
Auto-Submit: Karim Ham <karim@karhm.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41601}
2024-01-23 13:54:26 +00:00
Jeremy Leconte
634cb403e6 Revert "Fix 'Image will be cropped if WindowCapturerWinGdi used'"
This reverts commit 844225a76a.

Reason for revert: potential nullptr dereference

Original change's description:
> Fix 'Image will be cropped if WindowCapturerWinGdi used'
>
> Bug: webrtc:15719
> Change-Id: I7daf8ee5b90fbe9f1246f1d99211ffa0d8a19f73
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330780
> Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> Commit-Queue: Alexander Cooper <alcooper@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#41503}

Bug: webrtc:15719
Change-Id: Ib38e1345c4c590b6a71bbea476a9d780a2f5e800
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334200
Owners-Override: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Manashi Sarkar <manashi@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41509}
2024-01-12 10:16:26 +00:00
memetao
844225a76a Fix 'Image will be cropped if WindowCapturerWinGdi used'
Bug: webrtc:15719
Change-Id: I7daf8ee5b90fbe9f1246f1d99211ffa0d8a19f73
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330780
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#41503}
2024-01-10 19:52:44 +00:00
Youfa
f8c70c9c34 fix: Handle out-of-range device index after GetDevicesInfo
When the specified device was not found in GetDevicesInfo,
SetPlayoutDevice/SetRecordingDevice will never return a (-1) error.

Bug: None
Change-Id: I9ac71cf72f7876c1c54ee593f184aa4007dba22f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320500
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40768}
2023-09-19 12:13:39 +00:00
Robert Mader
a717c7ada8 Video Capture PipeWire: Filter out non-camera nodes
This can be helpful in various situations, such as debugging with an
unrestricted Pipewire socket or for downstream projects like
B2G/Capyloon. Additionally it will help once we move from the camera
portal to the more generic device portal.

Original patch by Fabrice Desré <fabrice@desre.org>

Bug: webrtc:15464
Change-Id: Iae6802f242d68244bca85947cb15ef3eee923ab0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318642
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40706}
2023-09-06 10:55:36 +00:00
Michael Klingbeil
9a9b462e16 Add Opus FEC options to rtp_encode tool
Bug: None
Change-Id: I7be70951c20069207963b0fa43564c4008eda870
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318220
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40668}
2023-08-31 06:11:46 +00:00
MohamedRisaldarTA
b9876488e9 Exposed Adapter types for Android
This avoids the need of hard coding the values to use networkIgnoreMask  on Android platform.

Bug: None
Change-Id: Ib5e860913cec2c6d41cfa1b778cb122d0bfe1300
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311780
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40541}
2023-08-11 08:29:14 +00:00
Samuel Attard
6efbd1fdbc fix: do not use dispatch_queue_global_t directly
Referencing this type directly is not allowed when building
with the macOS 14.0 SDK.

Other usages in webrtc follow this inline pattern too so
going with this instead of "auto" which also works.

Change-Id: I84a0ba9c78e83843bc73c71c642caca75750f127
Bug: chromium:1454356
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308560
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40313}
2023-06-20 10:23:18 +00:00
David Liu
784c339f34 Expose setCodecPreferences/getCapabilities for android
Bug: webrtc:15177
Change-Id: If61ef9a87bc4f68d73cef6e681461682ca48f034
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304880
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40071}
2023-05-15 19:24:15 +00:00
yingyingma
d3416972dd Video: add new metric for VP9/AV1 hw encoding with softwareBRC
Record the RMSE of encoding bitrate diff from output stream to target
bitrate set by WebRTC when the AV1/VP9 stream is removed.

Design doc: https://docs.google.com/document/d/1tE7Fquj1U6CwZ01QxxjoCaJS2o0LFYyIxvstLDx0qB0/edit#heading=h.c11ebhaja9tg

Bug: chromium:1358750
Change-Id: Ifa6f5aacfa8f6b0835f4609f102ae3ae1ee2897e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298684
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39907}
2023-04-20 12:54:06 +00:00
Seija K
1a890c13ba Changed OutputToDebug to create a CFString at compile-time, rather than runtime
CFStringFromCString is useful, however if we have a static C string, we can use the defined macro CFSTR to create a CFString at runtime instead.

Bug: None
Change-Id: I54b3f590b3ab07858409af27b817013c98556ded
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293060
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Seija K. <doremylover123@gmail.com>
Cr-Commit-Position: refs/heads/main@{#39341}
2023-02-19 22:41:59 +00:00
anurag
b081042eec Remove dimension check in SimulcastUtility::ValidSimulcastParameters
We found that the legacy assumption for H264 which assumed that
simulcast streams would use 2x width ratios in unnecessary as the
encoder has since been fixed to handle multiple ratios.
H264 encoder still works even if this assumption is invalid

Bug: None
Change-Id: I9caacf78d26c8215b94858a2d8674ec4cd64e96e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286940
Reviewed-by: Mirta Dvornicic <mirtad@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39072}
2023-01-11 13:41:55 +00:00
Mike Woodworth
cca2c0e6bb fixes crash caused by race derefing pixelbufferpool ivar while being destroyed and replaced by format change
removes cached pixelbufferpool and instead retrieves current pool from the compressionSession each time (as recommended by apple docs)

Bug: webrtc:14688
Change-Id: I2244e69e7f32b912021db0905b9d5867d0bf6357
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284240
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38920}
2022-12-20 10:22:52 +00:00
Kyutae Lee
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
Michał Zarach
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
Dimitri John Ledkov
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
Shaofan Qi
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
Joachim Reiersen
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
Roberto Perez
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
Wang Qing
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
Brett Hebert
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
Brett Hebert
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
Mike Wei
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
Nico Schlumprecht
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
Bruno Pitrus
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
Ivan Murashov
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
Timothy Pearson
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
Filip Hlasek
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
Xinchao Tian
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
hanpfei
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
David Sanders
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
Olivier Crête
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
Stefan Mitic
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
Henrik Boström
3f42fdf19f Revert "Added support for H264 YUV444 (I444) decoding."
This reverts commit 3babb8af23.

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
Stefan Mitic
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
Yaowen Guo
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
Niek van der Maas
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
Saúl Ibarra Corretgé
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
Ilya Nikolaevskiy
54f377308f Revert "Added support for H264 YUV444 (I444) decoding."
This reverts commit 7d8ed34372.

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
Stefan Mitic
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
Takaaki Suzuki
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
Shuhai Peng
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
Maksim Sisov
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
Johnny
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
Robert Mader
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
chengqian
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
Jesús Leganés-Combarro 'piranna
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
Andrey Logvin
943e2e6a57 Revert "Fix incorrect SSRC in RtpPacketSendInfo for RTX packets."
This reverts commit 82aa094a97.

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