OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 "webrtc/base/checks.h" | 11 #include "webrtc/base/checks.h" |
12 #include "webrtc/base/logging.h" | 12 #include "webrtc/base/logging.h" |
13 #include "webrtc/base/trace_event.h" | 13 #include "webrtc/base/trace_event.h" |
14 #include "webrtc/common_types.h" | 14 #include "webrtc/common_types.h" |
15 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 15 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
16 #include "webrtc/modules/video_coding/include/video_codec_interface.h" | 16 #include "webrtc/modules/video_coding/include/video_codec_interface.h" |
17 #include "webrtc/modules/video_coding/encoded_frame.h" | 17 #include "webrtc/modules/video_coding/encoded_frame.h" |
18 #include "webrtc/modules/video_coding/jitter_buffer.h" | 18 #include "webrtc/modules/video_coding/jitter_buffer.h" |
19 #include "webrtc/modules/video_coding/packet.h" | 19 #include "webrtc/modules/video_coding/packet.h" |
20 #include "webrtc/modules/video_coding/video_coding_impl.h" | 20 #include "webrtc/modules/video_coding/video_coding_impl.h" |
21 #include "webrtc/system_wrappers/include/clock.h" | 21 #include "webrtc/system_wrappers/include/clock.h" |
22 | 22 |
23 // #define DEBUG_DECODER_BIT_STREAM | 23 // #define DEBUG_DECODER_BIT_STREAM |
24 | 24 |
25 namespace webrtc { | 25 namespace webrtc { |
26 namespace vcm { | 26 namespace vcm { |
27 | 27 |
28 VideoReceiver::VideoReceiver(Clock* clock, EventFactory* event_factory) | 28 VideoReceiver::VideoReceiver(Clock* clock, |
| 29 EventFactory* event_factory, |
| 30 ProcessThread* module_process_thread, |
| 31 NackSender* nack_sender, |
| 32 KeyFrameRequestSender* keyframe_request_sender) |
29 : clock_(clock), | 33 : clock_(clock), |
30 process_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()), | 34 process_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()), |
31 _receiveCritSect(CriticalSectionWrapper::CreateCriticalSection()), | 35 _receiveCritSect(CriticalSectionWrapper::CreateCriticalSection()), |
32 _timing(clock_), | 36 _timing(clock_), |
33 _receiver(&_timing, clock_, event_factory), | 37 _receiver(&_timing, |
| 38 clock_, |
| 39 event_factory, |
| 40 module_process_thread, |
| 41 nack_sender, |
| 42 keyframe_request_sender), |
34 _decodedFrameCallback(&_timing, clock_), | 43 _decodedFrameCallback(&_timing, clock_), |
35 _frameTypeCallback(NULL), | 44 _frameTypeCallback(NULL), |
36 _receiveStatsCallback(NULL), | 45 _receiveStatsCallback(NULL), |
37 _decoderTimingCallback(NULL), | 46 _decoderTimingCallback(NULL), |
38 _packetRequestCallback(NULL), | 47 _packetRequestCallback(NULL), |
39 render_buffer_callback_(NULL), | 48 render_buffer_callback_(NULL), |
40 _decoder(NULL), | 49 _decoder(NULL), |
41 #ifdef DEBUG_DECODER_BIT_STREAM | 50 #ifdef DEBUG_DECODER_BIT_STREAM |
42 _bitStreamBeforeDecoder(NULL), | 51 _bitStreamBeforeDecoder(NULL), |
43 #endif | 52 #endif |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 } | 536 } |
528 | 537 |
529 void VideoReceiver::RegisterPreDecodeImageCallback( | 538 void VideoReceiver::RegisterPreDecodeImageCallback( |
530 EncodedImageCallback* observer) { | 539 EncodedImageCallback* observer) { |
531 CriticalSectionScoped cs(_receiveCritSect); | 540 CriticalSectionScoped cs(_receiveCritSect); |
532 pre_decode_image_callback_ = observer; | 541 pre_decode_image_callback_ = observer; |
533 } | 542 } |
534 | 543 |
535 } // namespace vcm | 544 } // namespace vcm |
536 } // namespace webrtc | 545 } // namespace webrtc |
OLD | NEW |