Chromium Code Reviews| 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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 907 } | 907 } |
| 908 | 908 |
| 909 void ViEChannel::StartReceive() { | 909 void ViEChannel::StartReceive() { |
| 910 if (!sender_) | 910 if (!sender_) |
| 911 StartDecodeThread(); | 911 StartDecodeThread(); |
| 912 vie_receiver_.StartReceive(); | 912 vie_receiver_.StartReceive(); |
| 913 } | 913 } |
| 914 | 914 |
| 915 void ViEChannel::StopReceive() { | 915 void ViEChannel::StopReceive() { |
| 916 vie_receiver_.StopReceive(); | 916 vie_receiver_.StopReceive(); |
| 917 if (!sender_) { | 917 if (!sender_) |
| 918 StopDecodeThread(); | 918 StopDecodeThread(); |
| 919 vcm_->ResetDecoder(); | |
|
stefan-webrtc
2016/02/01 16:23:08
Is this safe to remove? I assume it is, but it wou
pbos-webrtc
2016/02/02 13:25:12
Yeah, I don't think there's any point in killing t
| |
| 920 } | |
| 921 } | 919 } |
| 922 | 920 |
| 923 int32_t ViEChannel::ReceivedRTPPacket(const void* rtp_packet, | 921 int32_t ViEChannel::ReceivedRTPPacket(const void* rtp_packet, |
| 924 size_t rtp_packet_length, | 922 size_t rtp_packet_length, |
| 925 const PacketTime& packet_time) { | 923 const PacketTime& packet_time) { |
| 926 return vie_receiver_.ReceivedRTPPacket( | 924 return vie_receiver_.ReceivedRTPPacket( |
| 927 rtp_packet, rtp_packet_length, packet_time); | 925 rtp_packet, rtp_packet_length, packet_time); |
| 928 } | 926 } |
| 929 | 927 |
| 930 int32_t ViEChannel::ReceivedRTCPPacket(const void* rtcp_packet, | 928 int32_t ViEChannel::ReceivedRTCPPacket(const void* rtcp_packet, |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1159 I420FrameCallback* pre_render_callback) { | 1157 I420FrameCallback* pre_render_callback) { |
| 1160 rtc::CritScope lock(&crit_); | 1158 rtc::CritScope lock(&crit_); |
| 1161 pre_render_callback_ = pre_render_callback; | 1159 pre_render_callback_ = pre_render_callback; |
| 1162 } | 1160 } |
| 1163 | 1161 |
| 1164 void ViEChannel::RegisterPreDecodeImageCallback( | 1162 void ViEChannel::RegisterPreDecodeImageCallback( |
| 1165 EncodedImageCallback* pre_decode_callback) { | 1163 EncodedImageCallback* pre_decode_callback) { |
| 1166 vcm_->RegisterPreDecodeImageCallback(pre_decode_callback); | 1164 vcm_->RegisterPreDecodeImageCallback(pre_decode_callback); |
| 1167 } | 1165 } |
| 1168 | 1166 |
| 1169 // TODO(pbos): Remove OnInitializeDecoder which is called from the RTP module, | 1167 // TODO(pbos): Consider updating callback to contain video resolution so we can |
| 1170 // any decoder resetting should be handled internally within the VCM. | 1168 // initialize the decoder earlier here. |
| 1171 int32_t ViEChannel::OnInitializeDecoder( | 1169 int32_t ViEChannel::OnInitializeDecoder( |
| 1172 const int8_t payload_type, | 1170 const int8_t payload_type, |
| 1173 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 1171 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
| 1174 const int frequency, | 1172 const int frequency, |
| 1175 const size_t channels, | 1173 const size_t channels, |
| 1176 const uint32_t rate) { | 1174 const uint32_t rate) { |
| 1177 LOG(LS_INFO) << "OnInitializeDecoder " << static_cast<int>(payload_type) | 1175 LOG(LS_INFO) << "OnInitializeDecoder " << static_cast<int>(payload_type) |
| 1178 << " " << payload_name; | 1176 << " " << payload_name; |
| 1179 vcm_->ResetDecoder(); | |
| 1180 | |
| 1181 return 0; | 1177 return 0; |
|
stefan-webrtc
2016/02/01 16:23:08
This change doesn't seem trivial to me. Should we
pbos-webrtc
2016/02/02 13:25:12
Decode in VideoReceiver calls VCMCodecDataBase::Ge
| |
| 1182 } | 1178 } |
| 1183 | 1179 |
| 1184 void ViEChannel::OnIncomingSSRCChanged(const uint32_t ssrc) { | 1180 void ViEChannel::OnIncomingSSRCChanged(const uint32_t ssrc) { |
| 1185 rtp_rtcp_modules_[0]->SetRemoteSSRC(ssrc); | 1181 rtp_rtcp_modules_[0]->SetRemoteSSRC(ssrc); |
| 1186 } | 1182 } |
| 1187 | 1183 |
| 1188 void ViEChannel::OnIncomingCSRCChanged(const uint32_t CSRC, const bool added) {} | 1184 void ViEChannel::OnIncomingCSRCChanged(const uint32_t CSRC, const bool added) {} |
| 1189 | 1185 |
| 1190 void ViEChannel::RegisterSendFrameCountObserver( | 1186 void ViEChannel::RegisterSendFrameCountObserver( |
| 1191 FrameCountObserver* observer) { | 1187 FrameCountObserver* observer) { |
| 1192 send_frame_count_observer_.Set(observer); | 1188 send_frame_count_observer_.Set(observer); |
| 1193 } | 1189 } |
| 1194 | 1190 |
| 1195 void ViEChannel::RegisterReceiveStatisticsProxy( | 1191 void ViEChannel::RegisterReceiveStatisticsProxy( |
| 1196 ReceiveStatisticsProxy* receive_statistics_proxy) { | 1192 ReceiveStatisticsProxy* receive_statistics_proxy) { |
| 1197 rtc::CritScope lock(&crit_); | 1193 rtc::CritScope lock(&crit_); |
| 1198 receive_stats_callback_ = receive_statistics_proxy; | 1194 receive_stats_callback_ = receive_statistics_proxy; |
| 1199 } | 1195 } |
| 1200 | 1196 |
| 1201 void ViEChannel::SetIncomingVideoStream( | 1197 void ViEChannel::SetIncomingVideoStream( |
| 1202 IncomingVideoStream* incoming_video_stream) { | 1198 IncomingVideoStream* incoming_video_stream) { |
| 1203 rtc::CritScope lock(&crit_); | 1199 rtc::CritScope lock(&crit_); |
| 1204 incoming_video_stream_ = incoming_video_stream; | 1200 incoming_video_stream_ = incoming_video_stream; |
| 1205 } | 1201 } |
| 1206 } // namespace webrtc | 1202 } // namespace webrtc |
| OLD | NEW |