Skip to content

Commit

Permalink
Misc. cleanup: media/
Browse files Browse the repository at this point in the history
Bug: none
Change-Id: I5f9a4d1a93b22640940e03f41c1d9c936e3f64a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4962518
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Eugene Zemtsov <eugene@chromium.org>
Reviewed-by: Eugene Zemtsov <eugene@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1213178}
  • Loading branch information
pkasting authored and Chromium LUCI CQ committed Oct 22, 2023
1 parent 4f07550 commit 4c94357
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions media/capabilities/video_decode_stats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ message DecodeStatsProto {

// Required. Time of last data write from
// base::Time::InMillisecondsFSinceUnixEpoch(). Data will be discarded when
// the date indicates its very old. This avoids a circumstance where a few bad
// outlier playbacks permanently define a machines capabilities.
// the date indicates it's very old. This avoids a circumstance where a few
// bad outlier playbacks permanently define a machine's capabilities.
optional double last_write_date = 7;

// Required (for those in the "unweighted" experiment). An unweighted average
Expand Down
8 changes: 4 additions & 4 deletions media/capabilities/video_decode_stats_db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ bool VideoDecodeStatsDBImpl::AreStatsUsable(
stats_proto->unweighted_average_frames_efficient() <= 1 &&

// |last_write_date| represents
// base::Time::InMillisecondsFSinceUnixEpoch(), a number of msec since the
// epoch, so it should never be negative (zero is valid, as a default for
// this field, indicating the last write was made before we added time
// stamping). The converted time should also never be in the future.
// base::Time::InMillisecondsFSinceUnixEpoch(), so it should never be
// negative (zero is valid, as a default for this field, indicating the
// last write was made before we added time stamping). The converted time
// should also never be in the future.
stats_proto->last_write_date() >= 0 &&
base::Time::FromMillisecondsSinceUnixEpoch(
stats_proto->last_write_date()) <= wall_clock_->Now();
Expand Down
4 changes: 2 additions & 2 deletions media/capabilities/webrtc_video_stats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ package media;
message WebrtcVideoStatsProto {
// Required. Timestamp of this entry from
// base::Time::InMillisecondsFSinceUnixEpochIgnoringNull(). Data will be
// discarded when the date indicates its very old. This avoids a circumstance
// where a few bad outlier playbacks permanently define a machines
// discarded when the date indicates it's very old. This avoids a circumstance
// where a few bad outlier playbacks permanently define a machine's
// capabilities.
optional double timestamp = 1;
// Required. Number of frames that this entry is based on.
Expand Down
3 changes: 1 addition & 2 deletions media/cdm/library_cdm/clear_key_cdm/clear_key_cdm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ const char kClearKeyCdmVersion[] = "0.1.0.1";

// Variants of External Clear Key key system to test different scenarios.

const int64_t kMsPerSecond = 1000;
const int64_t kMaxTimerDelayMs = 5 * kMsPerSecond;
const int64_t kMaxTimerDelayMs = base::Seconds(5).InMilliseconds();

// CDM unit test result header. Must be in sync with UNIT_TEST_RESULT_HEADER in
// media/test/data/eme_player_js/globals.js.
Expand Down

0 comments on commit 4c94357

Please sign in to comment.