OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 class Clock; | 23 class Clock; |
24 class VCMEncodedFrame; | 24 class VCMEncodedFrame; |
25 | 25 |
26 class VCMReceiver { | 26 class VCMReceiver { |
27 public: | 27 public: |
28 VCMReceiver(VCMTiming* timing, | 28 VCMReceiver(VCMTiming* timing, |
29 Clock* clock, | 29 Clock* clock, |
30 EventFactory* event_factory); | 30 EventFactory* event_factory); |
| 31 |
| 32 // Using this constructor, you can specify a different event factory for the |
| 33 // jitter buffer. Useful for unit tests when you want to simulate incoming |
| 34 // packets, in which case the jitter buffer's wait event is different from |
| 35 // that of VCMReceiver itself. |
| 36 VCMReceiver(VCMTiming* timing, |
| 37 Clock* clock, |
| 38 rtc::scoped_ptr<EventWrapper> receiver_event, |
| 39 rtc::scoped_ptr<EventWrapper> jitter_buffer_event); |
| 40 |
31 ~VCMReceiver(); | 41 ~VCMReceiver(); |
32 | 42 |
33 void Reset(); | 43 void Reset(); |
34 void UpdateRtt(int64_t rtt); | 44 void UpdateRtt(int64_t rtt); |
35 int32_t InsertPacket(const VCMPacket& packet, | 45 int32_t InsertPacket(const VCMPacket& packet, |
36 uint16_t frame_width, | 46 uint16_t frame_width, |
37 uint16_t frame_height); | 47 uint16_t frame_height); |
38 VCMEncodedFrame* FrameForDecoding(uint16_t max_wait_time_ms, | 48 VCMEncodedFrame* FrameForDecoding(uint16_t max_wait_time_ms, |
39 int64_t& next_render_time_ms, | 49 int64_t& next_render_time_ms, |
40 bool render_timing = true); | 50 bool render_timing = true); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 Clock* const clock_; | 83 Clock* const clock_; |
74 VCMJitterBuffer jitter_buffer_; | 84 VCMJitterBuffer jitter_buffer_; |
75 VCMTiming* timing_; | 85 VCMTiming* timing_; |
76 rtc::scoped_ptr<EventWrapper> render_wait_event_; | 86 rtc::scoped_ptr<EventWrapper> render_wait_event_; |
77 int max_video_delay_ms_; | 87 int max_video_delay_ms_; |
78 }; | 88 }; |
79 | 89 |
80 } // namespace webrtc | 90 } // namespace webrtc |
81 | 91 |
82 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_RECEIVER_H_ | 92 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_RECEIVER_H_ |
OLD | NEW |