Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Issue 1623543002: Refactor RtpSender and SSRCDatabase a bit. (Closed)

Created:
4 years, 11 months ago by tommi
Modified:
4 years, 10 months ago
CC:
webrtc-reviews_webrtc.org, zhuangzesen_agora.io, tterriberry_mozilla.com, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Refactor RtpSender and SSRCDatabase. * SSRCDatabase doesn't need to be a global instance, so I've changed it to be a "regular" class (i.e. construct via ctor, not maybe via GetSSRCDatabase( + release via ReturnSSRCDatabase())). If we ever have parallel tests running in the same process, they won't have the problem of using the same ssrc database. * Made RtpSender a more const. Also added some todos for myself and holmer to look into clarifying the threading model. * Switched from CriticalSectionWrapper to rtc::CriticalSection * Changed the random seeding to use TickTime::Now().Ticks() since TimeInMicroseconds() could return 0 when the process was starting. This is what TimeInMicroseconds() does anyway but now we don't need to access a global clock object. BUG=webrtc:3062 Committed: https://crrev.com/ae695e95a677b76be5a4e0c7051a964103340729 Cr-Commit-Position: refs/heads/master@{#11462}

Patch Set 1 #

Patch Set 2 : Fix issue with tick count/clock. #

Patch Set 3 : Revert tick change and just use the ticks #

Patch Set 4 : Do we even need locks? #

Patch Set 5 : Add locking back for voe_auto_test #

Total comments: 13

Patch Set 6 : Add TODOs for Random() and delete dead code from Timing (move to separate cl?) #

Total comments: 1

Patch Set 7 : Move member variables #

Patch Set 8 : Remove thread checker due to voe::ChannelOwner #

Total comments: 12

Patch Set 9 : Address comments and revert changes #

Patch Set 10 : Remove scoped_ptr include #

Patch Set 11 : Fix build? #

Total comments: 8

Patch Set 12 : Address comments #

Patch Set 13 : Rebase #

Total comments: 3

Patch Set 14 : Update comment #

Patch Set 15 : Update comment and remove the one from ssrc_database.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -154 lines) Patch
M webrtc/base/random.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +11 lines, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_sender.h View 1 2 3 4 5 6 7 8 5 chunks +41 lines, -10 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_sender.cc View 1 2 3 4 5 6 7 8 9 10 11 12 45 chunks +130 lines, -125 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/ssrc_database.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +16 lines, -5 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/ssrc_database.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +6 lines, -14 lines 0 comments Download

Messages

Total messages: 65 (13 generated)
tommi
Fix issue with tick count/clock.
4 years, 11 months ago (2016-01-23 14:24:31 UTC) #1
tommi
Revert tick change and just use the ticks
4 years, 11 months ago (2016-01-23 14:30:29 UTC) #2
tommi
Do we even need locks?
4 years, 11 months ago (2016-01-23 15:29:00 UTC) #3
tommi
Add locking back for voe_auto_test
4 years, 11 months ago (2016-01-23 17:00:33 UTC) #4
tommi
4 years, 11 months ago (2016-01-23 17:08:27 UTC) #7
stefan-webrtc
I think the reason for SSRCDatabase being a singleton was to make sure different rtp ...
4 years, 11 months ago (2016-01-23 17:38:40 UTC) #8
tommi
Add TODOs for Random() and delete dead code from Timing (move to separate cl?)
4 years, 11 months ago (2016-01-24 11:50:55 UTC) #9
tommi
https://codereview.webrtc.org/1623543002/diff/80001/webrtc/modules/rtp_rtcp/source/rtp_sender.cc File webrtc/modules/rtp_rtcp/source/rtp_sender.cc (right): https://codereview.webrtc.org/1623543002/diff/80001/webrtc/modules/rtp_rtcp/source/rtp_sender.cc#newcode190 webrtc/modules/rtp_rtcp/source/rtp_sender.cc:190: // early on in the process. On 2016/01/23 17:38:39, ...
4 years, 11 months ago (2016-01-24 11:51:50 UTC) #10
tommi
Move member variables
4 years, 11 months ago (2016-01-24 11:54:50 UTC) #11
tommi
https://codereview.webrtc.org/1623543002/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc File webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc (right): https://codereview.webrtc.org/1623543002/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc#newcode143 webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc:143: SSRCDatabase ssrc_database_; oops, forgot to move this (this TODO ...
4 years, 11 months ago (2016-01-24 11:54:50 UTC) #12
tommi
Remove thread checker due to voe::ChannelOwner
4 years, 11 months ago (2016-01-24 13:59:31 UTC) #13
stefan-webrtc
On 2016/01/24 13:59:31, tommi-webrtc wrote: > Remove thread checker due to voe::ChannelOwner Please see my ...
4 years, 11 months ago (2016-01-24 14:47:12 UTC) #14
tommi
On 2016/01/24 14:47:12, stefan-webrtc (holmer) wrote: > On 2016/01/24 13:59:31, tommi-webrtc wrote: > > Remove ...
4 years, 11 months ago (2016-01-24 15:12:16 UTC) #15
tommi
On 2016/01/24 15:12:16, tommi-webrtc wrote: > On 2016/01/24 14:47:12, stefan-webrtc (holmer) wrote: > > On ...
4 years, 11 months ago (2016-01-24 15:23:53 UTC) #16
the sun
drive-by... https://codereview.webrtc.org/1623543002/diff/140001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1623543002/diff/140001/webrtc/base/random.h#newcode31 webrtc/base/random.h:31: // of TickTime::Now()). Maybe, but the ctor taking ...
4 years, 11 months ago (2016-01-24 21:34:10 UTC) #18
tommi
thanks for taking a look https://codereview.webrtc.org/1623543002/diff/140001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1623543002/diff/140001/webrtc/base/random.h#newcode31 webrtc/base/random.h:31: // of TickTime::Now()). On ...
4 years, 11 months ago (2016-01-24 21:54:36 UTC) #19
mflodman
https://codereview.webrtc.org/1623543002/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h File webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h (right): https://codereview.webrtc.org/1623543002/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h#newcode341 webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h:341: SSRCDatabase ssrc_database_; Drive-by and Stefan might already have commented ...
4 years, 11 months ago (2016-01-25 07:26:19 UTC) #21
tommi
On 2016/01/25 07:26:19, mflodman wrote: > https://codereview.webrtc.org/1623543002/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h > File webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h (right): > > https://codereview.webrtc.org/1623543002/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h#newcode341 > ...
4 years, 11 months ago (2016-01-25 08:17:50 UTC) #22
stefan-webrtc
On 2016/01/25 08:17:50, tommi-webrtc wrote: > On 2016/01/25 07:26:19, mflodman wrote: > > > https://codereview.webrtc.org/1623543002/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h ...
4 years, 11 months ago (2016-01-25 08:38:24 UTC) #23
tommi
On 2016/01/25 08:38:24, stefan-webrtc (holmer) wrote: > On 2016/01/25 08:17:50, tommi-webrtc wrote: > > On ...
4 years, 11 months ago (2016-01-25 09:33:53 UTC) #24
tommi
Remove dead code from webrtc/base/timing.*
4 years, 11 months ago (2016-01-25 10:01:50 UTC) #25
stefan-webrtc
On 2016/01/25 09:33:53, tommi-webrtc wrote: > On 2016/01/25 08:38:24, stefan-webrtc (holmer) wrote: > > On ...
4 years, 11 months ago (2016-01-25 10:09:04 UTC) #27
stefan-webrtc
https://codereview.webrtc.org/1623543002/diff/80001/webrtc/modules/rtp_rtcp/source/rtp_sender.cc File webrtc/modules/rtp_rtcp/source/rtp_sender.cc (right): https://codereview.webrtc.org/1623543002/diff/80001/webrtc/modules/rtp_rtcp/source/rtp_sender.cc#newcode190 webrtc/modules/rtp_rtcp/source/rtp_sender.cc:190: // early on in the process. On 2016/01/24 11:51:49, ...
4 years, 11 months ago (2016-01-25 10:09:33 UTC) #28
the sun
On 2016/01/25 10:09:04, stefan-webrtc (holmer) wrote: > On 2016/01/25 09:33:53, tommi-webrtc wrote: > > On ...
4 years, 11 months ago (2016-01-25 11:23:20 UTC) #29
the sun
It's confusing these days... I don't see all of your comments in the code. Let ...
4 years, 11 months ago (2016-01-25 11:24:57 UTC) #30
tommi
Address comments and revert changes
4 years, 11 months ago (2016-01-25 12:15:52 UTC) #31
tommi
Remove scoped_ptr include
4 years, 11 months ago (2016-01-25 12:24:15 UTC) #32
tommi
Thanks for the feedback everyone and thanks for saving me from shooting us in the ...
4 years, 11 months ago (2016-01-25 12:28:33 UTC) #33
tommi
and of course it doesn't compile worth a damn... running low on batteries right now, ...
4 years, 11 months ago (2016-01-25 12:29:40 UTC) #34
tommi
Fix build?
4 years, 11 months ago (2016-01-25 12:37:44 UTC) #35
stefan-webrtc
https://codereview.webrtc.org/1623543002/diff/220001/webrtc/modules/rtp_rtcp/source/rtp_sender.cc File webrtc/modules/rtp_rtcp/source/rtp_sender.cc (right): https://codereview.webrtc.org/1623543002/diff/220001/webrtc/modules/rtp_rtcp/source/rtp_sender.cc#newcode1658 webrtc/modules/rtp_rtcp/source/rtp_sender.cc:1658: RTC_DCHECK(ssrc_); I prefer > 0 or != 0. https://codereview.webrtc.org/1623543002/diff/220001/webrtc/modules/rtp_rtcp/source/rtp_sender.cc#newcode1709 ...
4 years, 11 months ago (2016-01-26 13:19:52 UTC) #36
tommi
Address comments
4 years, 10 months ago (2016-01-30 10:49:14 UTC) #38
tommi
https://codereview.webrtc.org/1623543002/diff/220001/webrtc/modules/rtp_rtcp/source/rtp_sender.cc File webrtc/modules/rtp_rtcp/source/rtp_sender.cc (right): https://codereview.webrtc.org/1623543002/diff/220001/webrtc/modules/rtp_rtcp/source/rtp_sender.cc#newcode1658 webrtc/modules/rtp_rtcp/source/rtp_sender.cc:1658: RTC_DCHECK(ssrc_); On 2016/01/26 13:19:52, stefan-webrtc (holmer) wrote: > I ...
4 years, 10 months ago (2016-01-30 10:53:41 UTC) #39
tommi
Rebase
4 years, 10 months ago (2016-01-30 11:12:55 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1623543002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1623543002/260001
4 years, 10 months ago (2016-01-30 18:18:13 UTC) #42
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-01-30 19:52:32 UTC) #44
stefan-webrtc
lgtm
4 years, 10 months ago (2016-02-01 09:15:24 UTC) #45
the sun
https://codereview.webrtc.org/1623543002/diff/260001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1623543002/diff/260001/webrtc/base/random.h#newcode24 webrtc/base/random.h:24: // TODO(tommi): Change this so that the seed is ...
4 years, 10 months ago (2016-02-01 10:41:28 UTC) #46
tommi
https://codereview.webrtc.org/1623543002/diff/260001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1623543002/diff/260001/webrtc/base/random.h#newcode24 webrtc/base/random.h:24: // TODO(tommi): Change this so that the seed is ...
4 years, 10 months ago (2016-02-01 17:32:04 UTC) #47
pbos-webrtc
https://codereview.webrtc.org/1623543002/diff/260001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1623543002/diff/260001/webrtc/base/random.h#newcode24 webrtc/base/random.h:24: // TODO(tommi): Change this so that the seed is ...
4 years, 10 months ago (2016-02-01 17:59:25 UTC) #49
tommi
On 2016/02/01 17:59:25, pbos-webrtc wrote: > https://codereview.webrtc.org/1623543002/diff/260001/webrtc/base/random.h > File webrtc/base/random.h (right): > > https://codereview.webrtc.org/1623543002/diff/260001/webrtc/base/random.h#newcode24 > ...
4 years, 10 months ago (2016-02-01 18:05:17 UTC) #50
pbos-webrtc
On 2016/02/01 18:05:17, tommi-webrtc wrote: > On 2016/02/01 17:59:25, pbos-webrtc wrote: > > https://codereview.webrtc.org/1623543002/diff/260001/webrtc/base/random.h > ...
4 years, 10 months ago (2016-02-01 18:08:07 UTC) #51
tommi
Update comment
4 years, 10 months ago (2016-02-01 20:52:35 UTC) #52
tommi
On 2016/02/01 18:08:07, pbos-webrtc wrote: > On 2016/02/01 18:05:17, tommi-webrtc wrote: > > On 2016/02/01 ...
4 years, 10 months ago (2016-02-01 20:55:08 UTC) #53
the sun
On 2016/02/01 20:55:08, tommi-webrtc wrote: > On 2016/02/01 18:08:07, pbos-webrtc wrote: > > On 2016/02/01 ...
4 years, 10 months ago (2016-02-02 13:48:36 UTC) #54
the sun
LGTM
4 years, 10 months ago (2016-02-02 13:48:46 UTC) #55
pbos-webrtc
comment lgtm to me as well
4 years, 10 months ago (2016-02-02 13:51:01 UTC) #56
tommi
Update comment and remove the one from ssrc_database.cc
4 years, 10 months ago (2016-02-02 14:40:36 UTC) #57
tommi
Great. Thanks for the feedback. I've updated the comment, removed the duplicate one and am ...
4 years, 10 months ago (2016-02-02 14:41:26 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1623543002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1623543002/300001
4 years, 10 months ago (2016-02-02 14:41:42 UTC) #61
commit-bot: I haz the power
Committed patchset #15 (id:300001)
4 years, 10 months ago (2016-02-02 16:31:55 UTC) #63
commit-bot: I haz the power
4 years, 10 months ago (2016-02-02 16:34:29 UTC) #65
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/ae695e95a677b76be5a4e0c7051a964103340729
Cr-Commit-Position: refs/heads/master@{#11462}

Powered by Google App Engine
This is Rietveld 408576698