6612 Commits

Author SHA1 Message Date
Philipp Hancke
5c35d08703 Replace "RTRR" with "RRTR"
which is the correct term used in
  https://www.rfc-editor.org/rfc/rfc3611#section-4.4

BUG=None

Change-Id: Iab5a1de6b69a8495aa9a6f79531053f4f2421c27
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306480
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40143}
2023-05-25 12:47:37 +00:00
Danil Chapovalov
aa1ad7d6a4 In RtcpTransciever refactor outgoing transport interface
Replace Transport* interface with since std::function to stress this class doesn't produce RTP packets
Repesent outgoing packet as ArrayView instead of pointer + length.
Make outgoing transport optional, thus allowing to use RtcpTransciever as an rtcp parser.

Bug: webrtc:8239, webrtc:14870
Change-Id: Ia582d9a980786df8e295adcebe27081258b80dc0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306280
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40134}
2023-05-24 14:14:53 +00:00
Alexander Cooper
a7d10811cd Revert "pipewire capturer: Reduce the amount of copying"
This reverts commit 8856410b6d54b546bdb3185587474f0f9b3a7c2e.

Reason for revert: chromium:1447540

Original change's description:
> pipewire capturer: Reduce the amount of copying
>
> Improves the capture latency by reducing the amount of
> copying needed from the frame. We keep track of the
> damaged region of previous frame and union it with
> the damaged region of this frame and only copy this
> union of the frame over. X11 capturer already has
> such synchronization in place.
>
> The change is beneficial especially when there are
> small changes on the screen (e.g. clock ticking).
> For a 4k screen with 128 cores, I observed the
> capture latencies drop from 5 - 8 ms to 0 ms when the
> system is left idle. This is in line with the X11
> capturer.
>
> Bug: chromium:1291247
> Change-Id: Iffb441f9e1902d2658031f5f35b5372ee8e94073
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299720
> Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> Commit-Queue: Salman Malik <salmanmalik@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#39968}

Bug: chromium:1291247
Change-Id: Id1bfd3fc39fea2bb1f232cad5218f90e144920e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306263
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Auto-Submit: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40123}
2023-05-23 17:58:08 +00:00
Danil Chapovalov
98f47a300b Delete redundant member StreamDataCounters::last_packet_received_time
StreamDataCounters is used both for send-side and receive side stats,
but last_packet_received_time is only used by receive statistician where
it duplicates another member

Bug: webrtc:13757
Change-Id: Iae6a65aba497e577ee3255e40623362e8c4c8a72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306183
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40119}
2023-05-23 13:09:31 +00:00
Sergey Silkin
0328190ab3 Add video_codec_perf_tests to desktop and android perf test suites
Followed instructions in https://webrtc.googlesource.com/src/+/refs/heads/main/g3doc/add-new-test-binary.md

Bug: webrtc:14852
Change-Id: I4cdc7d55270de7b24723a89b8e3bb0d392d0e788
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305600
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40118}
2023-05-23 12:13:29 +00:00
Danil Chapovalov
434deda6fa Cleanup RtcpReceiver from using RtcpBandwidthObser callback interface
All known users were updated to NetworkLinkRtcpObserver interface instead

Bug: webrtc:13757
Change-Id: I1f2a7be0c9192890b38a811a739ddd666b0985f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306161
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40113}
2023-05-23 08:18:01 +00:00
Yosef Twaik
b4015689b8 Initial copy of flexfec_header_reader_writer.
Create a copy of flexfec_header_reader_writer for changing the implementation according to updated RFC. The fork is needed, since the updated RFC is incompatible with flexfec-03.
In the updated RFC, we receive the list and the number of protected ssrcs from the RTP header (from it's CSRCs , and CSRC count fields).
This Change is only a copy of the existing files. This will make it easier to understand the changes to the implementation in the next change sets.

Bug: webrtc:15002
Change-Id: I31bf5eca0d8f3cb23b4caabb477897eeb0ca6d96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303240
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40103}
2023-05-22 10:32:14 +00:00
Danil Chapovalov
718601a1f8 Cleanup RtcpReceiver from passing TransportFeedback via older interface
Bug: webrtc:8239
Change-Id: Ibc289627cc89bda86f3e2c7c0c11d0ec2ae95087
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305783
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40102}
2023-05-22 10:14:04 +00:00
Philipp Hancke
15feded162 Increase maximum RTP padding length to 255 bytes
which is the maximum allowed in RFC 3550:
  The last octet of the padding contains a count of how
  many padding octets should be ignored, including itself

SRTP encryption does not need to be taken into account since none of
the cipher suites used by WebRTC require padding:
https://www.rfc-editor.org/rfc/rfc3711#section-3.1
https://www.rfc-editor.org/rfc/rfc7714#section-7.2

BUG=webrtc:15182

Change-Id: Ife3d264af389509733699f2dd4d32ba63793e9de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305642
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40101}
2023-05-22 09:43:06 +00:00
Danil Chapovalov
0c85f733c9 For AV1, disable error resilience on upper temporal layers
Error resilience is no longer required for upper temporal layers.
Disabling error resilience on the upper layers leads to a ~2% PSNR BD-rate gain.

Reland of https://webrtc-review.googlesource.com/c/src/+/302001

Bug: webrtc:15106
Change-Id: I72ca9d504a7848dda934cbd52669027061742256
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305782
Reviewed-by: Jerome Jiang <jianj@google.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Cr-Commit-Position: refs/heads/main@{#40099}
2023-05-22 08:14:08 +00:00
Yosef Twaik
f3de65aebe Change ReceivedFecPacket to have list of ssrcs, seq nums and masks.
This change replaces ReceivedFecPacket FEC header fields with vectors (for protected ssrcs, sequence numbers and masks), which is needed to support protection of multiple ssrcs in the same FEC packet (as part of the flexfec RFC - https://datatracker.ietf.org/doc/html/rfc8627).

Bug: webrtc:15002
Change-Id: I82c54203fcfec10c760f34f805cc6308562e3df1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303200
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40075}
2023-05-16 06:07:48 +00:00
Mirko Bonadei
ad363ea310 Remove spam log from IvfFileWriter.
The IvfFileWriter logs a warning in case frames have a different
resolution compared to the one of the first frame in the file.

While this is an issue, since the IVF header will have the resolution
of the first frame, in reality this is not a problem (e.g. tools like
VLC can open and play the IVF without issues).

For this reason, let's remove the log which gets printed for each
frame.

Bug: b/282678729
Change-Id: I540cd1b6ce4f5d888737725e7615918aa126647f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305280
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40069}
2023-05-15 14:55:25 +00:00
Jan Grulich
7b0d7f48fb PipeWire capturer: fix fcntl call when duplicating a file descriptor
The fcntl() call has variable arguments, therefore we need to pass 0 to
specify there are no other arguments for this call, otherwise we might
end up with an argument that is random garbage.

Bug: webrtc:15174
Change-Id: I34f16a942d80913b667d8ade7eed557b0233be01
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305120
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40060}
2023-05-12 20:39:07 +00:00
Andreas Pehrson
a09331a603 Don't write TransmissionOffset when capture time is not set
RTX padding packets sent before media packets can legitimately have no
timestamps set (they are 0). Writing the TransmissionOffset extension
with capture time 0 will overflow once current time exceeds ~3 minutes.

Bug: webrtc:15172
Change-Id: I4dd1f341802d45016549b330f0e08cd3a00cfa19
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305020
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40055}
2023-05-12 12:18:56 +00:00
Danil Chapovalov
71f80c0bd6 Replace RtcpReceiver::RTT function with RtcpReceiver::AverageRtt with cleaner interface
Bug: webrtc:13757
Change-Id: I4320c72628444b88e36ef162cfb34346fcdd967b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304860
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40053}
2023-05-12 11:03:55 +00:00
Alfred E. Heggestad
ad7792b1a5 rtp_rtcp: fix small typo in enum class RtpPacketMediaType
Bug: None
Change-Id: I309959c1457a1ecefa2b865812bd26cb14c25306
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304900
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40051}
2023-05-12 09:17:16 +00:00
Danil Chapovalov
52518633fb In RtcpReceiver implement calling NetworkLinkRtcpObserver interface
With intent to fully replace RtcpBandwidthObserver interface
and half of the TransportFeedbackObserver interface

RtcpBandwidthObserver interfaces passed bitrate and time variables as
raw ints, NetworkLinkRtcpObserver uses more expressive types.

Bug: webrtc:13757, webrtc:8239
Change-Id: I0a8c8de626fbe0c190a0a1a9f6733d863494401c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304700
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40043}
2023-05-10 18:58:31 +00:00
Danil Chapovalov
53817b8c18 Delete legacy RtpRtcpInterface::RTT
Bug: webrtc:13757
Change-Id: Ibc39814e4a3b01425753fbcde61006a15430a6ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304820
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40042}
2023-05-10 16:04:25 +00:00
henrika
2d7424305d Adds debug logs which warns about cursor flickering
Main issue is https://chromium-review.googlesource.com/c/chromium/src/+/4507078

Bug: chromium:1421656
Change-Id: I61c6df59176e10bc29356ea924a4e483270db75f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304284
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40038}
2023-05-10 09:06:19 +00:00
Rasmus Brandt
39250a4e68 Rename and move VCMReceiveStatisticsCallback closer to its users.
The VCMReceiveStatisticsCallback interface is both implemented (by ReceiveStatisticsProxy) and called (by VideoStreamBufferController) in `video/`, so there's no reason it should be declared in `modules/video_coding`. I also took the opportunity to update the name.

No functional changes are intended by this change, but following CLs will make some changes.

Bug: webrtc:15085
Change-Id: Ib8da30ca56675e4f638d0b9778c329b9c1138acf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304662
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40034}
2023-05-10 04:59:51 +00:00
Danil Chapovalov
8095d02884 Add RtpRtcpInterface::LastRtt function to replace RtpRtcpInterface::RTT
RtpRtcpInterface::RTT follows discouraged style of using return values,
uses raw integers to represent time delta,
and returns values that no code uses (min, max, average RTT)

added LastRtt function addresses all these stylistic issues.

Bug: webrtc:13757
Change-Id: Iaf947dd1b7139026f2beb991e69634c606c6b608
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304520
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40028}
2023-05-09 14:54:50 +00:00
Erik Språng
20bede7cc7 Clean up dead code in vp9 encoder wrapper
Bug: None
Change-Id: Ic99af40e95c5d82db9b4b5624eae3103d0a11c55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304286
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40027}
2023-05-09 12:47:25 +00:00
Danil Chapovalov
2198f95118 In RtcpTransceiver remove callback that pass rtcp::ReportBlock
Same information is already passed using ReporBlockData class

Bug: webrtc:8239
Change-Id: Iaae0edd34941c45527414a20923b5238e7a822fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304641
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40021}
2023-05-09 10:17:56 +00:00
Markus Handell
e32b6228d3 RtpTransportControllerSend::ProcessSentPacket: remove PostTask.
This CL removes a PostTask in response to packet receipt reception.
This is made possible due to PacketRouter lock removal in
https://webrtc-review.googlesource.com/c/src/+/300964.

Depending on how transport code is organized, this may lead to
possibility of packet receipts arriving in
RtpTransportControllerSend which may re-enter the PacingController's
ProcessPackets method, leading to out-of-order packet sends. Fix
this by detecting re-entry and avoiding a second ProcessPackets call
in the TaskQueuePacedSender.

Bug: chromium:1373439
Change-Id: I24928f2d28a240d0860fe7e4a114cedf1f13d2bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304580
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40017}
2023-05-09 08:40:26 +00:00
Danil Chapovalov
edb9cf3de0 Cleanup ReportBlockData accessors
Remove deprecated accessors returning time as raw int
Add setters for all fields to simplify usage of this class in tests
Remove unused min/max RTT fields

Bug: webrtc:13757
Change-Id: Ia8966975c15b9a930f54b4db0fc75f7002dcffe1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304461
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40013}
2023-05-08 16:46:40 +00:00
Markus Handell
c8c4a282a6 Introduce support for video packet batching.
This CL introduces a new feature enabling video packet send batches.
The feature is enabled via
PeerConnectionInterface
::RTCConfiguration
::MediaConfig
::enable_send_packet_batching.

PacketOptions have been augmented with attribute "batchable" (set for
all video packets) and attribute "last_packet_in_batch" which gives
injected AsyncPacketSockets a chance to understand when a batch begins
and ends.

When the feature is on, packets are collected in RtpSenderEgress. On
reception of OnBatchComplete from PacingController, RtpSenderEgress
sends the collected batch, setting "last_packet_in_batch" to true
in the last packet.

Bug: chromium:1439830
Change-Id: I1846b9d4a8a0efd227d617691213a2e048bdc8a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303720
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40012}
2023-05-08 16:24:03 +00:00
Rasmus Brandt
24f9a8b398 Document VCMTiming::VideoDelayTimings better.
* Reorder and rename members.
* Add comments.
* Define struct first in the class, as per style guide.
* Update direct callers.

Bug: webrtc:15085
Change-Id: I37d26cae1953dacbba7d0507da48e3829ab84ba5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304403
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40011}
2023-05-08 15:30:02 +00:00
Markus Handell
cb838e2c4e Move packets into RtpRtcpInterface and RtpSenderEgress.
This CL prepares for send packet batching support in later CLs.

Bug: chromium:1439830
Change-Id: I0bbecfa895aa6d4317ef8049b3789272a440d032
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304282
Auto-Submit: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40009}
2023-05-08 12:39:54 +00:00
Danil Chapovalov
2eb9dfbedc Remove dependency from ReportBlockData on legacy RTCPReportBlock
Bug: None
Change-Id: I33a2e7aedf0d7825bc046f576a6594ed893e5554
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304287
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40008}
2023-05-08 11:30:35 +00:00
Danil Chapovalov
f66b9f5efe In RtcpTransceiver pass ReportBlockData instead of rtcp::ReportBlock
rtcp::ReportBlock class is designed for serialization while
ReportBlockData designed for passing report block information across
multiple components.

This slightly reduce how RtcpTransceiver and RtcpReceiver interact with other webrtc components

Bug: webrtc:8239
Change-Id: I582e3d7b32dc6357954b29a1def37e2e72116a74
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304285
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40006}
2023-05-08 10:37:33 +00:00
Rasmus Brandt
9dfb531f38 Move deprecated Receiver to modules/video_coding/deprecated/
This move further clarifies that the file and its class are deprecated. It also cleans up the modules/video_coding root folder a bit.

No functional changes are intended.

Bug: webrtc:14876
Change-Id: I580e8412d379931bfdf9517e0a8be25c19e0cd32
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304100
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40004}
2023-05-08 07:02:15 +00:00
Jesús de Vicente Peña
766f703fe3 Making WebRTC-Aec3PenalyzeHighDelaysInitialPhase default to true.
Bug: webrtc:14919
Change-Id: Id7509b9ef4730b4d09259bdd7ed13411238eabd3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304164
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39986}
2023-05-04 17:25:33 +00:00
Andreas Pehrson
adf55790b6 In DeviceInfoDS free the frame duration list after use
Per the docs, the caller is responsible for freeing the memory.

Bug: chromium:1441804
Change-Id: I9aaae493a1a86d8ab4f03930715a643a3c9fb61b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304061
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39983}
2023-05-04 14:39:03 +00:00
Andreas Pehrson
6fc1ae58be In DeviceInfoDS check that out vars were set
Bug: chromium:1441804
Change-Id: Id07cb61519315d77c2d7cdab1053efaaf7473e1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304060
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39982}
2023-05-04 11:18:07 +00:00
Danil Chapovalov
a9b9d4e3d0 Delete audio specific struct ReportBlock in favor of ReportBlockData
ReportBlockData class is better documented and has wider usage.

Bug: webrtc:13757
Change-Id: Ie5f2275f2f0236267172e6dd1ce5c2dfb2193ba0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304101
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39980}
2023-05-03 16:27:31 +00:00
Andreas Pehrson
91d5fc2ed6 Support more pixel formats in v4l2 camera backend
These were tested with gstreamer and v4l2loopback, example setup:
$ sudo v4l2loopback-ctl add -n BGRA 10
$ gst-launch-1.0 videotestsrc pattern=smpte-rp-219 ! \
  video/x-raw,format=BGRA ! v4l2sink device=/dev/video10 > /dev/null &

Then conversion was confirmed with video_loopback:
$ ./video_loopback --capture_device_index=3 --logs 2>&1 | grep -i \
  capture

Bug: webrtc:14830
Change-Id: I35c8e453cf7f9a2923935b0ad82477a3144e8c12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291532
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39979}
2023-05-03 14:22:36 +00:00
Andreas Pehrson
32b64e895c Improve ergonomics of dealing with pixel formats in v4l2 camera backend
Bug: webrtc:14830
Change-Id: Ib49bf65895fe008e75223abb03867d412c1b5a60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291531
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39976}
2023-05-03 09:39:34 +00:00
Danil Chapovalov
d3eddff30c In ReportBlockData expose RTCP report block properties directly
These accessors would allow to deprecated report_block() accessor and
then would allow to remove redundant RTCPReportBlock and ReportBlock types converging on single
ReportBlockData type to pass that information across WebRTC components

helpers like fraction_lost() and jitter() would also allow to unify conversion of the rtp specific format into more common way of represent such information

Bug: None
Change-Id: I3c97f96affcf83b529095899bd63af007f8b4014
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303880
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39975}
2023-05-03 09:25:23 +00:00
Andreas Pehrson
b1a174041d Relax VideoCaptureImpl::IncomingFrame size check
When testing manually with gstreamer and v4l2loopback, the incoming
buffer is often larger than the expected size. This change allows
such frames, while still logging the error.

Bug: webrtc:14830
Change-Id: I399aa55af6437d75b50830166a667547f6d144d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291530
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39972}
2023-05-03 06:27:25 +00:00
Salman Malik
8856410b6d pipewire capturer: Reduce the amount of copying
Improves the capture latency by reducing the amount of
copying needed from the frame. We keep track of the
damaged region of previous frame and union it with
the damaged region of this frame and only copy this
union of the frame over. X11 capturer already has
such synchronization in place.

The change is beneficial especially when there are
small changes on the screen (e.g. clock ticking).
For a 4k screen with 128 cores, I observed the
capture latencies drop from 5 - 8 ms to 0 ms when the
system is left idle. This is in line with the X11
capturer.

Bug: chromium:1291247
Change-Id: Iffb441f9e1902d2658031f5f35b5372ee8e94073
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299720
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Salman Malik <salmanmalik@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39968}
2023-04-28 16:07:00 +00:00
Stefan Holmer
f5bbb2940e Compensate encoder bitrate for transformer added payload.
Bug: webrtc:15092
Change-Id: I7b4eff6f3f32ba0ae33ba8e4fc3c40425868719c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301500
Reviewed-by: Tony Herre <herre@google.com>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39967}
2023-04-28 12:41:55 +00:00
Tony Herre
096427e494 Overwrite frame seq nums when piping encoded frames between RTPReceivers
This allows encoded frames to be written to any encoded insertable
streams writer without needing to somehow set valid RTP sequence
numbers. Assumes streams are using the Dependency Descriptor header ext.

A short term fix while we discuss whether we can remove the sequence
number check in RtpFrameReferenceFinder::ManageFrame.

Bug: chromium:1439799
Change-Id: I3c1d83793cd8b6cae2a8ad2129b3b6daab1d11c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302301
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#39966}
2023-04-28 12:10:18 +00:00
Artem Titov
cf95dd13a2 Move test_audio_device_module to compile only without chromium
Bug: b/272350185, webrtc:15081
Change-Id: I1fea6652cb2acb359f3848d64918e5212e2e2a75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303841
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39965}
2023-04-28 11:16:20 +00:00
Tony Herre
272b464e92 Allow feeding a Receiver encoded videoframe into a Sender Transform
Instead of crashing with a CHECK fail when an insertable stream of a
Video RTPSender is given a frame from an RTPReceiver's insertable
stream, construct a reasonable analogous sender frame and pass it
through to be decoded.

A small step towards removing the split we have between Sender and
Receiver implementations of TransformableFrameInterface which just
confuses users of the API.

Counterpart to https://webrtc-review.googlesource.com/c/src/+/301181 in
the opposite direction.

Bug: chromium:1250638
Change-Id: If66da7d553f14979ff1c5b4e00bff715f58cfce0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303480
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#39963}
2023-04-28 10:02:58 +00:00
Danil Chapovalov
9ecc76e15b Use Timestamp type in RtpState struct
Bug: webrtc:13757
Change-Id: I7f8fc1a9c4cbf464b3969c4754ce5aa9c5b5f076
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303500
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39960}
2023-04-27 11:24:38 +00:00
Jakob Ivarsson
2bd878180a Add delayed packet outage event metric.
Can be used to calculate the average delayed packet outage duration and
number of packet loss events by subtracting from concealment events.

Only used in simulations currently.

Bug: None
Change-Id: I03740a2bcb781af09e28a4d13d9e41c0f84bc506
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303600
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39957}
2023-04-26 13:40:17 +00:00
Jakob Ivarsson
ecdedac3da Remove NetEq simulation step size restriction.
This should not be relevant anymore and is causing some issues due to
SetMinimumDelay events early in the log.

Bug: None
Change-Id: Ib7e3c624608c9bceaed31bd6669db59887d24659
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303580
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39956}
2023-04-26 13:07:12 +00:00
Andreas Pehrson
28ac56a415 In VideoCaptureDS::Stop() fully stop the device
This makes the device light turn off when stopped.

Bug: webrtc:15109
Change-Id: I1deecbc2463e2e316e01ff1f061ab6b0313c1aa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302200
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39953}
2023-04-26 08:58:46 +00:00
Danil Chapovalov
52275845a0 Use Timestamp type instead of int64_t in Flexfec classes
Bug: webrtc:13757
Change-Id: Ideafea65adb827b5457de22a04e3235cda3ffd5c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301260
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39948}
2023-04-25 10:53:08 +00:00
Jeremy Leconte
b035dcc0a2 Revert "Reland "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl""
This reverts commit eeae96299784515f573379a64655eb07a5973a3a.

Reason for revert: breaks WebRTC Chromium FYI ios-device
https://ci.chromium.org/ui/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device/14896/overview

Original change's description:
> Reland "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl"
>
> This reverts commit 69c8d3c843326aff9dee32cc639741c1cd7f8ae9.
>
> Reason for revert: Reland with a fix
>
> Original change's description:
> > Revert "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl"
> >
> > This reverts commit e42bf81486d2f08b6dcbf1442287202e937ce52b.
> >
> > Reason for revert: Breaks iOS simulator bots and thus blocks chromium roll, https://chromium-review.googlesource.com/c/chromium/src/+/4433814
> >
> > Original change's description:
> > > Migrate TestAudioDeviceModule on AudioDeviceModuleImpl
> > >
> > > Bug: b/272350185
> > > Change-Id: Ia3d85d6fa3b0d4809e987a39d60d3eb022687132
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300363
> > > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#39877}
> >
> > Bug: b/272350185
> > Change-Id: I1e3b542fc1278797f283afedeae01cbb7412d353
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301701
> > Commit-Queue: Jeremy Leconte <jleconte@google.com>
> > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> > Reviewed-by: Jeremy Leconte <jleconte@google.com>
> > Auto-Submit: Christoffer Jansson <jansson@google.com>
> > Owners-Override: Christoffer Jansson <jansson@google.com>
> > Cr-Commit-Position: refs/heads/main@{#39881}
>
> Bug: b/272350185
> Change-Id: I809466306b2e1fd54c44b90311059c98a53ef8ee
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301704
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39936}

Bug: b/272350185
Change-Id: If0a10717bf14a0a618e52728fc3a61b9c55f3bd2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303460
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Owners-Override: Jeremy Leconte <jleconte@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#39947}
2023-04-25 10:24:56 +00:00