OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/test/simple_test_tick_clock.h" | 11 #include "base/test/simple_test_tick_clock.h" |
12 #include "media/base/video_frame.h" | 12 #include "media/base/video_frame.h" |
13 #include "media/cast/cast_environment.h" | 13 #include "media/cast/cast_environment.h" |
14 #include "media/cast/logging/simple_event_subscriber.h" | 14 #include "media/cast/logging/simple_event_subscriber.h" |
15 #include "media/cast/net/cast_transport_config.h" | 15 #include "media/cast/net/cast_transport_config.h" |
16 #include "media/cast/net/cast_transport_sender_impl.h" | 16 #include "media/cast/net/cast_transport_sender_impl.h" |
17 #include "media/cast/net/pacing/paced_sender.h" | 17 #include "media/cast/net/pacing/paced_sender.h" |
| 18 #include "media/cast/sender/video_frame_factory.h" |
18 #include "media/cast/sender/video_sender.h" | 19 #include "media/cast/sender/video_sender.h" |
19 #include "media/cast/test/fake_single_thread_task_runner.h" | 20 #include "media/cast/test/fake_single_thread_task_runner.h" |
20 #include "media/cast/test/fake_video_encode_accelerator.h" | 21 #include "media/cast/test/fake_video_encode_accelerator.h" |
21 #include "media/cast/test/utility/default_config.h" | 22 #include "media/cast/test/utility/default_config.h" |
22 #include "media/cast/test/utility/video_utility.h" | 23 #include "media/cast/test/utility/video_utility.h" |
23 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
25 | 26 |
26 namespace media { | 27 namespace media { |
27 namespace cast { | 28 namespace cast { |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 RtcpCastMessage cast_feedback(1); | 530 RtcpCastMessage cast_feedback(1); |
530 cast_feedback.media_ssrc = 2; | 531 cast_feedback.media_ssrc = 2; |
531 cast_feedback.ack_frame_id = 0; | 532 cast_feedback.ack_frame_id = 0; |
532 video_sender_->OnReceivedCastFeedback(cast_feedback); | 533 video_sender_->OnReceivedCastFeedback(cast_feedback); |
533 | 534 |
534 transport_.SetPause(false); | 535 transport_.SetPause(false); |
535 RunTasks(33); | 536 RunTasks(33); |
536 EXPECT_EQ(0, transport_.number_of_rtp_packets()); | 537 EXPECT_EQ(0, transport_.number_of_rtp_packets()); |
537 } | 538 } |
538 | 539 |
| 540 TEST_F(VideoSenderTest, CheckVideoFrameFactoryIsNull) { |
| 541 EXPECT_EQ(STATUS_VIDEO_INITIALIZED, InitEncoder(false, true)); |
| 542 EXPECT_EQ(nullptr, video_sender_->CreateVideoFrameFactory().get()); |
| 543 } |
| 544 |
539 } // namespace cast | 545 } // namespace cast |
540 } // namespace media | 546 } // namespace media |
OLD | NEW |