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

Unified Diff: media/cast/sender/audio_encoder_unittest.cc

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Speculative workaround fix for win8_chromium_ng compile error. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/sender/audio_encoder.cc ('k') | media/cast/sender/audio_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/audio_encoder_unittest.cc
diff --git a/media/cast/sender/audio_encoder_unittest.cc b/media/cast/sender/audio_encoder_unittest.cc
index 388192b0c0bb156adc36c7beb67dc7b1c0321aff..674733d0440514f9c2a5027e4fcd7e92bfc093de 100644
--- a/media/cast/sender/audio_encoder_unittest.cc
+++ b/media/cast/sender/audio_encoder_unittest.cc
@@ -17,6 +17,7 @@
#include "media/base/media.h"
#include "media/cast/cast_config.h"
#include "media/cast/cast_environment.h"
+#include "media/cast/common/rtp_time.h"
#include "media/cast/sender/audio_encoder.h"
#include "media/cast/test/fake_single_thread_task_runner.h"
#include "media/cast/test/utility/audio_utility.h"
@@ -31,7 +32,7 @@ namespace {
class TestEncodedAudioFrameReceiver {
public:
- TestEncodedAudioFrameReceiver() : frames_received_(0), rtp_lower_bound_(0) {}
+ TestEncodedAudioFrameReceiver() : frames_received_(0) {}
virtual ~TestEncodedAudioFrameReceiver() {}
int frames_received() const { return frames_received_; }
@@ -56,7 +57,8 @@ class TestEncodedAudioFrameReceiver {
// of the fixed frame size.
EXPECT_LE(rtp_lower_bound_, encoded_frame->rtp_timestamp);
rtp_lower_bound_ = encoded_frame->rtp_timestamp;
- EXPECT_EQ(0u, encoded_frame->rtp_timestamp % samples_per_frame_);
+ EXPECT_EQ(RtpTimeDelta(), (encoded_frame->rtp_timestamp - RtpTimeTicks()) %
+ RtpTimeDelta::FromTicks(samples_per_frame_));
EXPECT_TRUE(!encoded_frame->data.empty());
EXPECT_LE(lower_bound_, encoded_frame->reference_time);
@@ -71,7 +73,7 @@ class TestEncodedAudioFrameReceiver {
private:
int frames_received_;
- uint32_t rtp_lower_bound_;
+ RtpTimeTicks rtp_lower_bound_;
int samples_per_frame_;
base::TimeTicks lower_bound_;
base::TimeTicks upper_bound_;
« no previous file with comments | « media/cast/sender/audio_encoder.cc ('k') | media/cast/sender/audio_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698