FlexfecSender is owned and configured by VideoSendStream.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2501503003
Cr-Commit-Position: refs/heads/master@{#15082}
Prior to this change, FlexFEC packets that were paced would be lost in
the RTPSender, since they were not stored in a packet history. This CL
introduces such a packet history, as well as the needed wireup for
higher layers to be aware that the particular RTPSender is able to
send FlexFEC packets with a particular SSRC.
Updated RTPSender unit test to reflect the fact that paced packets
are now actually sent.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2491293002
Cr-Commit-Position: refs/heads/master@{#15066}
In older Chrome versions, the associated payload type in the RTX header
of retransmitted packets was always set to be the original media payload type,
regardless of the actual payload type of the packet. This meant that packets
encapsulated with RED headers had incorrect payload type information in the
RTX header. Due to an assumption in the receiver, this incorrect payload type
information would effectively be undone, leading to a working system.
Albeit working, this behaviour was undesired, and thus removed. In the interim,
several workarounds were introduced to not destroy interop between old and
new Chrome versions:
(1) https://codereview.webrtc.org/1649493004
- If no payload type mapping existed for RED over RTX, the payload type
of the underlying media would be used.
- If RED had been negotiated, received RTX packets would always be
assumed to contain RED.
(2) https://codereview.webrtc.org/1964473002
- If RED was removed from the remote description answer, it would be
disabled in the local receiver as well.
(3) https://codereview.webrtc.org/2033763002
- If RED was negotiated in the SDP, it would always be used, regardless
if ULPFEC was negotiated and used, or not.
Since the Chrome versions that exhibited the original bug now are very old,
this CL removes the workarounds from (1) and (2). In particular, after this
change, we will have the following behaviour:
- We assume that a payload type mapping for RED over RTX always is set.
If this is not the case, the RTX packet is not sent.
- The associated payload type of received RTX packets will always be obeyed.
- The (non)-existence of RED in the remote description does not affect the
local receiver.
The workaround in (3) still needs to exist, in order to interop with receivers
that did not have the workarounds in (1) and (2) removed. The change in (3)
can be removed in a couple of Chrome versions.
TESTED=Using AppRTC between patched Chrome (connected to ethernet) and standard Chrome M54 (connected to lossy internal Google WiFi), with and without FEC turned off using AppRTC flag. Also using "Munge SDP" sample on patched Chrome over loopback interface, with 100ms delay and 5% packet loss simulated using tc.
BUG=webrtc:6650
Review-Url: https://codereview.webrtc.org/2469093003
Cr-Commit-Position: refs/heads/master@{#15038}
This CL adds the ability for RTPSenderVideo to generate and send
FlexFEC packets.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2490523002
Cr-Commit-Position: refs/heads/master@{#15016}
- Change const ptr to const ref in parameter list.
Using nullptr as argument was invalid, so no need to send
pointer instead of reference.
- Change return type to void or bool, where appropriate
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2455963003
Cr-Commit-Position: refs/heads/master@{#14945}
Prior to this change, we signalled that ULPFEC was disabled
through a bool, but that RED was disabled by setting its
payload type to -1. The latter is consistent with how we
disable RED/ULPFEC in the config, so this CL removes the
ULPFEC bool from the {,Set}UlpfecConfig chain of member
functions.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2460533002
Cr-Commit-Position: refs/heads/master@{#14944}
At the same time, change to using int's instead of uint8_t's for the payload type.
This allows us to signal disabled FEC or RED using the sentinel value -1, which
is commonplace in other parts of the code.
These APIs will be deprecated when ULPFEC is deprecated.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2448463003
Cr-Commit-Position: refs/heads/master@{#14942}
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.
BUG=chromium:621691
Committed: https://crrev.com/c681250aaa2025836db7669694e323898e5c2ca7
Review-Url: https://codereview.webrtc.org/2405173006
Cr-Original-Commit-Position: refs/heads/master@{#14923}
Cr-Commit-Position: refs/heads/master@{#14935}
Reason for revert:
Still breaks internal downstream project.
Sergey: Please update internal project before relanding this.
Original issue's description:
> Remove deprected functions from EncodedImageCallback and RtpRtcp
>
> Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> These methods should no longer be used anywhere and it's safe to remove
> them.
>
> BUG=chromium:621691
>
> Committed: https://crrev.com/c681250aaa2025836db7669694e323898e5c2ca7
> Cr-Commit-Position: refs/heads/master@{#14923}
TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2479643002
Cr-Commit-Position: refs/heads/master@{#14925}
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2405173006
Cr-Commit-Position: refs/heads/master@{#14923}
This class will interface RTPSenderVideo with the underlying
erasure code. It is functionally similar to ProducerFec
(to be renamed UlpfecGenerator). In fact, the FlexfecSender is a
friend of ProducerFec, and reuses most of its implementation.
Besides the fact that FlexfecSender outputs FlexFEC packets,
the main difference with ProducerFec is that FlexfecSender
allocates RTP sequence numbers, whereas ProducerFec does not
do this for the RED-encapsulated ULPFEC packets.
This class is split as interface/implementation, since it will
be owned by VideoSendStream initially. Further along, it may be
owned by PacedSender.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2441613002
Cr-Commit-Position: refs/heads/master@{#14922}
There is no need for it to be an interface.
In this CL, I also took the opportunity to make two small fixes:
- remove the 'flexfec_' prefix from some member variables
- remove unnecessary use of a stringstream object
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2471073003
Cr-Commit-Position: refs/heads/master@{#14919}
Reason for revert:
Breaks everything
Original issue's description:
> Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
>
> Reason for revert:
> This might be breaking projects downstream.
>
> Original issue's description:
> > Remove deprected functions from EncodedImageCallback and RtpRtcp
> >
> > Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> > These methods should no longer be used anywhere and it's safe to remove
> > them.
> >
> > BUG=chromium:621691
> >
> > Committed: https://crrev.com/fa565842718ad178a7562721b25d916fbabc2b92
> > Cr-Commit-Position: refs/heads/master@{#14902}
>
> TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:621691
>
> Committed: https://crrev.com/6c78307a21252c2dbd704f6d5e92a220fb722ed4
> Cr-Commit-Position: refs/heads/master@{#14914}
TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2467373003
Cr-Commit-Position: refs/heads/master@{#14915}
Reason for revert:
This might be breaking projects downstream.
Original issue's description:
> Remove deprected functions from EncodedImageCallback and RtpRtcp
>
> Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> These methods should no longer be used anywhere and it's safe to remove
> them.
>
> BUG=chromium:621691
>
> Committed: https://crrev.com/fa565842718ad178a7562721b25d916fbabc2b92
> Cr-Commit-Position: refs/heads/master@{#14902}
TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2474433008
Cr-Commit-Position: refs/heads/master@{#14914}
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2405173006
Cr-Commit-Position: refs/heads/master@{#14902}
- Add histogram: "WebRTC.Video.RtpToNtpFreqOffsetInKhz"
The absolute value of the difference between the estimated frequency during RTP timestamp to NTP time conversion and the actual value (i.e. 90 kHz) is measured per received video frame. The max offset during 40 second intervals is stored. The average of these stored offsets per received video stream is recorded when a stream is removed.
Updated rtp_to_ntp.cc:
- Add validation for only inserting newer RTCP sender reports to the rtcp list.
- Move calculation of frequency/offset (from RTP/NTP timestamp pairs) to UpdateRtcpList. Calculated when a new RTCP SR in inserted (and not in RtpToNtpMs per packet).
BUG=webrtc:6579
Review-Url: https://codereview.webrtc.org/2385763002
Cr-Commit-Position: refs/heads/master@{#14891}
Separate the null implementation from rtp_rtcp_defines.h, and follow chromium style guide for virtual functions.
BUG=webrtc:163
Review-Url: https://codereview.webrtc.org/2400993002
Cr-Commit-Position: refs/heads/master@{#14738}
Reason for revert:
Flaky test has been fixed.
Original issue's description:
> Revert of Add path for recovered packets from internal::Call to RtpStreamReceiver. (patchset #2 id:60001 of https://codereview.webrtc.org/2390823009/ )
>
> Reason for revert:
> Speculative revert as it may be the cause of the DrMemory test failure:
> https://build.chromium.org/p/client.webrtc/builders/Win%20DrMemory%20Full/builds/5115
>
> Original issue's description:
> > Add path for recovered packets from internal::Call to RtpStreamReceiver.
> >
> > When the FlexfecReceiver recovers media packets, it inserts these into
> > internal::Call, which then distributes them to the appropriate
> > VideoReceiveStream/RtpStreamReceiver.
> >
> > BUG=webrtc:5654
> >
> > Committed: https://crrev.com/9c4b4b47f4325b48e1856566a30983f9e4e30dd0
> > Cr-Commit-Position: refs/heads/master@{#14642}
>
> TBR=stefan@webrtc.org,brandtr@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5654
>
> Committed: https://crrev.com/862d74d0176fa762b3c96cf20bd36f27e7001a47
> Cr-Commit-Position: refs/heads/master@{#14652}
TBR=stefan@webrtc.org,honghaiz@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2428303004
Cr-Commit-Position: refs/heads/master@{#14677}
Reason for revert:
Speculative revert as it may be the cause of the DrMemory test failure:
https://build.chromium.org/p/client.webrtc/builders/Win%20DrMemory%20Full/builds/5115
Original issue's description:
> Add path for recovered packets from internal::Call to RtpStreamReceiver.
>
> When the FlexfecReceiver recovers media packets, it inserts these into
> internal::Call, which then distributes them to the appropriate
> VideoReceiveStream/RtpStreamReceiver.
>
> BUG=webrtc:5654
>
> Committed: https://crrev.com/9c4b4b47f4325b48e1856566a30983f9e4e30dd0
> Cr-Commit-Position: refs/heads/master@{#14642}
TBR=stefan@webrtc.org,brandtr@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2427733002
Cr-Commit-Position: refs/heads/master@{#14652}
When the FlexfecReceiver recovers media packets, it inserts these into
internal::Call, which then distributes them to the appropriate
VideoReceiveStream/RtpStreamReceiver.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2390823009
Cr-Commit-Position: refs/heads/master@{#14642}
This class is split in interface/implementation classes, since it
will be referenced from the Call level. Its purpose is to interface
the erasure code decoder with a new class FlexfecReceiveStream
(for received packets), as well as with the main RTP pipeline (for
recovered packets).
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2392663006
Cr-Commit-Position: refs/heads/master@{#14594}
The renaming is to reflect this class is only used for RTCP interaction
and not for other transports.
This Cl will be followed by multiple CLs moving all send-side RTP
functionality to a separate class, rtp module ownership away from
VideoSendStream and use TaskQueue instead of ProcessThread for RTP.
BUG=webrtc:6456
Review-Url: https://codereview.webrtc.org/2390463002
Cr-Commit-Position: refs/heads/master@{#14556}
- Place all member function definitions between test fixture
declaration and unit tests.
- Rename GenerateFrame -> PacketizeFrame.
No functional changes are intended by this CL.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2275303003
Cr-Commit-Position: refs/heads/master@{#14488}
structs are exactly the same but last one follow naming style.
BUG=webrtc:5565
Review-Url: https://codereview.webrtc.org/2368983002
Cr-Commit-Position: refs/heads/master@{#14415}
Reason for revert:
Downstream build is fixed.
Original issue's description:
> Revert of Ignore Camera and Flip bits in CVO when parsing video rotation (patchset #3 id:80001 of https://codereview.webrtc.org/2280703002/ )
>
> Reason for revert:
> Breaks downstream build.
>
> Original issue's description:
> > Ignore Camera and Flip bits in CVO when parsing video rotation
> >
> > Currently, if WebRTC receives a CVO byte where the Camera or Flip bit is
> > set, then rotation is incorrectly parsed as 0. This CL fixes that issue.
> > The Camera and Flip bit is still unimplemented and will just be ignored
> > though.
> >
> > BUG=webrtc:6120
> > R=danilchap@webrtc.org, pthatcher@webrtc.org, tommi@webrtc.org
> >
> > Committed: f9e1b922ef
>
> TBR=pthatcher@webrtc.org,danilchap@webrtc.org,tommi@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6120
>
> Committed: https://crrev.com/97667c7746282704acccd896e26175decee349c0
> Cr-Commit-Position: refs/heads/master@{#14035}
TBR=pthatcher@webrtc.org,danilchap@webrtc.org,tommi@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6120
Review-Url: https://codereview.webrtc.org/2320913003
Cr-Commit-Position: refs/heads/master@{#14124}
Reason for revert:
Breaks downstream build.
Original issue's description:
> Ignore Camera and Flip bits in CVO when parsing video rotation
>
> Currently, if WebRTC receives a CVO byte where the Camera or Flip bit is
> set, then rotation is incorrectly parsed as 0. This CL fixes that issue.
> The Camera and Flip bit is still unimplemented and will just be ignored
> though.
>
> BUG=webrtc:6120
> R=danilchap@webrtc.org, pthatcher@webrtc.org, tommi@webrtc.org
>
> Committed: f9e1b922efTBR=pthatcher@webrtc.org,danilchap@webrtc.org,tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6120
Review-Url: https://codereview.webrtc.org/2300323002
Cr-Commit-Position: refs/heads/master@{#14035}
Currently, if WebRTC receives a CVO byte where the Camera or Flip bit is
set, then rotation is incorrectly parsed as 0. This CL fixes that issue.
The Camera and Flip bit is still unimplemented and will just be ignored
though.
BUG=webrtc:6120
R=danilchap@webrtc.org, pthatcher@webrtc.org, tommi@webrtc.org
Review URL: https://codereview.webrtc.org/2280703002 .
Cr-Commit-Position: refs/heads/master@{#14027}
The last in-tree call site recently disappeared, so they were unused.
BUG=webrtc:5922
Review-Url: https://codereview.webrtc.org/2066473002
Cr-Commit-Position: refs/heads/master@{#13751}
- Make more use of std::unique_ptr.
- Auto type deduction for iterator type names.
- More extensive comments.
- Variable renaming.
- Make ProducerFec::BuildRedPacket() static.
- Avoid dynamic allocation of ProducerFec::fec_.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2110763002
Cr-Commit-Position: refs/heads/master@{#13700}
Reason for revert:
broke browser_tests
Original issue's description:
> Add EncodedImageCallback::OnEncodedImage().
>
> OnEncodedImage() is going to replace Encoded(), which is deprecated now.
> The new OnEncodedImage() returns Result struct that contains frame_id,
> which tells the encoder RTP timestamp for the frame.
>
> BUG=chromium:621691
> R=niklas.enbom@webrtc.org, sprang@webrtc.org, stefan@webrtc.org
>
> Committed: https://crrev.com/4c7f4cd2ef76821edca6d773d733a924b0bedd25
> Committed: https://crrev.com/ad34dbe934d47f88011045671b4aea00dbd5a795
> Cr-Original-Commit-Position: refs/heads/master@{#13613}
> Cr-Commit-Position: refs/heads/master@{#13615}
TBR=pbos@webrtc.org,mflodman@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,niklas.enbom@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2203233002
Cr-Commit-Position: refs/heads/master@{#13616}
Reason for revert:
broke internal tests
Original issue's description:
> Add EncodedImageCallback::OnEncodedImage().
>
> OnEncodedImage() is going to replace Encoded(), which is deprecated now.
> The new OnEncodedImage() returns Result struct that contains frame_id,
> which tells the encoder RTP timestamp for the frame.
>
> BUG=chromium:621691
> R=niklas.enbom@webrtc.org, sprang@webrtc.org, stefan@webrtc.org
>
> Committed: https://crrev.com/ad34dbe934d47f88011045671b4aea00dbd5a795
> Cr-Commit-Position: refs/heads/master@{#13613}
TBR=pbos@webrtc.org,mflodman@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,niklas.enbom@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2206743002
Cr-Commit-Position: refs/heads/master@{#13614}
- Renamed variables and some function to comply with style guide.
- Removed default argument values.
- Removed some dead code.
- Cleaned up comments formatting in rtp_rtcp.h
R=danilchap@webrtc.org, stefan@webrtc.org
Review URL: https://codereview.webrtc.org/2067673004 .
Cr-Commit-Position: refs/heads/master@{#13565}
Reason for revert:
Upstream fixes in place, should be OK now.
Original issue's description:
> Revert of Refactor NACK bitrate allocation (patchset #16 id:300001 of https://codereview.webrtc.org/2061423003/ )
>
> Reason for revert:
> Breaks upstream code.
>
> Original issue's description:
> > Refactor NACK bitrate allocation
> >
> > Nack bitrate allocation should not be done on a per-rtp-module basis,
> > but rather shared bitrate pool per call. This CL moves allocation to the
> > pacer and cleans up a bunch if bitrate stats handling.
> >
> > BUG=
> > R=danilchap@webrtc.org, stefan@webrtc.org, tommi@webrtc.org
> >
> > Committed: 5fc59e810b
>
> TBR=tommi@webrtc.org,danilchap@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=
>
> Committed: https://crrev.com/e5dd44101eca485f5ad12e5f7ce6f6b0d204116b
> Cr-Commit-Position: refs/heads/master@{#13417}
TBR=tommi@webrtc.org,danilchap@webrtc.org,stefan@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=
Review-Url: https://codereview.webrtc.org/2146013002
Cr-Commit-Position: refs/heads/master@{#13465}
Reason for revert:
It keeps breaking upstream.
Original issue's description:
> Reland Issue 2061423003: Refactor NACK bitrate allocation
>
> This is a reland of https://codereview.webrtc.org/2061423003/
> Which was reverted in https://codereview.webrtc.org/2131913003/
>
> The reason for the revert was that some upstream code used
> RtpSender::SetTargetBitrate(). I've added that back as a no-op until we
> it's been brought up to date.
>
> TBR=tommi@webrtc.org
>
> Committed: 05ce4ae31fTBR=tommi@webrtc.org,sprang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.webrtc.org/2130423002
Cr-Commit-Position: refs/heads/master@{#13419}
Reason for revert:
Breaks upstream code.
Original issue's description:
> Refactor NACK bitrate allocation
>
> Nack bitrate allocation should not be done on a per-rtp-module basis,
> but rather shared bitrate pool per call. This CL moves allocation to the
> pacer and cleans up a bunch if bitrate stats handling.
>
> BUG=
> R=danilchap@webrtc.org, stefan@webrtc.org, tommi@webrtc.org
>
> Committed: 5fc59e810bTBR=tommi@webrtc.org,danilchap@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Review-Url: https://codereview.webrtc.org/2131913003
Cr-Commit-Position: refs/heads/master@{#13417}