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

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed)

Created:
5 years ago by miu
Modified:
4 years, 11 months ago
CC:
avayvod+watch_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, feature-media-reviews_chromium.org, imcheng+watch_chromium.org, isheriff+watch_chromium.org, jasonroberts+watch_google.com, jshin+watch_chromium.org, mcasas+watch_chromium.org, miu+watch_chromium.org, posciak+watch_chromium.org, xjz+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. Introduces RtpTimeDelta and RtpTimeTicks to media::cast, modeled after base::TimeDelta and base::TimeTicks, that track RTP time and provide a strict set of valid math and comparison operators, bit truncation and re-expansion, and timebase conversion. All instances of raw uint32 used to represent RTP timestamps has been replaced with the new data type. BUG=530839 NOPRESUBMIT=true Committed: https://crrev.com/c938d4441a3fe1c3851858fba68e017aef424f86 Cr-Commit-Position: refs/heads/master@{#367106}

Patch Set 1 : #

Total comments: 37

Patch Set 2 : Addressed irfan's comments. #

Patch Set 3 : Compile fixes for test code in src/chrome. #

Patch Set 4 : Forgot to include a comment change in cast_messages.h. #

Total comments: 1

Patch Set 5 : Compile fixes for cast_messages.h for chromeos cross-compiles. #

Total comments: 6

Patch Set 6 : Addressed mkwst's comments, plus REBASE. #

Total comments: 4

Patch Set 7 : Addressed apacible's comments. Fixed minor build dep issue after adding cast_messages.cc. #

Patch Set 8 : REBASE after holidays #

Patch Set 9 : Fix in chrome_common.gypi to avoid building cast_messages.* on Android. #

Total comments: 2

Patch Set 10 : Fix unintended indentation change in cast_messages.h #

Patch Set 11 : Speculative workaround fix for win8_chromium_ng compile error. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1178 lines, -464 lines) Patch
M chrome/browser/media/cast_transport_host_filter.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/media/cast_transport_host_filter.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/media/cast_transport_host_filter_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/cast_messages.h View 1 2 3 4 5 6 7 8 9 2 chunks +21 lines, -3 lines 0 comments Download
A chrome/common/cast_messages.cc View 1 2 3 4 5 1 chunk +31 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_ipc_dispatcher_unittest.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/renderer/media/cast_transport_sender_ipc.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/renderer/media/cast_transport_sender_ipc.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M media/cast/BUILD.gn View 1 2 3 4 5 6 3 chunks +9 lines, -0 lines 0 comments Download
M media/cast/cast.gyp View 1 chunk +3 lines, -0 lines 0 comments Download
M media/cast/cast_defines.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -16 lines 0 comments Download
M media/cast/cast_testing.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
A media/cast/common/expanded_value_base.h View 1 1 chunk +124 lines, -0 lines 0 comments Download
A media/cast/common/expanded_value_base_unittest.cc View 1 1 chunk +107 lines, -0 lines 0 comments Download
A media/cast/common/rtp_time.h View 1 2 3 4 5 1 chunk +197 lines, -0 lines 0 comments Download
A media/cast/common/rtp_time.cc View 1 2 3 4 5 6 1 chunk +74 lines, -0 lines 0 comments Download
A media/cast/common/rtp_time_unittest.cc View 1 chunk +72 lines, -0 lines 0 comments Download
M media/cast/logging/encoding_event_subscriber.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -6 lines 0 comments Download
M media/cast/logging/encoding_event_subscriber.cc View 1 2 3 4 5 6 7 11 chunks +19 lines, -17 lines 0 comments Download
M media/cast/logging/encoding_event_subscriber_unittest.cc View 1 2 3 4 5 6 7 32 chunks +51 lines, -48 lines 0 comments Download
M media/cast/logging/log_deserializer.h View 1 chunk +4 lines, -4 lines 0 comments Download
M media/cast/logging/log_deserializer.cc View 1 2 3 4 5 6 7 5 chunks +14 lines, -13 lines 0 comments Download
M media/cast/logging/log_serializer.cc View 1 2 3 4 5 6 7 3 chunks +11 lines, -10 lines 0 comments Download
M media/cast/logging/logging_defines.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -4 lines 0 comments Download
M media/cast/logging/logging_defines.cc View 1 chunk +10 lines, -5 lines 0 comments Download
M media/cast/logging/receiver_time_offset_estimator_impl.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M media/cast/logging/receiver_time_offset_estimator_impl.cc View 1 2 3 4 5 6 7 1 chunk +17 lines, -7 lines 0 comments Download
M media/cast/logging/receiver_time_offset_estimator_impl_unittest.cc View 1 2 3 4 5 6 7 3 chunks +7 lines, -5 lines 0 comments Download
M media/cast/logging/simple_event_subscriber_unittest.cc View 1 2 3 4 5 6 7 5 chunks +5 lines, -5 lines 0 comments Download
M media/cast/logging/stats_event_subscriber.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M media/cast/logging/stats_event_subscriber.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M media/cast/logging/stats_event_subscriber_unittest.cc View 1 2 3 4 5 6 7 12 chunks +13 lines, -13 lines 0 comments Download
M media/cast/net/cast_transport_config.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M media/cast/net/cast_transport_config.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M media/cast/net/cast_transport_sender.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M media/cast/net/cast_transport_sender_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M media/cast/net/cast_transport_sender_impl.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M media/cast/net/cast_transport_sender_impl_unittest.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M media/cast/net/mock_cast_transport_sender.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
M media/cast/net/pacing/paced_sender.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M media/cast/net/pacing/paced_sender.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -1 line 0 comments Download
M media/cast/net/pacing/paced_sender_unittest.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -3 lines 0 comments Download
M media/cast/net/rtcp/receiver_rtcp_event_subscriber.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M media/cast/net/rtcp/receiver_rtcp_event_subscriber.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M media/cast/net/rtcp/receiver_rtcp_event_subscriber_unittest.cc View 1 2 3 4 5 6 7 9 chunks +9 lines, -9 lines 0 comments Download
M media/cast/net/rtcp/rtcp.h View 1 2 3 4 5 6 7 6 chunks +10 lines, -4 lines 0 comments Download
M media/cast/net/rtcp/rtcp.cc View 8 chunks +28 lines, -29 lines 0 comments Download
M media/cast/net/rtcp/rtcp_builder.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M media/cast/net/rtcp/rtcp_builder_unittest.cc View 1 2 3 4 5 6 7 12 chunks +21 lines, -12 lines 0 comments Download
M media/cast/net/rtcp/rtcp_defines.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -7 lines 0 comments Download
M media/cast/net/rtcp/rtcp_defines.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M media/cast/net/rtcp/rtcp_unittest.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -3 lines 0 comments Download
M media/cast/net/rtcp/rtcp_utility.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -2 lines 0 comments Download
M media/cast/net/rtcp/rtcp_utility.cc View 1 2 3 4 5 6 7 5 chunks +21 lines, -8 lines 0 comments Download
M media/cast/net/rtcp/rtcp_utility_unittest.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M media/cast/net/rtp/frame_buffer.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M media/cast/net/rtp/frame_buffer_unittest.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M media/cast/net/rtp/receiver_stats.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M media/cast/net/rtp/receiver_stats.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -8 lines 0 comments Download
M media/cast/net/rtp/receiver_stats_unittest.cc View 1 2 3 4 5 6 7 6 chunks +15 lines, -11 lines 0 comments Download
M media/cast/net/rtp/rtp_defines.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M media/cast/net/rtp/rtp_defines.cc View 1 chunk +0 lines, -1 line 0 comments Download
M media/cast/net/rtp/rtp_packetizer.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M media/cast/net/rtp/rtp_packetizer.cc View 1 2 3 4 5 6 7 6 chunks +8 lines, -13 lines 0 comments Download
M media/cast/net/rtp/rtp_packetizer_unittest.cc View 1 2 3 4 5 6 7 4 chunks +4 lines, -5 lines 0 comments Download
M media/cast/net/rtp/rtp_parser.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M media/cast/net/rtp/rtp_parser.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -4 lines 0 comments Download
M media/cast/net/rtp/rtp_parser_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M media/cast/receiver/cast_receiver_impl.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M media/cast/receiver/cast_receiver_impl.cc View 1 2 3 4 5 6 7 5 chunks +6 lines, -6 lines 0 comments Download
M media/cast/receiver/frame_receiver.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M media/cast/receiver/frame_receiver.cc View 1 2 3 4 5 6 7 6 chunks +9 lines, -10 lines 0 comments Download
M media/cast/receiver/frame_receiver_unittest.cc View 1 2 3 4 5 6 7 10 chunks +16 lines, -16 lines 0 comments Download
M media/cast/sender/audio_encoder.cc View 1 2 3 4 5 6 7 6 chunks +12 lines, -10 lines 0 comments Download
M media/cast/sender/audio_encoder_unittest.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -3 lines 0 comments Download
M media/cast/sender/audio_sender.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M media/cast/sender/external_video_encoder.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -3 lines 0 comments Download
M media/cast/sender/fake_software_video_encoder.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M media/cast/sender/frame_sender.h View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M media/cast/sender/frame_sender.cc View 1 2 3 4 5 6 7 6 chunks +8 lines, -9 lines 0 comments Download
M media/cast/sender/h264_vt_encoder.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M media/cast/sender/h264_vt_encoder_unittest.cc View 1 2 3 4 5 6 7 5 chunks +5 lines, -5 lines 0 comments Download
M media/cast/sender/video_encoder_unittest.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -8 lines 0 comments Download
M media/cast/sender/video_sender.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M media/cast/sender/video_sender.cc View 1 2 3 4 5 6 7 7 chunks +14 lines, -15 lines 0 comments Download
M media/cast/sender/vp8_encoder.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M media/cast/test/cast_benchmarks.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M media/cast/test/end2end_unittest.cc View 1 2 3 4 5 6 7 4 chunks +19 lines, -27 lines 0 comments Download
M media/cast/test/fake_media_source.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -1 line 0 comments Download

Messages

Total messages: 45 (20 generated)
miu
irfan: PTAL. Sorry for the huge CL, but it's mostly search-and-replace, so should be quick ...
5 years ago (2015-12-09 02:22:42 UTC) #3
Irfan
https://codereview.chromium.org/1515433002/diff/20001/chrome/common/cast_messages.h File chrome/common/cast_messages.h (right): https://codereview.chromium.org/1515433002/diff/20001/chrome/common/cast_messages.h#newcode6 chrome/common/cast_messages.h:6: // Multiply-included message file, hence no include guard. Perhaps ...
5 years ago (2015-12-09 21:24:28 UTC) #4
miu
Thanks for the very quick turnaround! :) PTAL. https://codereview.chromium.org/1515433002/diff/20001/chrome/common/cast_messages.h File chrome/common/cast_messages.h (right): https://codereview.chromium.org/1515433002/diff/20001/chrome/common/cast_messages.h#newcode6 chrome/common/cast_messages.h:6: // ...
5 years ago (2015-12-10 00:38:37 UTC) #5
Irfan
lgtm https://codereview.chromium.org/1515433002/diff/20001/chrome/common/cast_messages.h File chrome/common/cast_messages.h (right): https://codereview.chromium.org/1515433002/diff/20001/chrome/common/cast_messages.h#newcode6 chrome/common/cast_messages.h:6: // Multiply-included message file, hence no include guard. ...
5 years ago (2015-12-10 01:40:38 UTC) #6
miu
hubbe: Need "full committer" lgtm stamp. mkwst: Need IPC security review of chrome/common/cast_messages.h.
5 years ago (2015-12-10 01:59:59 UTC) #8
Mike West
https://codereview.chromium.org/1515433002/diff/100001/chrome/common/cast_messages.h File chrome/common/cast_messages.h (right): https://codereview.chromium.org/1515433002/diff/100001/chrome/common/cast_messages.h#newcode21 chrome/common/cast_messages.h:21: struct ParamTraits<media::cast::RtpTimeTicks> { Please don't inline the definitions of ...
5 years ago (2015-12-10 08:54:46 UTC) #9
miu
mkwst: lgty now? https://codereview.chromium.org/1515433002/diff/100001/chrome/common/cast_messages.h File chrome/common/cast_messages.h (right): https://codereview.chromium.org/1515433002/diff/100001/chrome/common/cast_messages.h#newcode21 chrome/common/cast_messages.h:21: struct ParamTraits<media::cast::RtpTimeTicks> { On 2015/12/10 08:54:46, ...
5 years ago (2015-12-11 23:00:29 UTC) #10
miu
apacible: Need full committer rubber stamp. (Basically, this CL is reviewed, but feel free to ...
5 years ago (2015-12-11 23:02:39 UTC) #12
apacible
rs lgtm https://codereview.chromium.org/1515433002/diff/120001/chrome/browser/media/cast_transport_host_filter_unittest.cc File chrome/browser/media/cast_transport_host_filter_unittest.cc (right): https://codereview.chromium.org/1515433002/diff/120001/chrome/browser/media/cast_transport_host_filter_unittest.cc#newcode111 chrome/browser/media/cast_transport_host_filter_unittest.cc:111: media::cast::RtpTimeTicks() + media::cast::RtpTimeDelta::FromTicks(47); Is the 47 here ...
5 years ago (2015-12-11 23:54:59 UTC) #13
miu
https://codereview.chromium.org/1515433002/diff/120001/chrome/browser/media/cast_transport_host_filter_unittest.cc File chrome/browser/media/cast_transport_host_filter_unittest.cc (right): https://codereview.chromium.org/1515433002/diff/120001/chrome/browser/media/cast_transport_host_filter_unittest.cc#newcode111 chrome/browser/media/cast_transport_host_filter_unittest.cc:111: media::cast::RtpTimeTicks() + media::cast::RtpTimeDelta::FromTicks(47); On 2015/12/11 23:54:59, apacible wrote: > ...
5 years ago (2015-12-12 00:23:30 UTC) #14
Mike West
On 2015/12/11 at 23:00:29, miu wrote: > mkwst: lgty now? LGTM, thanks.
5 years ago (2015-12-13 07:39:02 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515433002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515433002/140001
5 years ago (2015-12-14 19:57:26 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/153656)
5 years ago (2015-12-14 20:11:18 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515433002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515433002/160001
4 years, 11 months ago (2015-12-29 02:06:10 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/131818)
4 years, 11 months ago (2015-12-29 02:11:09 UTC) #25
miu
thestig: Need OWNERS rubber stamp on chrome/common/cast_messages.cc (mkwst@ already did IPC review, but presubmit wants ...
4 years, 11 months ago (2015-12-29 02:49:53 UTC) #27
Lei Zhang
lgtm https://codereview.chromium.org/1515433002/diff/180001/chrome/common/cast_messages.h File chrome/common/cast_messages.h (right): https://codereview.chromium.org/1515433002/diff/180001/chrome/common/cast_messages.h#newcode206 chrome/common/cast_messages.h:206: CastHostMsg_Delete, int32_t /* channel_id */) Not sure why ...
4 years, 11 months ago (2015-12-29 02:57:23 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515433002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515433002/200001
4 years, 11 months ago (2015-12-29 03:14:36 UTC) #31
miu
https://codereview.chromium.org/1515433002/diff/180001/chrome/common/cast_messages.h File chrome/common/cast_messages.h (right): https://codereview.chromium.org/1515433002/diff/180001/chrome/common/cast_messages.h#newcode206 chrome/common/cast_messages.h:206: CastHostMsg_Delete, int32_t /* channel_id */) On 2015/12/29 02:57:23, Lei ...
4 years, 11 months ago (2015-12-29 03:14:51 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/131824)
4 years, 11 months ago (2015-12-29 03:23:44 UTC) #34
miu
For the record, I'm committing with NOPRESUBMIT=true due to problems with `git cl format media` ...
4 years, 11 months ago (2015-12-29 20:56:30 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515433002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515433002/240001
4 years, 11 months ago (2015-12-29 20:56:51 UTC) #40
commit-bot: I haz the power
Committed patchset #11 (id:240001)
4 years, 11 months ago (2015-12-29 22:05:05 UTC) #42
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/c938d4441a3fe1c3851858fba68e017aef424f86 Cr-Commit-Position: refs/heads/master@{#367106}
4 years, 11 months ago (2015-12-29 22:05:57 UTC) #44
dcheng
4 years, 11 months ago (2015-12-30 04:05:37 UTC) #45
Message was sent while issue was closed.
On 2015/12/29 at 20:56:30, miu wrote:
> For the record, I'm committing with NOPRESUBMIT=true due to problems with `git
cl format media` in the media/ subdir.  There is an ongoing e-mail discussion
about resolving the issue.  For this change, I've accepted most of the format
script's changes, but have rejected the ones that make things unreadable.

Next time, please run the presubmit locally still before reverting objectionable
formatting changes. This change introduced new calls to Pass(), which I'm
actively trying to remove.

Powered by Google App Engine
This is Rietveld 408576698