| 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 33d903519d01ca77236e867c81b3c9e177f73a00..260a8c6f4efb75f02f45f7b4542493c5a4ad901c 100644
|
| --- a/media/cast/sender/video_encoder_unittest.cc
|
| +++ b/media/cast/sender/video_encoder_unittest.cc
|
| @@ -2,15 +2,17 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "media/cast/sender/video_encoder.h"
|
| +
|
| #include <stdint.h>
|
|
|
| +#include <memory>
|
| #include <utility>
|
| #include <vector>
|
|
|
| #include "base/bind.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| #include "build/build_config.h"
|
| #include "media/base/fake_single_thread_task_runner.h"
|
| #include "media/base/video_frame.h"
|
| @@ -18,7 +20,6 @@
|
| #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_encoder.h"
|
| #include "media/cast/sender/video_frame_factory.h"
|
| #include "media/cast/test/utility/default_config.h"
|
| #include "media/cast/test/utility/video_utility.h"
|
| @@ -37,11 +38,11 @@ class VideoEncoderTest
|
| VideoEncoderTest()
|
| : testing_clock_(new base::SimpleTestTickClock()),
|
| task_runner_(new FakeSingleThreadTaskRunner(testing_clock_)),
|
| - cast_environment_(
|
| - new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_),
|
| - task_runner_,
|
| - task_runner_,
|
| - task_runner_)),
|
| + cast_environment_(new CastEnvironment(
|
| + std::unique_ptr<base::TickClock>(testing_clock_),
|
| + task_runner_,
|
| + task_runner_,
|
| + task_runner_)),
|
| video_config_(GetDefaultVideoSenderConfig()),
|
| operational_status_(STATUS_UNINITIALIZED),
|
| count_frames_delivered_(0) {
|
| @@ -214,11 +215,12 @@ class VideoEncoderTest
|
|
|
| // Checks that |encoded_frame| matches expected values. This is the method
|
| // bound in the callback returned from EncodeAndCheckDelivery().
|
| - void DeliverEncodedVideoFrame(uint32_t expected_frame_id,
|
| - uint32_t expected_last_referenced_frame_id,
|
| - RtpTimeTicks expected_rtp_timestamp,
|
| - const base::TimeTicks& expected_reference_time,
|
| - scoped_ptr<SenderEncodedFrame> encoded_frame) {
|
| + void DeliverEncodedVideoFrame(
|
| + uint32_t expected_frame_id,
|
| + uint32_t expected_last_referenced_frame_id,
|
| + RtpTimeTicks expected_rtp_timestamp,
|
| + const base::TimeTicks& expected_reference_time,
|
| + std::unique_ptr<SenderEncodedFrame> encoded_frame) {
|
| EXPECT_TRUE(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
|
|
|
| EXPECT_EQ(expected_frame_id, encoded_frame->frame_id);
|
| @@ -265,11 +267,11 @@ class VideoEncoderTest
|
| const scoped_refptr<FakeSingleThreadTaskRunner> task_runner_;
|
| const scoped_refptr<CastEnvironment> cast_environment_;
|
| VideoSenderConfig video_config_;
|
| - scoped_ptr<FakeVideoEncodeAcceleratorFactory> vea_factory_;
|
| + std::unique_ptr<FakeVideoEncodeAcceleratorFactory> vea_factory_;
|
| base::TimeTicks first_frame_time_;
|
| OperationalStatus operational_status_;
|
| - scoped_ptr<VideoEncoder> video_encoder_;
|
| - scoped_ptr<VideoFrameFactory> video_frame_factory_;
|
| + std::unique_ptr<VideoEncoder> video_encoder_;
|
| + std::unique_ptr<VideoFrameFactory> video_frame_factory_;
|
|
|
| int count_frames_delivered_;
|
|
|
|
|