OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 module_process_thread_(module_process_thread), | 98 module_process_thread_(module_process_thread), |
99 crit_(CriticalSectionWrapper::CreateCriticalSection()), | 99 crit_(CriticalSectionWrapper::CreateCriticalSection()), |
100 send_payload_router_(new PayloadRouter()), | 100 send_payload_router_(new PayloadRouter()), |
101 vcm_protection_callback_(new ViEChannelProtectionCallback(this)), | 101 vcm_protection_callback_(new ViEChannelProtectionCallback(this)), |
102 vcm_(VideoCodingModule::Create(Clock::GetRealTimeClock(), | 102 vcm_(VideoCodingModule::Create(Clock::GetRealTimeClock(), |
103 nullptr, | 103 nullptr, |
104 nullptr)), | 104 nullptr)), |
105 vie_receiver_(channel_id, vcm_, remote_bitrate_estimator, this), | 105 vie_receiver_(channel_id, vcm_, remote_bitrate_estimator, this), |
106 vie_sync_(vcm_), | 106 vie_sync_(vcm_), |
107 stats_observer_(new ChannelStatsObserver(this)), | 107 stats_observer_(new ChannelStatsObserver(this)), |
108 vcm_receive_stats_callback_(NULL), | 108 receive_stats_callback_(NULL), |
109 incoming_video_stream_(nullptr), | 109 incoming_video_stream_(nullptr), |
110 codec_observer_(NULL), | 110 codec_observer_(NULL), |
111 intra_frame_observer_(intra_frame_observer), | 111 intra_frame_observer_(intra_frame_observer), |
112 rtt_stats_(rtt_stats), | 112 rtt_stats_(rtt_stats), |
113 paced_sender_(paced_sender), | 113 paced_sender_(paced_sender), |
114 packet_router_(packet_router), | 114 packet_router_(packet_router), |
115 bandwidth_observer_(bandwidth_observer), | 115 bandwidth_observer_(bandwidth_observer), |
116 send_time_observer_(send_time_observer), | 116 send_time_observer_(send_time_observer), |
117 decoder_reset_(true), | 117 decoder_reset_(true), |
118 nack_history_size_sender_(kSendSidePacketHistorySize), | 118 nack_history_size_sender_(kSendSidePacketHistorySize), |
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1062 } | 1062 } |
1063 | 1063 |
1064 int32_t ViEChannel::ReceivedDecodedReferenceFrame( | 1064 int32_t ViEChannel::ReceivedDecodedReferenceFrame( |
1065 const uint64_t picture_id) { | 1065 const uint64_t picture_id) { |
1066 return rtp_rtcp_modules_[0]->SendRTCPReferencePictureSelection(picture_id); | 1066 return rtp_rtcp_modules_[0]->SendRTCPReferencePictureSelection(picture_id); |
1067 } | 1067 } |
1068 | 1068 |
1069 void ViEChannel::IncomingCodecChanged(const VideoCodec& codec) { | 1069 void ViEChannel::IncomingCodecChanged(const VideoCodec& codec) { |
1070 CriticalSectionScoped cs(crit_.get()); | 1070 CriticalSectionScoped cs(crit_.get()); |
1071 receive_codec_ = codec; | 1071 receive_codec_ = codec; |
1072 if (receive_stats_callback_) | |
1073 receive_stats_callback_->OnIncomingPayloadType(codec.plType); | |
mflodman
2015/08/28 09:46:06
We should either reuse 'ViEDecoderObserver::Incomi
pbos-webrtc
2015/08/28 10:41:20
Durrr, good call. :D
| |
1072 } | 1074 } |
1073 | 1075 |
1074 void ViEChannel::OnReceiveRatesUpdated(uint32_t bit_rate, uint32_t frame_rate) { | 1076 void ViEChannel::OnReceiveRatesUpdated(uint32_t bit_rate, uint32_t frame_rate) { |
1075 CriticalSectionScoped cs(crit_.get()); | 1077 CriticalSectionScoped cs(crit_.get()); |
1076 if (codec_observer_) | 1078 if (codec_observer_) |
1077 codec_observer_->IncomingRate(channel_id_, frame_rate, bit_rate); | 1079 codec_observer_->IncomingRate(channel_id_, frame_rate, bit_rate); |
1078 } | 1080 } |
1079 | 1081 |
1080 void ViEChannel::OnDiscardedPacketsUpdated(int discarded_packets) { | 1082 void ViEChannel::OnDiscardedPacketsUpdated(int discarded_packets) { |
1081 CriticalSectionScoped cs(crit_.get()); | 1083 CriticalSectionScoped cs(crit_.get()); |
1082 if (vcm_receive_stats_callback_ != NULL) | 1084 if (receive_stats_callback_ != NULL) |
mflodman
2015/08/28 09:46:06
Can you remove != NULL to get the same style as wh
pbos-webrtc
2015/08/28 10:41:20
Done.
| |
1083 vcm_receive_stats_callback_->OnDiscardedPacketsUpdated(discarded_packets); | 1085 receive_stats_callback_->OnDiscardedPacketsUpdated(discarded_packets); |
1084 } | 1086 } |
1085 | 1087 |
1086 void ViEChannel::OnFrameCountsUpdated(const FrameCounts& frame_counts) { | 1088 void ViEChannel::OnFrameCountsUpdated(const FrameCounts& frame_counts) { |
1087 CriticalSectionScoped cs(crit_.get()); | 1089 CriticalSectionScoped cs(crit_.get()); |
1088 receive_frame_counts_ = frame_counts; | 1090 receive_frame_counts_ = frame_counts; |
1089 if (vcm_receive_stats_callback_ != NULL) | 1091 if (receive_stats_callback_ != NULL) |
1090 vcm_receive_stats_callback_->OnFrameCountsUpdated(frame_counts); | 1092 receive_stats_callback_->OnFrameCountsUpdated(frame_counts); |
1091 } | 1093 } |
1092 | 1094 |
1093 void ViEChannel::OnDecoderTiming(int decode_ms, | 1095 void ViEChannel::OnDecoderTiming(int decode_ms, |
1094 int max_decode_ms, | 1096 int max_decode_ms, |
1095 int current_delay_ms, | 1097 int current_delay_ms, |
1096 int target_delay_ms, | 1098 int target_delay_ms, |
1097 int jitter_buffer_ms, | 1099 int jitter_buffer_ms, |
1098 int min_playout_delay_ms, | 1100 int min_playout_delay_ms, |
1099 int render_delay_ms) { | 1101 int render_delay_ms) { |
1100 CriticalSectionScoped cs(crit_.get()); | 1102 CriticalSectionScoped cs(crit_.get()); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1290 } | 1292 } |
1291 | 1293 |
1292 void ViEChannel::RegisterSendFrameCountObserver( | 1294 void ViEChannel::RegisterSendFrameCountObserver( |
1293 FrameCountObserver* observer) { | 1295 FrameCountObserver* observer) { |
1294 send_frame_count_observer_.Set(observer); | 1296 send_frame_count_observer_.Set(observer); |
1295 } | 1297 } |
1296 | 1298 |
1297 void ViEChannel::RegisterReceiveStatisticsProxy( | 1299 void ViEChannel::RegisterReceiveStatisticsProxy( |
1298 ReceiveStatisticsProxy* receive_statistics_proxy) { | 1300 ReceiveStatisticsProxy* receive_statistics_proxy) { |
1299 CriticalSectionScoped cs(crit_.get()); | 1301 CriticalSectionScoped cs(crit_.get()); |
1300 vcm_receive_stats_callback_ = receive_statistics_proxy; | 1302 receive_stats_callback_ = receive_statistics_proxy; |
1301 } | 1303 } |
1302 | 1304 |
1303 void ViEChannel::SetIncomingVideoStream( | 1305 void ViEChannel::SetIncomingVideoStream( |
1304 IncomingVideoStream* incoming_video_stream) { | 1306 IncomingVideoStream* incoming_video_stream) { |
1305 CriticalSectionScoped cs(crit_.get()); | 1307 CriticalSectionScoped cs(crit_.get()); |
1306 incoming_video_stream_ = incoming_video_stream; | 1308 incoming_video_stream_ = incoming_video_stream; |
1307 } | 1309 } |
1308 } // namespace webrtc | 1310 } // namespace webrtc |
OLD | NEW |