OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2017 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "webrtc/test/gtest.h" | 13 #include "webrtc/test/gtest.h" |
14 #include "webrtc/test/gmock.h" | 14 #include "webrtc/test/gmock.h" |
15 | 15 |
| 16 #include "webrtc/api/video_codecs/video_decoder.h" |
16 #include "webrtc/base/criticalsection.h" | 17 #include "webrtc/base/criticalsection.h" |
17 #include "webrtc/base/event.h" | 18 #include "webrtc/base/event.h" |
18 #include "webrtc/media/base/fakevideorenderer.h" | 19 #include "webrtc/media/base/fakevideorenderer.h" |
19 #include "webrtc/modules/pacing/packet_router.h" | 20 #include "webrtc/modules/pacing/packet_router.h" |
20 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" | 21 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" |
21 #include "webrtc/modules/utility/include/process_thread.h" | 22 #include "webrtc/modules/utility/include/process_thread.h" |
22 #include "webrtc/video/call_stats.h" | 23 #include "webrtc/video/call_stats.h" |
23 #include "webrtc/video/video_receive_stream.h" | 24 #include "webrtc/video/video_receive_stream.h" |
24 #include "webrtc/system_wrappers/include/clock.h" | 25 #include "webrtc/system_wrappers/include/clock.h" |
25 #include "webrtc/system_wrappers/include/sleep.h" | 26 #include "webrtc/system_wrappers/include/sleep.h" |
26 #include "webrtc/test/field_trial.h" | 27 #include "webrtc/test/field_trial.h" |
27 #include "webrtc/video_decoder.h" | |
28 | 28 |
29 using testing::_; | 29 using testing::_; |
30 using testing::Invoke; | 30 using testing::Invoke; |
31 | 31 |
32 constexpr int kDefaultTimeOutMs = 50; | 32 constexpr int kDefaultTimeOutMs = 50; |
33 | 33 |
34 namespace webrtc { | 34 namespace webrtc { |
35 | 35 |
36 namespace { | 36 namespace { |
37 | 37 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 video_receive_stream_->Start(); | 131 video_receive_stream_->Start(); |
132 EXPECT_CALL(mock_h264_video_decoder_, Decode(_, false, _, _, _)); | 132 EXPECT_CALL(mock_h264_video_decoder_, Decode(_, false, _, _, _)); |
133 EXPECT_EQ(true, | 133 EXPECT_EQ(true, |
134 video_receive_stream_->OnRecoveredPacket(rtppacket.data(), | 134 video_receive_stream_->OnRecoveredPacket(rtppacket.data(), |
135 rtppacket.size())); | 135 rtppacket.size())); |
136 EXPECT_CALL(mock_h264_video_decoder_, Release()); | 136 EXPECT_CALL(mock_h264_video_decoder_, Release()); |
137 // Make sure the decoder thread had a chance to run. | 137 // Make sure the decoder thread had a chance to run. |
138 init_decode_event_.Wait(kDefaultTimeOutMs); | 138 init_decode_event_.Wait(kDefaultTimeOutMs); |
139 } | 139 } |
140 } // namespace webrtc | 140 } // namespace webrtc |
OLD | NEW |