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

Unified Diff: media/cast/sender/h264_vt_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/h264_vt_encoder.cc ('k') | media/cast/sender/video_encoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/h264_vt_encoder_unittest.cc
diff --git a/media/cast/sender/h264_vt_encoder_unittest.cc b/media/cast/sender/h264_vt_encoder_unittest.cc
index 029a483b87136054e48ee0b9405be0f4f36e3c33..49a451d0e453c0ac35fb12f86355f75e9c4fdfb8 100644
--- a/media/cast/sender/h264_vt_encoder_unittest.cc
+++ b/media/cast/sender/h264_vt_encoder_unittest.cc
@@ -20,7 +20,7 @@
#include "media/base/media.h"
#include "media/base/media_switches.h"
#include "media/base/media_util.h"
-#include "media/cast/cast_defines.h"
+#include "media/cast/common/rtp_time.h"
#include "media/cast/constants.h"
#include "media/cast/sender/h264_vt_encoder.h"
#include "media/cast/sender/video_frame_factory.h"
@@ -89,7 +89,7 @@ class MetadataRecorder : public base::RefCountedThreadSafe<MetadataRecorder> {
void PushExpectation(uint32_t expected_frame_id,
uint32_t expected_last_referenced_frame_id,
- uint32_t expected_rtp_timestamp,
+ RtpTimeTicks expected_rtp_timestamp,
const base::TimeTicks& expected_reference_time) {
expectations_.push(Expectation{expected_frame_id,
expected_last_referenced_frame_id,
@@ -125,7 +125,7 @@ class MetadataRecorder : public base::RefCountedThreadSafe<MetadataRecorder> {
struct Expectation {
uint32_t expected_frame_id;
uint32_t expected_last_referenced_frame_id;
- uint32_t expected_rtp_timestamp;
+ RtpTimeTicks expected_rtp_timestamp;
base::TimeTicks expected_reference_time;
};
std::queue<Expectation> expectations_;
@@ -290,7 +290,7 @@ TEST_F(H264VideoToolboxEncoderTest, CheckFrameMetadataSequence) {
&MetadataRecorder::CompareFrameWithExpected, metadata_recorder.get());
metadata_recorder->PushExpectation(
- 0, 0, TimeDeltaToRtpDelta(frame_->timestamp(), kVideoFrequency),
+ 0, 0, RtpTimeTicks::FromTimeDelta(frame_->timestamp(), kVideoFrequency),
clock_->NowTicks());
EXPECT_TRUE(encoder_->EncodeVideoFrame(frame_, clock_->NowTicks(), cb));
message_loop_.RunUntilIdle();
@@ -299,7 +299,7 @@ TEST_F(H264VideoToolboxEncoderTest, CheckFrameMetadataSequence) {
AdvanceClockAndVideoFrameTimestamp();
metadata_recorder->PushExpectation(
frame_id, frame_id - 1,
- TimeDeltaToRtpDelta(frame_->timestamp(), kVideoFrequency),
+ RtpTimeTicks::FromTimeDelta(frame_->timestamp(), kVideoFrequency),
clock_->NowTicks());
EXPECT_TRUE(encoder_->EncodeVideoFrame(frame_, clock_->NowTicks(), cb));
}
« no previous file with comments | « media/cast/sender/h264_vt_encoder.cc ('k') | media/cast/sender/video_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698