OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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> |
| 6 |
5 #include <vector> | 7 #include <vector> |
6 | 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
9 #include "base/test/simple_test_tick_clock.h" | 11 #include "base/test/simple_test_tick_clock.h" |
10 #include "media/base/video_frame.h" | 12 #include "media/base/video_frame.h" |
11 #include "media/cast/cast_environment.h" | 13 #include "media/cast/cast_environment.h" |
12 #include "media/cast/logging/simple_event_subscriber.h" | 14 #include "media/cast/logging/simple_event_subscriber.h" |
13 #include "media/cast/test/fake_single_thread_task_runner.h" | 15 #include "media/cast/test/fake_single_thread_task_runner.h" |
14 #include "media/cast/test/fake_video_encode_accelerator.h" | 16 #include "media/cast/test/fake_video_encode_accelerator.h" |
15 #include "media/cast/test/utility/default_config.h" | 17 #include "media/cast/test/utility/default_config.h" |
16 #include "media/cast/test/utility/video_utility.h" | 18 #include "media/cast/test/utility/video_utility.h" |
17 #include "media/cast/transport/cast_transport_config.h" | 19 #include "media/cast/transport/cast_transport_config.h" |
18 #include "media/cast/transport/cast_transport_sender_impl.h" | 20 #include "media/cast/transport/cast_transport_sender_impl.h" |
19 #include "media/cast/transport/pacing/paced_sender.h" | 21 #include "media/cast/transport/pacing/paced_sender.h" |
20 #include "media/cast/video_sender/video_sender.h" | 22 #include "media/cast/video_sender/video_sender.h" |
21 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
23 | 25 |
24 namespace media { | 26 namespace media { |
25 namespace cast { | 27 namespace cast { |
26 | 28 |
27 namespace { | 29 namespace { |
28 static const int64 kStartMillisecond = GG_INT64_C(12345678900000); | 30 static const int64 kStartMillisecond = INT64_C(12345678900000); |
29 static const uint8 kPixelValue = 123; | 31 static const uint8 kPixelValue = 123; |
30 static const int kWidth = 320; | 32 static const int kWidth = 320; |
31 static const int kHeight = 240; | 33 static const int kHeight = 240; |
32 | 34 |
33 using testing::_; | 35 using testing::_; |
34 using testing::AtLeast; | 36 using testing::AtLeast; |
35 | 37 |
36 void CreateVideoEncodeAccelerator( | 38 void CreateVideoEncodeAccelerator( |
37 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 39 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
38 scoped_ptr<VideoEncodeAccelerator> fake_vea, | 40 scoped_ptr<VideoEncodeAccelerator> fake_vea, |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 // Empty the pipeline. | 363 // Empty the pipeline. |
362 RunTasks(100); | 364 RunTasks(100); |
363 // Should have sent at least 7 packets. | 365 // Should have sent at least 7 packets. |
364 EXPECT_GE( | 366 EXPECT_GE( |
365 transport_.number_of_rtp_packets() + transport_.number_of_rtcp_packets(), | 367 transport_.number_of_rtp_packets() + transport_.number_of_rtcp_packets(), |
366 7); | 368 7); |
367 } | 369 } |
368 | 370 |
369 } // namespace cast | 371 } // namespace cast |
370 } // namespace media | 372 } // namespace media |
OLD | NEW |