91 Commits

Author SHA1 Message Date
danilchap
80ac24dd36 Allow max 1 block per type in RTCP Extended Reports
Design of individual block in ExtendedReports packet suggest there is
no point to have more than one block per type.
This CL reduce complexity of having several blocks of the same type in
same report.

BUG=webrtc:5260

Review-Url: https://codereview.webrtc.org/2378113002
Cr-Commit-Position: refs/heads/master@{#14855}
2016-10-31 15:40:55 +00:00
danilchap
142f019d87 Append second nack list in same compound rtcp packet
instead of replace

BUG=webrtc:6483

Review-Url: https://codereview.webrtc.org/2426543002
Cr-Commit-Position: refs/heads/master@{#14708}
2016-10-20 15:22:45 +00:00
mflodman
15d8357bab Remove OnLocalSsrcChanged and rename EncoderStateFeedback.
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}
2016-10-06 15:35:19 +00:00
danilchap
28b03eb449 Move RTCPHelp::RTCPReportBlockInformation into RTCPReceiver
removing RTCPHelp namespace and rtcp_receiver_help files,
cleaning style of the ReportBlockInformation usage.

BUG=webrtc:5565

Review-Url: https://codereview.webrtc.org/2390643002
Cr-Commit-Position: refs/heads/master@{#14527}
2016-10-05 13:59:51 +00:00
kwiberg
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
kwiberg
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00
danilchap
798896a4aa Replace RtcpReceiveTimeInfo with rtcp::ReceiveTimeInfo
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}
2016-09-28 09:54:30 +00:00
danilchap
822a16f64c Reland of Unify rtcp packet setters (patchset #1 id:1 of https://codereview.webrtc.org/2372713005/ )
Reason for revert:
Fix backward compatibility support

Original issue's description:
> Revert of Unify rtcp packet setters (patchset #8 id:130001 of https://codereview.webrtc.org/2348623003/ )
>
> Reason for revert:
> Breaks compilation of internal downstream project.
>
> Original issue's description:
> > Unify rtcp packet setters
> > Renamed setters in rtcp classes
> > from WithField to SetField
> > from WithItem to AddItem or SetItems
> > from From to SetSenderSsrc
> > from To to SetMediaSsrc
> > Some redundant or unsued setters removed.
> > Pass-by-const& replaced with pass-by-value when appropriate.
> >
> > BUG=webrtc:5260
> >
> > Committed: https://crrev.com/20e77c7b8a9f19942ef3c3c4f1fa3888b2cd54ea
> > Cr-Commit-Position: refs/heads/master@{#14393}
>
> TBR=sprang@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5260
>
> Committed: https://crrev.com/efc6e41866662e0922858fbce1d9ee3bdd0637ed
> Cr-Commit-Position: refs/heads/master@{#14400}

TBR=sprang@webrtc.org,stefan@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5260

Review-Url: https://codereview.webrtc.org/2370313002
Cr-Commit-Position: refs/heads/master@{#14402}
2016-09-27 16:27:52 +00:00
kjellander
efc6e41866 Revert of Unify rtcp packet setters (patchset #8 id:130001 of https://codereview.webrtc.org/2348623003/ )
Reason for revert:
Breaks compilation of internal downstream project.

Original issue's description:
> Unify rtcp packet setters
> Renamed setters in rtcp classes
> from WithField to SetField
> from WithItem to AddItem or SetItems
> from From to SetSenderSsrc
> from To to SetMediaSsrc
> Some redundant or unsued setters removed.
> Pass-by-const& replaced with pass-by-value when appropriate.
>
> BUG=webrtc:5260
>
> Committed: https://crrev.com/20e77c7b8a9f19942ef3c3c4f1fa3888b2cd54ea
> Cr-Commit-Position: refs/heads/master@{#14393}

TBR=sprang@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5260

Review-Url: https://codereview.webrtc.org/2372713005
Cr-Commit-Position: refs/heads/master@{#14400}
2016-09-27 15:39:39 +00:00
danilchap
20e77c7b8a Unify rtcp packet setters
Renamed setters in rtcp classes
from WithField to SetField
from WithItem to AddItem or SetItems
from From to SetSenderSsrc
from To to SetMediaSsrc
Some redundant or unsued setters removed.
Pass-by-const& replaced with pass-by-value when appropriate.

BUG=webrtc:5260

Review-Url: https://codereview.webrtc.org/2348623003
Cr-Commit-Position: refs/heads/master@{#14393}
2016-09-27 08:37:51 +00:00
Stefan Holmer
60e4346955 Add time line for acked bitrate.
R=philipel@webrtc.org

Review URL: https://codereview.webrtc.org/2310943002 .

Cr-Commit-Position: refs/heads/master@{#14098}
2016-09-07 07:58:31 +00:00
danilchap
1e714ae7a6 RtcpReceiverTest rewritten using public available interface
IncomingPacket(const uint8_t*, size_t) is used as entry point instead
of IncomingRTCPPacket(PacketInformation* out, RtcpParser* in);
Result is validated by checking which callbacks were called instead
of checking intermediate structure PacketInformaion.

This allows to switch parsing implementation.

BUG=webrtc:5260

Review-Url: https://codereview.webrtc.org/2292093002
Cr-Commit-Position: refs/heads/master@{#14074}
2016-09-05 16:57:27 +00:00
danilchap
853ecb21f7 Style cleanup in UpdateTmmbr:
function names style updated,
unused return type removed.
Comment style fixed, redundant comments removed.
pass-by-pointer parameter changed to pass-by-value because can't be nullptr any more.

NOTRY=true
BUG=webrtc:5565

Review-Url: https://codereview.webrtc.org/2258523005
Cr-Commit-Position: refs/heads/master@{#13848}
2016-08-22 15:26:22 +00:00
danilchap
287e54820b Cleanup RtcpReceiver::TMMBRReceived function
BUG=webrtc:951

Review-Url: https://codereview.webrtc.org/2250633002
Cr-Commit-Position: refs/heads/master@{#13786}
2016-08-16 22:15:46 +00:00
Erik Språng
737336d37a Add NACK rate throttling for audio channels.
Not really used for audio today (already in place for video), but should
still function anyway.

BUG=
R=henrika@webrtc.org, minyue@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/2181383002 .

Cr-Commit-Position: refs/heads/master@{#13571}
2016-07-29 10:59:49 +00:00
kwiberg
84be511ac0 Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/
(This is a re-land of https://codereview.webrtc.org/1921233002, which
got reverted for breaking Chromium.)

BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1923133002

Cr-Commit-Position: refs/heads/master@{#12522}
2016-04-27 08:20:08 +00:00
terelius
52d4e6bf5e Revert of Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (patchset #1 id:40001 of https://codereview.webrtc.org/1921233002/ )
Reason for revert:
Fails on Chromium FYI bots.

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/5392/

Original issue's description:
> Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/
>
> BUG=webrtc:5520
>
> Committed: https://crrev.com/2c27a062ee46258abe9facc2cceee74f09bf6a99
> Cr-Commit-Position: refs/heads/master@{#12511}

TBR=tommi@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1924443002

Cr-Commit-Position: refs/heads/master@{#12513}
2016-04-26 16:32:09 +00:00
kwiberg
2c27a062ee Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/
BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1921233002

Cr-Commit-Position: refs/heads/master@{#12511}
2016-04-26 15:38:03 +00:00
Peter Boström
d98d457134 Remove "This file includes unit tests" comments.
Superfluous, neteq_unittests.cc conveys that the file contains unittests
for NetEq for instance.

BUG=
TBR=henrik.lundin@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1922103002 .

Cr-Commit-Position: refs/heads/master@{#12504}
2016-04-26 11:44:02 +00:00
Danil Chapovalov
ee6e4272a4 Fixed undefined shift in parsing Tmmbr, Tmmbn and Remb
BUG=chromium:603483
R=asapersson@webrtc.org

Review URL: https://codereview.webrtc.org/1888793003 .

Cr-Commit-Position: refs/heads/master@{#12423}
2016-04-19 10:15:21 +00:00
danilchap
d6b851a1bd Fixed memleak when two voip blocks present in single rtcp packet.
BUG=chromium:603894

Review URL: https://codereview.webrtc.org/1901593002

Cr-Commit-Position: refs/heads/master@{#12413}
2016-04-18 17:54:13 +00:00
danilchap
90a1351072 Fixed rtcp rpsi parsing of invalid packets.
Added packet type RpsiItem to destinguish parsed rpsi header and Rpsi body
  preventing handling two half-valid (header-only) rpsi packets as one valid,
  making test parser calculate rpsi packet once instead of twice.
Added check padding bits doesn't exceed native bit string length.
Marking rpsi received moved after it is validated.

BUG=600977

Review URL: https://codereview.webrtc.org/1880443002

Cr-Commit-Position: refs/heads/master@{#12318}
2016-04-11 17:05:06 +00:00
danilchap
7a4116aa54 [rtp_rtcp] Append functionality moved from base RtcpPacket class to CompoundPacket
BUG=webrtc:5260

Review URL: https://codereview.webrtc.org/1582323005

Cr-Commit-Position: refs/heads/master@{#11981}
2016-03-14 15:19:31 +00:00
danilchap
50da1d329a Fixed busy loop in case of partially malformed rtcp packet
BUG=webrtc:5574

Review URL: https://codereview.webrtc.org/1726573003

Cr-Commit-Position: refs/heads/master@{#11946}
2016-03-10 21:13:57 +00:00
Danil Chapovalov
c1e55c7136 rtt calculation handles time go backwards
CompactNtpIntervalToMs renamed to CompactNtpRttToMs and handle special cases:
large values consider negative/invalid and result in value of 1.
0 result consider too small and increases to 1.

BUG=590996
R=asapersson@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1763823003 .

Cr-Commit-Position: refs/heads/master@{#11928}
2016-03-09 14:14:45 +00:00
Danil Chapovalov
a094fd1550 RTT intermediate calculation use ntp time instead of milliseconds.
Compact NTP representation was designed exactly for that purpose: calculate RTT. No need to map to ms before doing arithmetic on this values.
  Because of this change there is no need to keep mapping between compact ntp presentation and milliseconds in the RTCPSender.

BUG=webrtc:5565
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1491843004 .

Cr-Commit-Position: refs/heads/master@{#11710}
2016-02-22 17:59:47 +00:00
danilchap
69e59e619a [rtp_rtcp] rtc::scoped_ptr<rtcp::RawPacket> replaced with rtc::Buffer
rtcp::RawPacket is rtc::Buffer, it had no extra functionality.
rtc::Buffer is a movable class - no point to wrap it into rtc::scoped_ptr
change is large, but straightforward:
  rtc::scoped_ptr<rtcp::RawPacket> replaced with rtc::Buffer
  ->Buffer() replaced with .data()
  ->Length() replaced with .size()

BUG=webrtc:5260

Review URL: https://codereview.webrtc.org/1696203002

Cr-Commit-Position: refs/heads/master@{#11649}
2016-02-17 11:11:50 +00:00
danilchap
f174e3a260 [rtp_rtcp] rtcp::Tmmbr cleaned and got Parse function
Added accessor and Parse function
removed dependencies on structures from rtcp_utility.h (except RtcpCommonHeader)

BUG=webrtc:5260
R=åsapersson

Review URL: https://codereview.webrtc.org/1675583002

Cr-Commit-Position: refs/heads/master@{#11502}
2016-02-05 12:56:40 +00:00
danilchap
de13882d94 rtcp::ExtenededReports packet class got Parse function
BUG=webrtc:5260
R=åsapersson

Review URL: https://codereview.webrtc.org/1557593002

Cr-Commit-Position: refs/heads/master@{#11428}
2016-01-29 19:26:20 +00:00
Danil Chapovalov
32e590ec13 class doesn't rely on structures in RTCPUtility to store data.
supports several fci items in same packet.
got accessors to read data

BUG=webrtc:5260
R=asapersson@webrtc.org, åsapersson

Review URL: https://codereview.webrtc.org/1544403002 .

Cr-Commit-Position: refs/heads/master@{#11354}
2016-01-22 10:05:10 +00:00
danilchap
34ed2b95a5 [rtp_rtcp] rtcp::SenderReport moved into own file and got Parse function
BUG=webrtc:5260
R=åsapersson

Review URL: https://codereview.webrtc.org/1544983002

Cr-Commit-Position: refs/heads/master@{#11288}
2016-01-18 10:43:38 +00:00
Danil Chapovalov
1567d0bd98 [rtp_rtcp] rtcp::Sdes moved into own file
Cleaning/Parsing will be done in the https://codereview.webrtc.org/1439553003/

BUG=webrtc:5260
R=asapersson@webrtc.org, åsapersson

Review URL: https://codereview.webrtc.org/1592763002 .

Cr-Commit-Position: refs/heads/master@{#11274}
2016-01-15 16:34:32 +00:00
Danil Chapovalov
256e5b23f8 Cleaning/Parsing will be done in the https://codereview.webrtc.org/1557593002/
BUG=webrtc:5260
R=asapersson@webrtc.org, åsapersson

Review URL: https://codereview.webrtc.org/1579213005 .

Cr-Commit-Position: refs/heads/master@{#11271}
2016-01-15 13:16:36 +00:00
Danil Chapovalov
5679da1291 [rtp_rtcp] rtcp::Fir moved into own file
Cleaning/Parsing will be done in the https://codereview.webrtc.org/1544403002

BUG=webrtc:5260
R=asapersson@webrtc.org, åsapersson

Review URL: https://codereview.webrtc.org/1581983003 .

Cr-Commit-Position: refs/heads/master@{#11269}
2016-01-15 12:19:59 +00:00
Danil Chapovalov
a5eba6c98b [rtp_rtcp] rtcp::Remb moved into own file
Cleaning/Parsing will be done in the https://codereview.webrtc.org/1552773002/

BUG=webrtc:5260
R=asapersson@webrtc.org, åsapersson

Review URL: https://codereview.webrtc.org/1590883002 .

Cr-Commit-Position: refs/heads/master@{#11268}
2016-01-15 11:40:27 +00:00
danilchap
92e677a1f8 [rtp_rtcp] rtcp::Sli packet moved into own file and got Parse function
BUG=webrtc:5260
R=åsapersson

Review URL: https://codereview.webrtc.org/1551893002

Cr-Commit-Position: refs/heads/master@{#11228}
2016-01-12 18:05:00 +00:00
danilchap
7e8145f05d [rtp_rtcp] rtcp::Tmmbr moved into own file
BUG=webrtc:5260
R=åsapersson

Review URL: https://codereview.webrtc.org/1575023002

Cr-Commit-Position: refs/heads/master@{#11206}
2016-01-11 19:49:24 +00:00
danilchap
91941ae493 rtcp::VoipMetric block moved into own file and got Parse function
Review URL: https://codereview.webrtc.org/1452733002

Cr-Commit-Position: refs/heads/master@{#11030}
2015-12-15 15:06:44 +00:00
danilchap
b8b6fbb7a5 lint build/include errors fixed in rtp_rtcp module
BUG=webrtc:5277
R=mflodman

Review URL: https://codereview.webrtc.org/1505993003

Cr-Commit-Position: refs/heads/master@{#10971}
2015-12-10 13:05:35 +00:00
Danil Chapovalov
fc47ed6c05 rtcp::Rrtr block moved into own file and got Parse function
BUG=webrtc:5260
R=asapersson@webrtc.org, åsapersson

Review URL: https://codereview.webrtc.org/1496883002 .

Cr-Commit-Position: refs/heads/master@{#10912}
2015-12-07 13:46:42 +00:00
Danil Chapovalov
97f7e13c23 rtcp::ReceiverReport moved into own file and got Parse function
BUG=webrtc:5260
R=asapersson@webrtc.org

Review URL: https://codereview.webrtc.org/1453083002 .

Cr-Commit-Position: refs/heads/master@{#10897}
2015-12-04 15:13:40 +00:00
danilchap
f8385aded0 rtcp::Pli moved into own file and got a Parse function
Created rtcp::Psfb abstract class between rtcp::Pli and rtcp::RtcpPacket to hold common data for Feedback Message.

BUG=webrtc:5260

Review URL: https://codereview.webrtc.org/1446513002

Cr-Commit-Position: refs/heads/master@{#10823}
2015-11-27 13:36:17 +00:00
stefan
64c0a0a111 Revert of Make overuse estimator one dimensional. (patchset #5 id:80001 of https://codereview.webrtc.org/1376423002/ )
Reason for revert:
Broke webrtc_perf_tests on bots.

Original issue's description:
> Make overuse estimator one dimensional.
>
> This drops the payload size difference dimension of the Kalman filter,
> which doesn't improve the quality of the estimation when pacing packets
> on the send-side.
>
> R=gaetano.carlucci@gmail.com, mflodman@webrtc.org, terelius@webrtc.org
>
> Committed: https://crrev.com/06e05a85b9e4def75ed5e6b582c4df842616f25f
> Cr-Commit-Position: refs/heads/master@{#10809}

TBR=terelius@webrtc.org,mflodman@webrtc.org,gaetano.carlucci@gmail.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.webrtc.org/1481003002

Cr-Commit-Position: refs/heads/master@{#10816}
2015-11-27 09:02:35 +00:00
Stefan Holmer
06e05a85b9 Make overuse estimator one dimensional.
This drops the payload size difference dimension of the Kalman filter,
which doesn't improve the quality of the estimation when pacing packets
on the send-side.

R=gaetano.carlucci@gmail.com, mflodman@webrtc.org, terelius@webrtc.org

Review URL: https://codereview.webrtc.org/1376423002 .

Cr-Commit-Position: refs/heads/master@{#10809}
2015-11-26 14:35:10 +00:00
danilchap
50c5136cb2 RTCP Bye packet moved to own file
Bye class got support for Parsing
 Reason field implemented

Review URL: https://codereview.webrtc.org/1430013003

Cr-Commit-Position: refs/heads/master@{#10741}
2015-11-22 17:03:16 +00:00
danilchap
0219c9b4bf rtcp::App moved into own file and got Parse function
Review URL: https://codereview.webrtc.org/1437353003

Cr-Commit-Position: refs/heads/master@{#10688}
2015-11-18 13:56:57 +00:00
danilchap
f8506cbdd8 rtcp::Ij renamed to rtcp::ExtendedJitterReport
to match name given in the RFC5450
  private member renamed to inter_arrival_jitters_ for the same reason.
rtcp::ExtendedJitterReport moved into own file
accessors and Parse function added
  to make class usable for parsing packet

Review URL: https://codereview.webrtc.org/1434213004

Cr-Commit-Position: refs/heads/master@{#10636}
2015-11-13 15:33:26 +00:00
stefan
1d8a506405 Add a PacketOptions struct to webrtc::Transport.
This allows us to pass packet meta data, such as transport sequence
number, to libjingle and further down to the socket implementation. A
similar struct already exist in libjingle, see rtc::PacketOptions in asyncpacketsocket.h.

BUG=4173

Review URL: https://codereview.webrtc.org/1376673004

Cr-Commit-Position: refs/heads/master@{#10144}
2015-10-02 10:39:40 +00:00
sprang
49f9cdba02 Fix bug where rtcp::TransportFeedback may generate incorrect messages.
In particular, if 14 short deltas were inserted (2 * capacity of status
vector chunk with 2bit items) followed by a large delta, that status
item would be dropped.

BUG=

Review URL: https://codereview.webrtc.org/1367193002

Cr-Commit-Position: refs/heads/master@{#10132}
2015-10-01 10:07:04 +00:00
pbos
2d566686a2 Unify Transport and newapi::Transport interfaces.
BUG=webrtc:1695
R=stefan@webrtc.org
TBR=mflodman@webrtc.org

Review URL: https://codereview.webrtc.org/1369263002

Cr-Commit-Position: refs/heads/master@{#10096}
2015-09-28 16:59:36 +00:00