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

Unified Diff: media/cast/sender/video_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: 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
Index: media/cast/sender/video_encoder_unittest.cc
diff --git a/media/cast/sender/video_encoder_unittest.cc b/media/cast/sender/video_encoder_unittest.cc
index e308fc4a2e3c45ed1115e027da2200ef8ffa6337..a25d33486e1667402932451c823bfaec72dd9b17 100644
--- a/media/cast/sender/video_encoder_unittest.cc
+++ b/media/cast/sender/video_encoder_unittest.cc
@@ -11,6 +11,7 @@
#include "media/base/video_frame.h"
#include "media/cast/cast_defines.h"
#include "media/cast/cast_environment.h"
+#include "media/cast/common/rtp_time.h"
#include "media/cast/sender/fake_video_encode_accelerator_factory.h"
#include "media/cast/sender/video_frame_factory.h"
#include "media/cast/sender/video_encoder.h"
@@ -168,14 +169,11 @@ class VideoEncoderTest
uint32 frame_id,
uint32 reference_frame_id) {
return video_encoder_->EncodeVideoFrame(
- video_frame,
- Now(),
+ video_frame, Now(),
base::Bind(&VideoEncoderTest::DeliverEncodedVideoFrame,
- base::Unretained(this),
- frame_id,
- reference_frame_id,
- TimeDeltaToRtpDelta(video_frame->timestamp(),
- kVideoFrequency),
+ base::Unretained(this), frame_id, reference_frame_id,
+ RtpTimeTicks::FromTimeDelta(video_frame->timestamp(),
+ kVideoFrequency),
Now()));
}
@@ -213,12 +211,11 @@ class VideoEncoderTest
// Checks that |encoded_frame| matches expected values. This is the method
// bound in the callback returned from EncodeAndCheckDelivery().
- void DeliverEncodedVideoFrame(
- uint32 expected_frame_id,
- uint32 expected_last_referenced_frame_id,
- uint32 expected_rtp_timestamp,
- const base::TimeTicks& expected_reference_time,
- scoped_ptr<SenderEncodedFrame> encoded_frame) {
+ void DeliverEncodedVideoFrame(uint32 expected_frame_id,
+ uint32 expected_last_referenced_frame_id,
+ RtpTimeTicks expected_rtp_timestamp,
+ const base::TimeTicks& expected_reference_time,
+ scoped_ptr<SenderEncodedFrame> encoded_frame) {
EXPECT_TRUE(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
EXPECT_EQ(expected_frame_id, encoded_frame->frame_id);

Powered by Google App Engine
This is Rietveld 408576698