Commit graph

31 commits

Author SHA1 Message Date
Danil Chapovalov
10ab697dcb Cleanup legacy functions to handle time as raw int in RtpPacketToSend
Bug: webrtc:13757
Change-Id: I28964cb7dbd6bc6363401a9658208b8f96aceb8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253820
Auto-Submit: 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/main@{#36145}
2022-03-07 16:49:10 +00:00
Danil Chapovalov
9af4aa7cf4 Reland "Represent RtpPacketToSend::capture_time with Timestamp"
This reverts commit 56db8d0952.

Reason for revert: downstream problem addressed

Original change's description:
> Revert "Represent RtpPacketToSend::capture_time with Timestamp"
>
> This reverts commit 385eb9714d.
>
> Reason for revert: Causes problems downstream:
>
> #
> # Fatal error in: rtc_base/units/unit_base.h, line 122
> # last system error: 0
> # Check failed: value >= 0 (-234 vs. 0)
>
> Original change's description:
> > Represent RtpPacketToSend::capture_time with Timestamp
> >
> > Bug: webrtc:13757
> > Change-Id: I0ede22cd34e3a59afe1477d8edd495dce64e3242
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252586
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36083}
>
> Bug: webrtc:13757
> Change-Id: I8442abd438be8726cf671d0f372d50ecfac6847e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252720
> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36087}

Bug: webrtc:13757
Change-Id: I1fa852757480116f35deb2b6c3c27800bdf5e197
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252781
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36093}
2022-02-28 10:04:37 +00:00
Tomas Gunnarsson
56db8d0952 Revert "Represent RtpPacketToSend::capture_time with Timestamp"
This reverts commit 385eb9714d.

Reason for revert: Causes problems downstream:

#
# Fatal error in: rtc_base/units/unit_base.h, line 122
# last system error: 0
# Check failed: value >= 0 (-234 vs. 0)

Original change's description:
> Represent RtpPacketToSend::capture_time with Timestamp
>
> Bug: webrtc:13757
> Change-Id: I0ede22cd34e3a59afe1477d8edd495dce64e3242
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252586
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36083}

Bug: webrtc:13757
Change-Id: I8442abd438be8726cf671d0f372d50ecfac6847e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252720
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36087}
2022-02-26 10:35:13 +00:00
Danil Chapovalov
385eb9714d Represent RtpPacketToSend::capture_time with Timestamp
Bug: webrtc:13757
Change-Id: I0ede22cd34e3a59afe1477d8edd495dce64e3242
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252586
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36083}
2022-02-25 16:44:07 +00:00
Erik Språng
36005afeb4 Refactor and improve RtpSender packet history test.
This CL refactors RtpSenderTest.SendPacketHandlesRetransmissionHistory,
moves some testing to rtp_ender_egress_unittest and adds test coverage
for a few cases.

Bug: webrtc:11340
Change-Id: Ic225d2af43c3926f69fe3ea45f41b18c29b8b4fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219796
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34111}
2021-05-25 09:53:27 +00:00
Danil Chapovalov
eee0e9e9d4 Remove passing rtp packet metadata through webrtc as array of bytes
Instead metadata is now passed via refcounted class.

Bug: b/178094662
Change-Id: I9591fb12990282b60310ca01aea2a7b73d92487a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204060
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33134}
2021-02-02 12:22:57 +00:00
Danil Chapovalov
5312a8f532 Add option to attach custom object to an rtp packet
As an alternative to attaching custom array of bytes.

Bug: b/178094662
Change-Id: I92dcbf04998d8206091125febc520ebfcc4bcebf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203264
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33069}
2021-01-25 18:31:34 +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
Erik Språng
3663f94143 Moves RtpSequenceNumberMap from RtpSenderVideo to RtpSenderEgress.
Bug: webrtc:11340
Change-Id: Icd9032e3589324cb9ee7b699b38a35e733081e55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168192
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30481}
2020-02-07 11:07:06 +00:00
Björn Terelius
31d0f7cfca Move packet type enum from RtpPacketToSend to rtp_rtcp_defines.h
This is in preparation of an upcoming CL that will propagate this
information through the TransportFeedbackAdapter.

Bug: webrtc:10932
Change-Id: Ic2a026b5ef72d6bf01e698e7634864fedc659b4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168220
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30476}
2020-02-06 17:58:39 +00:00
Danil Chapovalov
df2c601616 Move Offset constants from VideoSendTiming value to VideoTimingExtension class
These constants describes how value should be put on the wire and thus
belong to the extension builder/writer class rather than extension value class

Bug: None
Change-Id: I65ca3923eddcc2e48563ad69b98356c159ad86be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166461
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30305}
2020-01-17 15:57:38 +00:00
Erik Språng
f660e81a56 Revert "Simplify pacer queue"
This reverts commit 7db900e2e7.

Reason for revert: Speculative revert

Original change's description:
> Simplify pacer queue
> 
> This CL simplifies the pacer queue by removing the now unnecessary
> beginpop/cancelpop/finalizepop methods. Instead there's a const top()
> and a pop() much like an stl queue.
> Old methods using the deprecated pacing code path are cleaned away.
> 
> Bug: webrtc:10633
> Change-Id: Ib6da4d46a571bf56415172b790cc9e3f63206a38
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150522
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28997}

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

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

Bug: webrtc:10633
Change-Id: I38f61afed4f4d542e236bcce3152a3aab52c6e6b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151120
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29030}
2019-09-01 12:59:06 +00:00
Erik Språng
7db900e2e7 Simplify pacer queue
This CL simplifies the pacer queue by removing the now unnecessary
beginpop/cancelpop/finalizepop methods. Instead there's a const top()
and a pop() much like an stl queue.
Old methods using the deprecated pacing code path are cleaned away.

Bug: webrtc:10633
Change-Id: Ib6da4d46a571bf56415172b790cc9e3f63206a38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150522
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28997}
2019-08-29 08:42:45 +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
Erik Språng
9c771c2089 Add TrySendPacket() method to RTP modules.
This method will be called when PacedSender is using the new code path
that directly owns the packets to be sent.

It can be seen as combining a few features of the old code path:
* It checks if this is the correct RTP module and then sends, without
  the need for PacketRouter to poll multiple methods for SSRC etc first.
* It partly corresponds to TimeToSendPacket(), but RTX encapsulation
  now happens pre-pacer and FEC does not need to have a packet history,
  so most of that method is not used.
* It implements most of PrepareAndSendPacket(), such as updating header
  extensions, reporting stats and of course forwards to Transport. It
  now also handles the history a bit differently, since media packets
  will only be stored for potential retransmission post-pacer.

Bug: webrtc:10633
Change-Id: Ie97952eeef6e56e462e115d67f7c7929f36c1817
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142165
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28298}
2019-06-17 15:16:00 +00:00
Erik Språng
f53cfa9ebe Add new RtpPacketPacer interface, with callback.
This CL just adds the new interfaces, follow-ups will add implementation
in various parts of the code, and then do cleanup once usage of old
interface is gone.

Bug: webrtc:10633
Change-Id: Icd916f4220065c0d0e4f3f0bfaaed248f8c70d08
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140891
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28252}
2019-06-12 13:21:54 +00:00
Niels Möller
435ea0a741 Add is_fec property to RtpPacketToSend
Use instead of checking the packet's payload type and ssrc.

Bug: webrtc:7135
Change-Id: I272922a7879ef3e5e1344ce49044688572b9d942
Reviewed-on: https://webrtc-review.googlesource.com/c/120048
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26425}
2019-01-28 15:43:21 +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
Dino Radaković
9e24cb344a Add move constructors and assignment operators to RtpPacketReceived and RtpPacketToSend. Since both are non-POD now, move would fall back to copy without these.
Bug: webrtc:8935
Change-Id: I270e7daf68aa00411ad5ae00da739292600043f2
Reviewed-on: https://webrtc-review.googlesource.com/57621
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Dino Radaković <dinor@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22186}
2018-02-26 13:25:50 +00:00
Dino Radaković
1807d57ab8 Add application_data field(s) to RtpPacketToSend and PacketOptions.
Pass pointer to application_data from RtpPacketToSend arriving via RtpSender::SendToNetwork through to Transport::SendRtp, in PacketOptions.

Bug: webrtc:8906
Change-Id: Ie75013ed472710f4efcfbcc160e46a6119a1f41d
Reviewed-on: https://webrtc-review.googlesource.com/55600
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Dino Radaković <dinor@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22174}
2018-02-23 17:20:46 +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/rtp_packet_to_send.h (Browse further)