Commit graph

19 commits

Author SHA1 Message Date
Danil Chapovalov
b438b5a33d Reland "Change ReceiveStatistics reaction to large sequence numbers jumps"
This reverts commit 7e0299e245.

Reason for revert: audio receive stream fix not to use 0 reordering threshold

Original change's description:
> Revert "Change ReceiveStatistics reaction to large sequence numbers jumps"
> 
> This reverts commit c4f120130f.
> 
> Reason for revert: breaks downstream tests due to zero max reordering for audio receive channels
> 
> Original change's description:
> > Change ReceiveStatistics reaction to large sequence numbers jumps
> > 
> > Consider stream restart when two sequential packets arrived far from
> > previous packets' sequence numbers.
> > instead of resetting on single one.
> > For packet loss calculation ignore sequence number gap during reset.
> > 
> > Bug: webrtc:9445, b/38179459
> > Change-Id: I0c2717ef8f9ec182b280ae757b5582f56d9afcef
> > Reviewed-on: https://webrtc-review.googlesource.com/c/111962
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#25890}
> 
> TBR=danilchap@webrtc.org,asapersson@webrtc.org
> 
> Change-Id: Icc9f4d86d9f0b07f0fa2f3d443f9a90aa91f5e21
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9445, b/38179459
> Reviewed-on: https://webrtc-review.googlesource.com/c/113067
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25897}

TBR=danilchap@webrtc.org,asapersson@webrtc.org

Change-Id: I8747aa5cb6209b92fafefed077bc19d305d11db6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9445, b/38179459
Reviewed-on: https://webrtc-review.googlesource.com/c/113263
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25907}
2018-12-05 16:31:00 +00:00
Danil Chapovalov
7e0299e245 Revert "Change ReceiveStatistics reaction to large sequence numbers jumps"
This reverts commit c4f120130f.

Reason for revert: breaks downstream tests due to zero max reordering for audio receive channels

Original change's description:
> Change ReceiveStatistics reaction to large sequence numbers jumps
> 
> Consider stream restart when two sequential packets arrived far from
> previous packets' sequence numbers.
> instead of resetting on single one.
> For packet loss calculation ignore sequence number gap during reset.
> 
> Bug: webrtc:9445, b/38179459
> Change-Id: I0c2717ef8f9ec182b280ae757b5582f56d9afcef
> Reviewed-on: https://webrtc-review.googlesource.com/c/111962
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25890}

TBR=danilchap@webrtc.org,asapersson@webrtc.org

Change-Id: Icc9f4d86d9f0b07f0fa2f3d443f9a90aa91f5e21
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9445, b/38179459
Reviewed-on: https://webrtc-review.googlesource.com/c/113067
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25897}
2018-12-04 17:16:22 +00:00
Danil Chapovalov
c4f120130f Change ReceiveStatistics reaction to large sequence numbers jumps
Consider stream restart when two sequential packets arrived far from
previous packets' sequence numbers.
instead of resetting on single one.
For packet loss calculation ignore sequence number gap during reset.

Bug: webrtc:9445, b/38179459
Change-Id: I0c2717ef8f9ec182b280ae757b5582f56d9afcef
Reviewed-on: https://webrtc-review.googlesource.com/c/111962
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25890}
2018-12-04 12:16:49 +00:00
Danil Chapovalov
8ce0d2b956 In ReceiveStatistic require callbacks during construction
Remove RegisterRtcpStatisticsCallback callback functions
saving taking an extra lock when calling callbacks.

Bug: None
Change-Id: Ib4537deffa0ab0abf597228e7c0fab7067614f6a
Reviewed-on: https://webrtc-review.googlesource.com/c/111821
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25779}
2018-11-26 09:17:21 +00:00
Danil Chapovalov
f7fcaf0885 Use zero octets for rtp packet padding
RFC3550 Section 4 mention
"Octets designated as padding have the value zero."

Bug: None
Change-Id: Ife4c6226143c79ad7d152bc6099ba1d81f5492dd
Reviewed-on: https://webrtc-review.googlesource.com/c/103983
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25109}
2018-10-11 10:22:36 +00:00
Niels Möller
1f3206cca4 Change ReceiveStatistics to implement RtpPacketSinkInterface, part 1
Add new method OnRtpPacket, but leave
ReceiveStatisticsImpl::IncomingPacket and most of the implementation
unchanged. Deleting the old method and converting implementation from
RTPHeader to RtpPacketreceived is planned for a followup, after
downstream code is updated.

Bug: webrtc:7135, webrtc:8016
Change-Id: I697ec12804618859f8d69415622d1b957e1d0847
Reviewed-on: https://webrtc-review.googlesource.com/100104
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24889}
2018-09-28 12:00:28 +00:00
Niels Möller
5304a32a94 Delete StreamStatistician::IsRetransmitOfOldPacket
Return value always passed as the |retransmitted| argument to
ReceiveStatistics::IncomingPacket. The implementation of this method,
StreamStatisticianImpl::IncomingPacket, can call its own
IsRetransmitOfOldPacket, which is demoted to a private method.

Bug: webrtc:7135
Change-Id: I904db676738689c7a1db4caa588f70e64e3c357d
Reviewed-on: https://webrtc-review.googlesource.com/95649
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24494}
2018-08-30 11:00:13 +00:00
Qingsi Wang
2370b0831f Revert "Update packetsLost and jitter stats any time a packet is received."
This reverts commit 84916937b7.

Reason for revert: breaking downstream projects.

Original change's description:
> Update packetsLost and jitter stats any time a packet is received.
>
> Before this CL, the packetsLost and jitter stats (as returned by
> GetStats, at the API level) were only being updated when an RTCP SR or
> RR is generated. According to the stats spec, "local" stats like this
> should be updated any time a packet is received.
>
> This CL also fixes some minor issues with the calculation of packetsLost
> (and fractionLost):
> * Packets weren't being count as lost if lost over a sequence number
>   rollover.
> * Temporary periods of "negative" loss (caused by duplicate or out of
>   order packets) weren't being accumulated into the cumulative loss
>   counter. Example:
>   Period 1: Received packets 1, 2, 4
>     Loss over that period: 1 (expected 4 packets, got 3)
>     Reported cumulative loss: 1
>   Period 2: Received packets 3, 5
>     Loss over that period: -1 (expected 1 packet, got 2)
>     Reported cumulative loss: 1 (should be 0!)
>
> Landing with NOTRY because Android compile bots are broken for an
> unrelated reason.
> NOTRY=True
>
> Bug: webrtc:8804
> Change-Id: I840ba34de8957b1276f6bdaf93718f805629f5c8
> Reviewed-on: https://webrtc-review.googlesource.com/50020
> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23731}

TBR=danilchap@webrtc.org,deadbeef@webrtc.org,ossu@webrtc.org

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

Landing with NOTRY because ios64_sim_ios10_dbg bot is broken.
Passing all other bots.
NOTRY=True

Bug: webrtc:8804
Change-Id: I07bd6b1206d5a8d211792ad392842f9ed6c505e9
Reviewed-on: https://webrtc-review.googlesource.com/95280
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24370}
2018-08-22 00:00:33 +00:00
Sebastian Jansson
436d036b62 Limits reported cumulative packets lost to 0.
This ensures that we don't break clients that can't handle
negative values.

Bug: webrtc:9598
Change-Id: I33c3933982577752eceb738d7e0bd2a6825d2249
Reviewed-on: https://webrtc-review.googlesource.com/93020
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24230}
2018-08-08 13:27:36 +00:00
Taylor Brandstetter
84916937b7 Update packetsLost and jitter stats any time a packet is received.
Before this CL, the packetsLost and jitter stats (as returned by
GetStats, at the API level) were only being updated when an RTCP SR or
RR is generated. According to the stats spec, "local" stats like this
should be updated any time a packet is received.

This CL also fixes some minor issues with the calculation of packetsLost
(and fractionLost):
* Packets weren't being count as lost if lost over a sequence number
  rollover.
* Temporary periods of "negative" loss (caused by duplicate or out of
  order packets) weren't being accumulated into the cumulative loss
  counter. Example:
  Period 1: Received packets 1, 2, 4
    Loss over that period: 1 (expected 4 packets, got 3)
    Reported cumulative loss: 1
  Period 2: Received packets 3, 5
    Loss over that period: -1 (expected 1 packet, got 2)
    Reported cumulative loss: 1 (should be 0!)

Landing with NOTRY because Android compile bots are broken for an
unrelated reason.
NOTRY=True

Bug: webrtc:8804
Change-Id: I840ba34de8957b1276f6bdaf93718f805629f5c8
Reviewed-on: https://webrtc-review.googlesource.com/50020
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23731}
2018-06-25 23:56:39 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Danil Chapovalov
dd7e284ce8 Reland "Enable and fix chromium clang warnings in rtp_rtcp test targets"
This reverts commit 01aa210fad.

Reason for revert: downstream project adjusted

Original change's description:
> Revert "Enable and fix chromium clang warnings in rtp_rtcp test targets"
> 
> This reverts commit 9486b117da.
> 
> Reason for revert: Breaks downstream project
> 
> Original change's description:
> > Enable and fix chromium clang warnings in rtp_rtcp test targets
> > 
> > Bug: webrtc:163
> > Change-Id: I4ed3e63296d8bf06536a83196d597c7a906ba11c
> > Reviewed-on: https://webrtc-review.googlesource.com/60802
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22357}
> 
> TBR=danilchap@webrtc.org,phoglund@webrtc.org,terelius@webrtc.org
> 
> Change-Id: I2c3777ea9f26813bdb395e7fd68f6b49443586ea
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:163
> Reviewed-on: https://webrtc-review.googlesource.com/61060
> Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
> Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22365}

TBR=danilchap@webrtc.org,phoglund@webrtc.org,oprypin@webrtc.org,terelius@webrtc.org

Change-Id: I0b4cb6d05b37caeb52cca9abf95417ad3ad6f76b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:163
Reviewed-on: https://webrtc-review.googlesource.com/61080
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22368}
2018-03-09 16:04:35 +00:00
Oleh Prypin
01aa210fad Revert "Enable and fix chromium clang warnings in rtp_rtcp test targets"
This reverts commit 9486b117da.

Reason for revert: Breaks downstream project

Original change's description:
> Enable and fix chromium clang warnings in rtp_rtcp test targets
> 
> Bug: webrtc:163
> Change-Id: I4ed3e63296d8bf06536a83196d597c7a906ba11c
> Reviewed-on: https://webrtc-review.googlesource.com/60802
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22357}

TBR=danilchap@webrtc.org,phoglund@webrtc.org,terelius@webrtc.org

Change-Id: I2c3777ea9f26813bdb395e7fd68f6b49443586ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:163
Reviewed-on: https://webrtc-review.googlesource.com/61060
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22365}
2018-03-09 14:49:15 +00:00
Danil Chapovalov
9486b117da Enable and fix chromium clang warnings in rtp_rtcp test targets
Bug: webrtc:163
Change-Id: I4ed3e63296d8bf06536a83196d597c7a906ba11c
Reviewed-on: https://webrtc-review.googlesource.com/60802
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22357}
2018-03-09 12:27:35 +00:00
Danil Chapovalov
d1996b76d5 Support more ssrcs in ReceiveStatistics than retrieved per RtcpReportBlocks call
Bug: webrtc:8239
Change-Id: Ie2d630e98384e640e0e7dcbfbb1f69453d873044
Reviewed-on: https://webrtc-review.googlesource.com/39784
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21635}
2018-01-16 12:02:24 +00:00
Harald Alvestrand
c7c4191325 Declare the RTCP packets_lost field as signed in the API.
The definition of this field in RFC 3550 says that under certain
conditions it may have a negative value. This change exposes that
property in the WebRTC API.

Bug: webrtc:8626
Change-Id: I4ee249da045dcee940db66ebd915268a97fc13db
Reviewed-on: https://webrtc-review.googlesource.com/31260
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21159}
2017-12-08 11:22:09 +00:00
Danil Chapovalov
c5267d251a Simplify ReceiveStatistics: merge GetActiveStatisticians into RtcpReportBlocks
BUG=webrtc:8016

Change-Id: Ie38a86b730298039915baaac12b7fd97a5440345
Reviewed-on: https://webrtc-review.googlesource.com/1842
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19891}
2017-09-18 13:19:36 +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/receive_statistics_unittest.cc (Browse further)