Commit graph

32 commits

Author SHA1 Message Date
Xinyu Ma
675986ec5f Pass Environment into UlpfecGenerator
To make it available for FEC to use field trials in follow ups

Bug: webrtc:355577231
Change-Id: I4a6260a38e50a70dae27db28401b08bf0160aaec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358680
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42740}
2024-08-07 12:39:20 +00:00
Danil Chapovalov
950e231b63 In RtpRtcp use BitrateTracker instead of RateStatistics to measure bitrate
BitrateTracker uses RateStatistics underneath, thus algorithm is the same,
but it provides Timestamp/TimeDelta friendly interface

Bug: webrtc:13757
Change-Id: I9f2fcb3d498b2a137b531b94b660d15aa273c4bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312600
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40465}
2023-07-24 14:57:29 +00:00
Artem Titov
cfea2182f8 Use backticks not vertical bars to denote variables in comments
Bug: webrtc:12338
Change-Id: I89c8b3a328d04203177522cbdfd9e606fd4bce4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228246
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34696}
2021-08-10 10:40:03 +00:00
Artem Titov
913cfa76ec Use backticks not vertical bars to denote variables in comments for /modules/rtp_rtcp
Bug: webrtc:12338
Change-Id: I52eb3b6675c4705e22f51b70799ed6139a3b46bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227164
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34686}
2021-08-09 15:51:03 +00:00
Danil Chapovalov
5ce7d14f81 Delete legacy rtp header parser as no longer used
Bug: None
Change-Id: I3c532eee7f2d9e5295874dd538730625c8d423ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227086
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Minyue Li <minyue@google.com>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34676}
2021-08-09 12:14:52 +00:00
Erik Språng
cf15cb5c94 Update how FEC handles protection parameters for key vs delta frames.
This CL:
1) Updates RtpSenderVideo to actually populate the is_key_frame field
properly.

2) Updates UlpfecGenerator to:
 * Allow updating the protection parameters before adding any packet.
 * Apply keyframe protection parameter when at least one buffered
   media packet to be protected belongs to a keyframe.

Updating the parameters in the middle of a frame is allowed, at that
point they only determine how many _complete_ frames are needed in order
to trigger FEC generation. Only that requirement is met, will the
protection parameters (e.g. FEC rate and mask type) actually be applied.

This means that delta-frames adjecent to a key-frame (either ahead of
or after) may be protected in the same way as the key-frame itself.

Bug: webrtc:11340
Change-Id: Ieb84d0ae46de01c17b4ef72251a4cb37814569da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195620
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32787}
2020-12-07 13:36:03 +00:00
Markus Handell
e7c015e112 Migrate modules/rtp_rtcp to webrtc::Mutex.
Bug: webrtc:11567
Change-Id: I4c71f3a28ef875af2c232b1b553840d6e21649d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178804
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31645}
2020-07-07 12:13:47 +00:00
Erik Språng
1d50cb61d8 Reland "Reland "Allows FEC generation after pacer step.""
This is a reland of 19df870d92
Patchset 1 is the original.
Subsequent patchset changes threadchecker that crashed with downstream
code.

Original change's description:
> Reland "Allows FEC generation after pacer step."
>
> This is a reland of 75fd127640
>
> Patchset 2 contains a fix. Old code can in factor call
> RtpRtcpImpl::FetchFec(). It should only be a noop since deferred fec
> is not supported there - we shouldn't crash.
>
> Original change's description:
> > Allows FEC generation after pacer step.
> >
> > Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> > This CL enables FEC packets to be generated as media packets are sent,
> > rather than generated, i.e. media packets are inserted into the fec
> > generator after the pacing stage rather than at packetization time.
> >
> > This may have some small impact of performance. FEC packets are
> > typically only generated when a new packet with a marker bit is added,
> > which means FEC packets protecting a frame will now be sent after all
> > of the media packets, rather than (potentially) interleaved with them.
> > Therefore this feature is currently behind a flag so we can examine the
> > impact. Once we are comfortable with the behavior we'll make it default
> > and remove the old code.
> >
> > Note that this change does not include the "protect all header
> > extensions" part of the original CL - that will be a follow-up.
> >
> > Bug: webrtc:11340
> > Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31558}
>
> Bug: webrtc:11340
> Change-Id: I2ea49ee87ee9ff409044e34a777a7dd0ae0a077f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177984
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31613}

Bug: webrtc:11340
Change-Id: Ib741c8c284f523c959f8aca454088d9eee7b17f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178600
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31619}
2020-07-03 07:20:06 +00:00
Erik Språng
a1888ae791 Revert "Reland "Allows FEC generation after pacer step.""
This reverts commit 19df870d92.

Reason for revert: Downstream project failure

Original change's description:
> Reland "Allows FEC generation after pacer step."
> 
> This is a reland of 75fd127640
> 
> Patchset 2 contains a fix. Old code can in factor call
> RtpRtcpImpl::FetchFec(). It should only be a noop since deferred fec
> is not supported there - we shouldn't crash.
> 
> Original change's description:
> > Allows FEC generation after pacer step.
> >
> > Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> > This CL enables FEC packets to be generated as media packets are sent,
> > rather than generated, i.e. media packets are inserted into the fec
> > generator after the pacing stage rather than at packetization time.
> >
> > This may have some small impact of performance. FEC packets are
> > typically only generated when a new packet with a marker bit is added,
> > which means FEC packets protecting a frame will now be sent after all
> > of the media packets, rather than (potentially) interleaved with them.
> > Therefore this feature is currently behind a flag so we can examine the
> > impact. Once we are comfortable with the behavior we'll make it default
> > and remove the old code.
> >
> > Note that this change does not include the "protect all header
> > extensions" part of the original CL - that will be a follow-up.
> >
> > Bug: webrtc:11340
> > Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31558}
> 
> Bug: webrtc:11340
> Change-Id: I2ea49ee87ee9ff409044e34a777a7dd0ae0a077f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177984
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31613}

TBR=sprang@webrtc.org,srte@webrtc.org

Change-Id: I3b2b25898ce88b64c2322f68ef83f9f86ac2edb0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11340
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178563
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31614}
2020-07-02 12:03:07 +00:00
Erik Språng
19df870d92 Reland "Allows FEC generation after pacer step."
This is a reland of 75fd127640

Patchset 2 contains a fix. Old code can in factor call
RtpRtcpImpl::FetchFec(). It should only be a noop since deferred fec
is not supported there - we shouldn't crash.

Original change's description:
> Allows FEC generation after pacer step.
>
> Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> This CL enables FEC packets to be generated as media packets are sent,
> rather than generated, i.e. media packets are inserted into the fec
> generator after the pacing stage rather than at packetization time.
>
> This may have some small impact of performance. FEC packets are
> typically only generated when a new packet with a marker bit is added,
> which means FEC packets protecting a frame will now be sent after all
> of the media packets, rather than (potentially) interleaved with them.
> Therefore this feature is currently behind a flag so we can examine the
> impact. Once we are comfortable with the behavior we'll make it default
> and remove the old code.
>
> Note that this change does not include the "protect all header
> extensions" part of the original CL - that will be a follow-up.
>
> Bug: webrtc:11340
> Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31558}

Bug: webrtc:11340
Change-Id: I2ea49ee87ee9ff409044e34a777a7dd0ae0a077f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177984
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31613}
2020-07-02 11:40:55 +00:00
Erik Språng
1b48532208 Revert "Allows FEC generation after pacer step."
This reverts commit 75fd127640.

Reason for revert: Breaks downstream test

Original change's description:
> Allows FEC generation after pacer step.
> 
> Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> This CL enables FEC packets to be generated as media packets are sent,
> rather than generated, i.e. media packets are inserted into the fec
> generator after the pacing stage rather than at packetization time.
> 
> This may have some small impact of performance. FEC packets are
> typically only generated when a new packet with a marker bit is added,
> which means FEC packets protecting a frame will now be sent after all
> of the media packets, rather than (potentially) interleaved with them.
> Therefore this feature is currently behind a flag so we can examine the
> impact. Once we are comfortable with the behavior we'll make it default
> and remove the old code.
> 
> Note that this change does not include the "protect all header
> extensions" part of the original CL - that will be a follow-up.
> 
> Bug: webrtc:11340
> Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31558}

TBR=sprang@webrtc.org,srte@webrtc.org

Change-Id: Ie714e5f68580cbd57560e086c9dc7292a052de5f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11340
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177983
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31559}
2020-06-24 18:41:10 +00:00
Erik Språng
75fd127640 Allows FEC generation after pacer step.
Split out from https://webrtc-review.googlesource.com/c/src/+/173708
This CL enables FEC packets to be generated as media packets are sent,
rather than generated, i.e. media packets are inserted into the fec
generator after the pacing stage rather than at packetization time.

This may have some small impact of performance. FEC packets are
typically only generated when a new packet with a marker bit is added,
which means FEC packets protecting a frame will now be sent after all
of the media packets, rather than (potentially) interleaved with them.
Therefore this feature is currently behind a flag so we can examine the
impact. Once we are comfortable with the behavior we'll make it default
and remove the old code.

Note that this change does not include the "protect all header
extensions" part of the original CL - that will be a follow-up.

Bug: webrtc:11340
Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31558}
2020-06-24 16:59:50 +00:00
Erik Språng
f87536c9de Reland "Reland "Refactors UlpFec and FlexFec to use a common interface.""
This is a reland of 49734dc0fa

Patchset 2 contains a fix for the fuzzer set up. Since we now parse
an RtpPacket out of the fuzzer data, the header needs to be correct,
otherwise we fail before even reaching the FEC code that we actually
want to test.

Bug: webrtc:11340, chromium:1052323, chromium:1055974
TBR=stefan@webrtc.org

Original change's description:
> Reland "Refactors UlpFec and FlexFec to use a common interface."
>
> This is a reland of 11af1d7444
>
> Original change's description:
> > Refactors UlpFec and FlexFec to use a common interface.
> >
> > The new VideoFecGenerator is now injected into RtpSenderVideo,
> > and generalizes the usage.
> > This also prepares for being able to genera FEC in the RTP egress
> > module.
> >
> > Bug: webrtc:11340
> > Change-Id: I8aa873129b2fb4131eb3399ee88f6ea2747155a3
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168347
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30515}
>
> Bug: webrtc:11340, chromium:1052323
> Change-Id: Id646047365f1c46cca9e6f3e8eefa5151207b4a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168608
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30593}

Bug: webrtc:11340, chromium:1052323
Change-Id: Ib8925f44e2edfcfeadc95c845c3bfc23822604ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169222
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30724}
2020-03-09 13:41:35 +00:00
Erik Språng
c310889ec7 Revert "Reland "Refactors UlpFec and FlexFec to use a common interface.""
This reverts commit 49734dc0fa.

Reason for revert: Still something wrong with ulpfec fuzzer setup.

Original change's description:
> Reland "Refactors UlpFec and FlexFec to use a common interface."
> 
> This is a reland of 11af1d7444
> 
> Original change's description:
> > Refactors UlpFec and FlexFec to use a common interface.
> >
> > The new VideoFecGenerator is now injected into RtpSenderVideo,
> > and generalizes the usage.
> > This also prepares for being able to genera FEC in the RTP egress
> > module.
> >
> > Bug: webrtc:11340
> > Change-Id: I8aa873129b2fb4131eb3399ee88f6ea2747155a3
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168347
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30515}
> 
> Bug: webrtc:11340, chromium:1052323
> Change-Id: Id646047365f1c46cca9e6f3e8eefa5151207b4a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168608
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30593}

TBR=sprang@webrtc.org,stefan@webrtc.org

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

Bug: webrtc:11340, chromium:1052323
Change-Id: I920ce0a48a08768d7a98a563e2b66bd6eb8602b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169121
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30616}
2020-02-26 09:37:31 +00:00
Erik Språng
49734dc0fa Reland "Refactors UlpFec and FlexFec to use a common interface."
This is a reland of 11af1d7444

Original change's description:
> Refactors UlpFec and FlexFec to use a common interface.
>
> The new VideoFecGenerator is now injected into RtpSenderVideo,
> and generalizes the usage.
> This also prepares for being able to genera FEC in the RTP egress
> module.
>
> Bug: webrtc:11340
> Change-Id: I8aa873129b2fb4131eb3399ee88f6ea2747155a3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168347
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30515}

Bug: webrtc:11340, chromium:1052323
Change-Id: Id646047365f1c46cca9e6f3e8eefa5151207b4a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168608
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30593}
2020-02-24 14:20:27 +00:00
Erik Språng
cb4d380ba5 Revert "Refactors UlpFec and FlexFec to use a common interface."
This reverts commit 11af1d7444.

Reason for revert: Possible crash

Original change's description:
> Refactors UlpFec and FlexFec to use a common interface.
> 
> The new VideoFecGenerator is now injected into RtpSenderVideo,
> and generalizes the usage.
> This also prepares for being able to genera FEC in the RTP egress
> module.
> 
> Bug: webrtc:11340
> Change-Id: I8aa873129b2fb4131eb3399ee88f6ea2747155a3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168347
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30515}

TBR=brandtr@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org

Change-Id: Iddf112d801621c8a4370b853cee3fa42bf2c7fba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11340
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168603
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30524}
2020-02-14 13:19:07 +00:00
Erik Språng
11af1d7444 Refactors UlpFec and FlexFec to use a common interface.
The new VideoFecGenerator is now injected into RtpSenderVideo,
and generalizes the usage.
This also prepares for being able to genera FEC in the RTP egress
module.

Bug: webrtc:11340
Change-Id: I8aa873129b2fb4131eb3399ee88f6ea2747155a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168347
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30515}
2020-02-13 13:21:19 +00:00
Ilya Nikolaevskiy
a5d952f4be Reland "Refactor FEC code to use COW buffers"
Reland with fixes for fuzzer found crashes.

This refactoring helps to reduce unnecessary memcpy calls on the receive side.

This CL replaces |uint8 data[IP_PACKET_SIZE]| with |rtc::CopyOnWriteBuffer data| in Packet class, removes |length| field there, and does necessary changes.

Original Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145332

Bug: webrtc:10750
Change-Id: I6775a701bcb2ae25ec1666e1db90041cd49013b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151131
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29116}
2019-09-09 16:20:33 +00:00
Ilya Nikolaevskiy
082696efd9 Revert "Refactor FEC code to use COW buffers"
This reverts commit eec5fff4df.

Reason for revert: Some crashes found by the fuzzer

Original change's description:
> Refactor FEC code to use COW buffers
> 
> This refactoring helps to reduce unnecessary memcpy calls on the receive
> side.
> 
> This CL replaces
> |uint8 data[IP_PACKET_SIZE]| with |rtc::CopyOnWriteBuffer data| in Packet class,
> removes |length| field there, and does necessary changes.
> 
> This is a reland of these two CLs with fixes:
> https://webrtc-review.googlesource.com/c/src/+/144942
> https://webrtc-review.googlesource.com/c/src/+/144881
> 
> Bug: webrtc:10750
> Change-Id: I76f6dee5a57ade59942ea2822ca4737edfe6438b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145332
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29035}

TBR=brandtr@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org

Change-Id: Id3d65fb1324b9f1b0446fe217012115ecacf2b40
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10750
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151130
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29043}
2019-09-03 07:53:05 +00:00
Ilya Nikolaevskiy
eec5fff4df Refactor FEC code to use COW buffers
This refactoring helps to reduce unnecessary memcpy calls on the receive
side.

This CL replaces
|uint8 data[IP_PACKET_SIZE]| with |rtc::CopyOnWriteBuffer data| in Packet class,
removes |length| field there, and does necessary changes.

This is a reland of these two CLs with fixes:
https://webrtc-review.googlesource.com/c/src/+/144942
https://webrtc-review.googlesource.com/c/src/+/144881

Bug: webrtc:10750
Change-Id: I76f6dee5a57ade59942ea2822ca4737edfe6438b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145332
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29035}
2019-09-02 12:28:37 +00:00
Qingsi Wang
6ff9ebd070 Revert "Refactor FEC code to use COW buffers"
This reverts commit 7325bc3917.

Reason for revert: FecTest.UlpfecTest is consistently failing.

Original change's description:
> Refactor FEC code to use COW buffers
> 
> This refactoring helps to reduce unnecessary memcpy calls on the receive
> side.
> 
> This CL is the first stage of refactoring: it only replaces
> |uint8 data[IP_PACKET_SIZE]| with |rtc::CopyOnWriteBuffer data| and does
> necessary changes.
> 
> A follow-up CL will remove length field of the Packet class.
> 
> 
> Bug: webrtc:10750
> Change-Id: Ie233da83ff33f6370f511955e4c65d59522389a7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144881
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28539}

TBR=brandtr@webrtc.org,ilnik@webrtc.org,asapersson@webrtc.org,stefan@webrtc.org,titovartem@webrtc.org

Change-Id: I07c34256a76174f09a0d27eacbae6488e66f4b43
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10750
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145340
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28545}
2019-07-11 19:55:28 +00:00
Qingsi Wang
0f0668e328 Revert "Cleanup FEC code after refactoring"
This reverts commit 4e5a41a086.

Reason for revert: FecTest.UlpfecTest is consistently failing after the refactoring.

Original change's description:
> Cleanup FEC code after refactoring
> 
> This CL removes length field from Packet class, as COW buffer data
> already has length.
> 
> Bug: webrtc:10750
> Change-Id: I5c2a857b72007e82e819e7fa5f5aeb2e074730fa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144942
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28540}

TBR=brandtr@webrtc.org,ilnik@webrtc.org,asapersson@webrtc.org,stefan@webrtc.org,titovartem@webrtc.org

Change-Id: I0adafb513cc151acc510feaef04ef14587b1cb8d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10750
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145310
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28544}
2019-07-11 19:51:17 +00:00
Ilya Nikolaevskiy
4e5a41a086 Cleanup FEC code after refactoring
This CL removes length field from Packet class, as COW buffer data
already has length.

Bug: webrtc:10750
Change-Id: I5c2a857b72007e82e819e7fa5f5aeb2e074730fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144942
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28540}
2019-07-11 15:00:29 +00:00
Ilya Nikolaevskiy
7325bc3917 Refactor FEC code to use COW buffers
This refactoring helps to reduce unnecessary memcpy calls on the receive
side.

This CL is the first stage of refactoring: it only replaces
|uint8 data[IP_PACKET_SIZE]| with |rtc::CopyOnWriteBuffer data| and does
necessary changes.

A follow-up CL will remove length field of the Packet class.


Bug: webrtc:10750
Change-Id: Ie233da83ff33f6370f511955e4c65d59522389a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144881
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28539}
2019-07-11 14:53:39 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Yves Gerey
988cc0870b [Cleanup] Add missing #include. Remove useless ones.
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.

bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
2018-10-23 11:32:56 +00:00
Niels Möller
65ec0fc81e Delete unneeded includes of basictypes.h.
This is a kitchen-sink header, some pieces should be moved to
byteorder.h, the rest likely deleted.

Delete most includes of basictypes.h. In leaf headers,
include stddef.h and stdint.h explicitly where needed.

Bug: webrtc:6853
Change-Id: Ibc809936a8f94d418e4eb650da1e89c1b9142073
Reviewed-on: https://webrtc-review.googlesource.com/77721
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23333}
2018-05-21 19:35:08 +00:00
Danil Chapovalov
2a5ce2bcf8 Fix clang style errors in rtp_rtcp and dependant targets
Mark functions with override instead of virtual.
Add explicit non-trivial constructors/assign operators/destructors.
Define them in .cc files instead of inlining
use auto* instead of auto when deduced type is raw pointer

Bug: webrtc:163
Change-Id: I4d8a05d6a64fcc2ca16d02c5fcf9488fda832a6d
Reviewed-on: https://webrtc-review.googlesource.com/48781
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21927}
2018-02-07 09:48:28 +00:00
Rasmus Brandt
393e266470 Use correct RTP header length in RED generation for ULPFEC packets.
Prior to this change, in certain circumstances the RTP header length
used when creating a RedPacket was incorrect. This was due to an
assumption that a new media packet would _always_ be added to the
UlpfecGenerator's internal media packet buffer. This is not correct,
and the fix is to keep track of whatever RTP header length that is
currently correct.

Bug: webrtc:8767
Change-Id: I6d61429a19d4693dde9330f0469d13c5dfbeac52
Reviewed-on: https://webrtc-review.googlesource.com/40600
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21720}
2018-01-22 15:12:08 +00:00
Rasmus Brandt
3fb614bc93 Remove unused UlpfecGenerator::BuildRedPacket.
BUG=none

Change-Id: I998e23beee9c46dc696631195790e8821d1cc967
Reviewed-on: https://webrtc-review.googlesource.com/24821
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20917}
2017-11-28 16:18:28 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/rtp_rtcp/source/ulpfec_generator.cc (Browse further)