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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 rtp_rtcp_modules_[0]->SetKeyFrameRequestMethod(kKeyFrameReqFirRtp); | 151 rtp_rtcp_modules_[0]->SetKeyFrameRequestMethod(kKeyFrameReqFirRtp); |
152 if (paced_sender_) { | 152 if (paced_sender_) { |
153 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 153 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
154 rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_); | 154 rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_); |
155 } | 155 } |
156 packet_router_->AddRtpModule(rtp_rtcp_modules_[0]); | 156 packet_router_->AddRtpModule(rtp_rtcp_modules_[0]); |
157 if (sender_) { | 157 if (sender_) { |
158 std::list<RtpRtcp*> send_rtp_modules(1, rtp_rtcp_modules_[0]); | 158 std::list<RtpRtcp*> send_rtp_modules(1, rtp_rtcp_modules_[0]); |
159 send_payload_router_->SetSendingRtpModules(send_rtp_modules); | 159 send_payload_router_->SetSendingRtpModules(send_rtp_modules); |
160 DCHECK(!send_payload_router_->active()); | 160 RTC_DCHECK(!send_payload_router_->active()); |
161 } | 161 } |
162 if (vcm_->RegisterReceiveCallback(this) != 0) { | 162 if (vcm_->RegisterReceiveCallback(this) != 0) { |
163 return -1; | 163 return -1; |
164 } | 164 } |
165 vcm_->RegisterFrameTypeCallback(this); | 165 vcm_->RegisterFrameTypeCallback(this); |
166 vcm_->RegisterReceiveStatisticsCallback(this); | 166 vcm_->RegisterReceiveStatisticsCallback(this); |
167 vcm_->RegisterDecoderTimingCallback(this); | 167 vcm_->RegisterDecoderTimingCallback(this); |
168 vcm_->SetRenderDelay(kViEDefaultRenderDelayMs); | 168 vcm_->SetRenderDelay(kViEDefaultRenderDelayMs); |
169 | 169 |
170 module_process_thread_->RegisterModule(vcm_); | 170 module_process_thread_->RegisterModule(vcm_); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FecBitrateReceivedInKbps", | 324 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FecBitrateReceivedInKbps", |
325 static_cast<int>(rtp_rtx.fec.TotalBytes() * | 325 static_cast<int>(rtp_rtx.fec.TotalBytes() * |
326 8 / elapsed_sec / 1000)); | 326 8 / elapsed_sec / 1000)); |
327 } | 327 } |
328 } | 328 } |
329 } | 329 } |
330 } | 330 } |
331 | 331 |
332 int32_t ViEChannel::SetSendCodec(const VideoCodec& video_codec, | 332 int32_t ViEChannel::SetSendCodec(const VideoCodec& video_codec, |
333 bool new_stream) { | 333 bool new_stream) { |
334 DCHECK(sender_); | 334 RTC_DCHECK(sender_); |
335 if (video_codec.codecType == kVideoCodecRED || | 335 if (video_codec.codecType == kVideoCodecRED || |
336 video_codec.codecType == kVideoCodecULPFEC) { | 336 video_codec.codecType == kVideoCodecULPFEC) { |
337 LOG_F(LS_ERROR) << "Not a valid send codec " << video_codec.codecType; | 337 LOG_F(LS_ERROR) << "Not a valid send codec " << video_codec.codecType; |
338 return -1; | 338 return -1; |
339 } | 339 } |
340 if (kMaxSimulcastStreams < video_codec.numberOfSimulcastStreams) { | 340 if (kMaxSimulcastStreams < video_codec.numberOfSimulcastStreams) { |
341 LOG_F(LS_ERROR) << "Incorrect config " | 341 LOG_F(LS_ERROR) << "Incorrect config " |
342 << video_codec.numberOfSimulcastStreams; | 342 << video_codec.numberOfSimulcastStreams; |
343 return -1; | 343 return -1; |
344 } | 344 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 } | 408 } |
409 // Register new active modules. | 409 // Register new active modules. |
410 for (size_t i = num_prev_active_modules; i < num_active_modules; ++i) { | 410 for (size_t i = num_prev_active_modules; i < num_active_modules; ++i) { |
411 module_process_thread_->RegisterModule(rtp_rtcp_modules_[i]); | 411 module_process_thread_->RegisterModule(rtp_rtcp_modules_[i]); |
412 packet_router_->AddRtpModule(rtp_rtcp_modules_[i]); | 412 packet_router_->AddRtpModule(rtp_rtcp_modules_[i]); |
413 } | 413 } |
414 return 0; | 414 return 0; |
415 } | 415 } |
416 | 416 |
417 int32_t ViEChannel::SetReceiveCodec(const VideoCodec& video_codec) { | 417 int32_t ViEChannel::SetReceiveCodec(const VideoCodec& video_codec) { |
418 DCHECK(!sender_); | 418 RTC_DCHECK(!sender_); |
419 if (!vie_receiver_.SetReceiveCodec(video_codec)) { | 419 if (!vie_receiver_.SetReceiveCodec(video_codec)) { |
420 return -1; | 420 return -1; |
421 } | 421 } |
422 | 422 |
423 if (video_codec.codecType != kVideoCodecRED && | 423 if (video_codec.codecType != kVideoCodecRED && |
424 video_codec.codecType != kVideoCodecULPFEC) { | 424 video_codec.codecType != kVideoCodecULPFEC) { |
425 // Register codec type with VCM, but do not register RED or ULPFEC. | 425 // Register codec type with VCM, but do not register RED or ULPFEC. |
426 if (vcm_->RegisterReceiveCodec(&video_codec, number_of_cores_, false) != | 426 if (vcm_->RegisterReceiveCodec(&video_codec, number_of_cores_, false) != |
427 VCM_OK) { | 427 VCM_OK) { |
428 return -1; | 428 return -1; |
429 } | 429 } |
430 } | 430 } |
431 return 0; | 431 return 0; |
432 } | 432 } |
433 | 433 |
434 | 434 |
435 int32_t ViEChannel::RegisterExternalDecoder(const uint8_t pl_type, | 435 int32_t ViEChannel::RegisterExternalDecoder(const uint8_t pl_type, |
436 VideoDecoder* decoder, | 436 VideoDecoder* decoder, |
437 bool buffered_rendering, | 437 bool buffered_rendering, |
438 int32_t render_delay) { | 438 int32_t render_delay) { |
439 DCHECK(!sender_); | 439 RTC_DCHECK(!sender_); |
440 int32_t result; | 440 int32_t result; |
441 result = vcm_->RegisterExternalDecoder(decoder, pl_type, buffered_rendering); | 441 result = vcm_->RegisterExternalDecoder(decoder, pl_type, buffered_rendering); |
442 if (result != VCM_OK) { | 442 if (result != VCM_OK) { |
443 return result; | 443 return result; |
444 } | 444 } |
445 return vcm_->SetRenderDelay(render_delay); | 445 return vcm_->SetRenderDelay(render_delay); |
446 } | 446 } |
447 | 447 |
448 int32_t ViEChannel::DeRegisterExternalDecoder(const uint8_t pl_type) { | 448 int32_t ViEChannel::DeRegisterExternalDecoder(const uint8_t pl_type) { |
449 DCHECK(!sender_); | 449 RTC_DCHECK(!sender_); |
450 VideoCodec current_receive_codec; | 450 VideoCodec current_receive_codec; |
451 int32_t result = 0; | 451 int32_t result = 0; |
452 result = vcm_->ReceiveCodec(¤t_receive_codec); | 452 result = vcm_->ReceiveCodec(¤t_receive_codec); |
453 if (vcm_->RegisterExternalDecoder(NULL, pl_type, false) != VCM_OK) { | 453 if (vcm_->RegisterExternalDecoder(NULL, pl_type, false) != VCM_OK) { |
454 return -1; | 454 return -1; |
455 } | 455 } |
456 | 456 |
457 if (result == 0 && current_receive_codec.plType == pl_type) { | 457 if (result == 0 && current_receive_codec.plType == pl_type) { |
458 result = vcm_->RegisterReceiveCodec(¤t_receive_codec, | 458 result = vcm_->RegisterReceiveCodec(¤t_receive_codec, |
459 number_of_cores_, false); | 459 number_of_cores_, false); |
(...skipping 21 matching lines...) Expand all Loading... |
481 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 481 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
482 rtp_rtcp->SetRTCPStatus(rtcp_mode); | 482 rtp_rtcp->SetRTCPStatus(rtcp_mode); |
483 } | 483 } |
484 | 484 |
485 void ViEChannel::SetProtectionMode(bool enable_nack, | 485 void ViEChannel::SetProtectionMode(bool enable_nack, |
486 bool enable_fec, | 486 bool enable_fec, |
487 int payload_type_red, | 487 int payload_type_red, |
488 int payload_type_fec) { | 488 int payload_type_fec) { |
489 // Validate payload types. | 489 // Validate payload types. |
490 if (enable_fec) { | 490 if (enable_fec) { |
491 DCHECK_GE(payload_type_red, 0); | 491 RTC_DCHECK_GE(payload_type_red, 0); |
492 DCHECK_GE(payload_type_fec, 0); | 492 RTC_DCHECK_GE(payload_type_fec, 0); |
493 DCHECK_LE(payload_type_red, 127); | 493 RTC_DCHECK_LE(payload_type_red, 127); |
494 DCHECK_LE(payload_type_fec, 127); | 494 RTC_DCHECK_LE(payload_type_fec, 127); |
495 } else { | 495 } else { |
496 DCHECK_EQ(payload_type_red, -1); | 496 RTC_DCHECK_EQ(payload_type_red, -1); |
497 DCHECK_EQ(payload_type_fec, -1); | 497 RTC_DCHECK_EQ(payload_type_fec, -1); |
498 // Set to valid uint8_ts to be castable later without signed overflows. | 498 // Set to valid uint8_ts to be castable later without signed overflows. |
499 payload_type_red = 0; | 499 payload_type_red = 0; |
500 payload_type_fec = 0; | 500 payload_type_fec = 0; |
501 } | 501 } |
502 | 502 |
503 VCMVideoProtection protection_method; | 503 VCMVideoProtection protection_method; |
504 if (enable_nack) { | 504 if (enable_nack) { |
505 protection_method = enable_fec ? kProtectionNackFEC : kProtectionNack; | 505 protection_method = enable_fec ? kProtectionNackFEC : kProtectionNack; |
506 } else { | 506 } else { |
507 protection_method = kProtectionNone; | 507 protection_method = kProtectionNone; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 | 700 |
701 int ViEChannel::SetReceiveTransportSequenceNumber(bool enable, int id) { | 701 int ViEChannel::SetReceiveTransportSequenceNumber(bool enable, int id) { |
702 return vie_receiver_.SetReceiveTransportSequenceNumber(enable, id) ? 0 : -1; | 702 return vie_receiver_.SetReceiveTransportSequenceNumber(enable, id) ? 0 : -1; |
703 } | 703 } |
704 | 704 |
705 void ViEChannel::SetRtcpXrRrtrStatus(bool enable) { | 705 void ViEChannel::SetRtcpXrRrtrStatus(bool enable) { |
706 rtp_rtcp_modules_[0]->SetRtcpXrRrtrStatus(enable); | 706 rtp_rtcp_modules_[0]->SetRtcpXrRrtrStatus(enable); |
707 } | 707 } |
708 | 708 |
709 void ViEChannel::SetTransmissionSmoothingStatus(bool enable) { | 709 void ViEChannel::SetTransmissionSmoothingStatus(bool enable) { |
710 DCHECK(paced_sender_ && "No paced sender registered."); | 710 RTC_DCHECK(paced_sender_ && "No paced sender registered."); |
711 paced_sender_->SetStatus(enable); | 711 paced_sender_->SetStatus(enable); |
712 } | 712 } |
713 | 713 |
714 void ViEChannel::EnableTMMBR(bool enable) { | 714 void ViEChannel::EnableTMMBR(bool enable) { |
715 rtp_rtcp_modules_[0]->SetTMMBRStatus(enable); | 715 rtp_rtcp_modules_[0]->SetTMMBRStatus(enable); |
716 } | 716 } |
717 | 717 |
718 int32_t ViEChannel::SetSSRC(const uint32_t SSRC, | 718 int32_t ViEChannel::SetSSRC(const uint32_t SSRC, |
719 const StreamType usage, | 719 const StreamType usage, |
720 const uint8_t simulcast_idx) { | 720 const uint8_t simulcast_idx) { |
721 RtpRtcp* rtp_rtcp = rtp_rtcp_modules_[simulcast_idx]; | 721 RtpRtcp* rtp_rtcp = rtp_rtcp_modules_[simulcast_idx]; |
722 if (usage == kViEStreamTypeRtx) { | 722 if (usage == kViEStreamTypeRtx) { |
723 rtp_rtcp->SetRtxSsrc(SSRC); | 723 rtp_rtcp->SetRtxSsrc(SSRC); |
724 } else { | 724 } else { |
725 rtp_rtcp->SetSSRC(SSRC); | 725 rtp_rtcp->SetSSRC(SSRC); |
726 } | 726 } |
727 return 0; | 727 return 0; |
728 } | 728 } |
729 | 729 |
730 int32_t ViEChannel::SetRemoteSSRCType(const StreamType usage, | 730 int32_t ViEChannel::SetRemoteSSRCType(const StreamType usage, |
731 const uint32_t SSRC) { | 731 const uint32_t SSRC) { |
732 vie_receiver_.SetRtxSsrc(SSRC); | 732 vie_receiver_.SetRtxSsrc(SSRC); |
733 return 0; | 733 return 0; |
734 } | 734 } |
735 | 735 |
736 int32_t ViEChannel::GetLocalSSRC(uint8_t idx, unsigned int* ssrc) { | 736 int32_t ViEChannel::GetLocalSSRC(uint8_t idx, unsigned int* ssrc) { |
737 DCHECK_LE(idx, rtp_rtcp_modules_.size()); | 737 RTC_DCHECK_LE(idx, rtp_rtcp_modules_.size()); |
738 *ssrc = rtp_rtcp_modules_[idx]->SSRC(); | 738 *ssrc = rtp_rtcp_modules_[idx]->SSRC(); |
739 return 0; | 739 return 0; |
740 } | 740 } |
741 | 741 |
742 int32_t ViEChannel::GetRemoteSSRC(uint32_t* ssrc) { | 742 int32_t ViEChannel::GetRemoteSSRC(uint32_t* ssrc) { |
743 *ssrc = vie_receiver_.GetRemoteSsrc(); | 743 *ssrc = vie_receiver_.GetRemoteSsrc(); |
744 return 0; | 744 return 0; |
745 } | 745 } |
746 | 746 |
747 int ViEChannel::SetRtxSendPayloadType(int payload_type, | 747 int ViEChannel::SetRtxSendPayloadType(int payload_type, |
(...skipping 10 matching lines...) Expand all Loading... |
758 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 758 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
759 rtp_rtcp->SetRtxSendStatus(rtx_settings); | 759 rtp_rtcp->SetRtxSendStatus(rtx_settings); |
760 } | 760 } |
761 | 761 |
762 void ViEChannel::SetRtxReceivePayloadType(int payload_type, | 762 void ViEChannel::SetRtxReceivePayloadType(int payload_type, |
763 int associated_payload_type) { | 763 int associated_payload_type) { |
764 vie_receiver_.SetRtxPayloadType(payload_type, associated_payload_type); | 764 vie_receiver_.SetRtxPayloadType(payload_type, associated_payload_type); |
765 } | 765 } |
766 | 766 |
767 void ViEChannel::SetRtpStateForSsrc(uint32_t ssrc, const RtpState& rtp_state) { | 767 void ViEChannel::SetRtpStateForSsrc(uint32_t ssrc, const RtpState& rtp_state) { |
768 DCHECK(!rtp_rtcp_modules_[0]->Sending()); | 768 RTC_DCHECK(!rtp_rtcp_modules_[0]->Sending()); |
769 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 769 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
770 if (rtp_rtcp->SetRtpStateForSsrc(ssrc, rtp_state)) | 770 if (rtp_rtcp->SetRtpStateForSsrc(ssrc, rtp_state)) |
771 return; | 771 return; |
772 } | 772 } |
773 } | 773 } |
774 | 774 |
775 RtpState ViEChannel::GetRtpStateForSsrc(uint32_t ssrc) { | 775 RtpState ViEChannel::GetRtpStateForSsrc(uint32_t ssrc) { |
776 DCHECK(!rtp_rtcp_modules_[0]->Sending()); | 776 RTC_DCHECK(!rtp_rtcp_modules_[0]->Sending()); |
777 RtpState rtp_state; | 777 RtpState rtp_state; |
778 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 778 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
779 if (rtp_rtcp->GetRtpStateForSsrc(ssrc, &rtp_state)) | 779 if (rtp_rtcp->GetRtpStateForSsrc(ssrc, &rtp_state)) |
780 return rtp_state; | 780 return rtp_state; |
781 } | 781 } |
782 LOG(LS_ERROR) << "Couldn't get RTP state for ssrc: " << ssrc; | 782 LOG(LS_ERROR) << "Couldn't get RTP state for ssrc: " << ssrc; |
783 return rtp_state; | 783 return rtp_state; |
784 } | 784 } |
785 | 785 |
786 // TODO(pbos): Set CNAME on all modules. | 786 // TODO(pbos): Set CNAME on all modules. |
787 int32_t ViEChannel::SetRTCPCName(const char* rtcp_cname) { | 787 int32_t ViEChannel::SetRTCPCName(const char* rtcp_cname) { |
788 DCHECK(!rtp_rtcp_modules_[0]->Sending()); | 788 RTC_DCHECK(!rtp_rtcp_modules_[0]->Sending()); |
789 return rtp_rtcp_modules_[0]->SetCNAME(rtcp_cname); | 789 return rtp_rtcp_modules_[0]->SetCNAME(rtcp_cname); |
790 } | 790 } |
791 | 791 |
792 int32_t ViEChannel::GetRemoteRTCPCName(char rtcp_cname[]) { | 792 int32_t ViEChannel::GetRemoteRTCPCName(char rtcp_cname[]) { |
793 uint32_t remoteSSRC = vie_receiver_.GetRemoteSsrc(); | 793 uint32_t remoteSSRC = vie_receiver_.GetRemoteSsrc(); |
794 return rtp_rtcp_modules_[0]->RemoteCNAME(remoteSSRC, rtcp_cname); | 794 return rtp_rtcp_modules_[0]->RemoteCNAME(remoteSSRC, rtcp_cname); |
795 } | 795 } |
796 | 796 |
797 int32_t ViEChannel::GetSendRtcpStatistics(uint16_t* fraction_lost, | 797 int32_t ViEChannel::GetSendRtcpStatistics(uint16_t* fraction_lost, |
798 uint32_t* cumulative_lost, | 798 uint32_t* cumulative_lost, |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 TransportFeedbackObserver* transport_feedback_callback, | 1143 TransportFeedbackObserver* transport_feedback_callback, |
1144 RtcpRttStats* rtt_stats, | 1144 RtcpRttStats* rtt_stats, |
1145 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, | 1145 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, |
1146 RemoteBitrateEstimator* remote_bitrate_estimator, | 1146 RemoteBitrateEstimator* remote_bitrate_estimator, |
1147 PacedSender* paced_sender, | 1147 PacedSender* paced_sender, |
1148 PacketRouter* packet_router, | 1148 PacketRouter* packet_router, |
1149 BitrateStatisticsObserver* send_bitrate_observer, | 1149 BitrateStatisticsObserver* send_bitrate_observer, |
1150 FrameCountObserver* send_frame_count_observer, | 1150 FrameCountObserver* send_frame_count_observer, |
1151 SendSideDelayObserver* send_side_delay_observer, | 1151 SendSideDelayObserver* send_side_delay_observer, |
1152 size_t num_modules) { | 1152 size_t num_modules) { |
1153 DCHECK_GT(num_modules, 0u); | 1153 RTC_DCHECK_GT(num_modules, 0u); |
1154 RtpRtcp::Configuration configuration; | 1154 RtpRtcp::Configuration configuration; |
1155 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; | 1155 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; |
1156 configuration.id = id; | 1156 configuration.id = id; |
1157 configuration.audio = false; | 1157 configuration.audio = false; |
1158 configuration.receiver_only = receiver_only; | 1158 configuration.receiver_only = receiver_only; |
1159 configuration.receive_statistics = receive_statistics; | 1159 configuration.receive_statistics = receive_statistics; |
1160 configuration.outgoing_transport = outgoing_transport; | 1160 configuration.outgoing_transport = outgoing_transport; |
1161 configuration.intra_frame_callback = intra_frame_callback; | 1161 configuration.intra_frame_callback = intra_frame_callback; |
1162 configuration.rtt_stats = rtt_stats; | 1162 configuration.rtt_stats = rtt_stats; |
1163 configuration.rtcp_packet_type_counter_observer = | 1163 configuration.rtcp_packet_type_counter_observer = |
(...skipping 15 matching lines...) Expand all Loading... |
1179 modules.push_back(rtp_rtcp); | 1179 modules.push_back(rtp_rtcp); |
1180 // Receive statistics and remote bitrate estimator should only be set for | 1180 // Receive statistics and remote bitrate estimator should only be set for |
1181 // the primary (first) module. | 1181 // the primary (first) module. |
1182 configuration.receive_statistics = null_receive_statistics; | 1182 configuration.receive_statistics = null_receive_statistics; |
1183 configuration.remote_bitrate_estimator = nullptr; | 1183 configuration.remote_bitrate_estimator = nullptr; |
1184 } | 1184 } |
1185 return modules; | 1185 return modules; |
1186 } | 1186 } |
1187 | 1187 |
1188 void ViEChannel::StartDecodeThread() { | 1188 void ViEChannel::StartDecodeThread() { |
1189 DCHECK(!sender_); | 1189 RTC_DCHECK(!sender_); |
1190 // Start the decode thread | 1190 // Start the decode thread |
1191 if (decode_thread_) | 1191 if (decode_thread_) |
1192 return; | 1192 return; |
1193 decode_thread_ = ThreadWrapper::CreateThread(ChannelDecodeThreadFunction, | 1193 decode_thread_ = ThreadWrapper::CreateThread(ChannelDecodeThreadFunction, |
1194 this, "DecodingThread"); | 1194 this, "DecodingThread"); |
1195 decode_thread_->Start(); | 1195 decode_thread_->Start(); |
1196 decode_thread_->SetPriority(kHighestPriority); | 1196 decode_thread_->SetPriority(kHighestPriority); |
1197 } | 1197 } |
1198 | 1198 |
1199 void ViEChannel::StopDecodeThread() { | 1199 void ViEChannel::StopDecodeThread() { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 const uint8_t channels, | 1238 const uint8_t channels, |
1239 const uint32_t rate) { | 1239 const uint32_t rate) { |
1240 LOG(LS_INFO) << "OnInitializeDecoder " << static_cast<int>(payload_type) | 1240 LOG(LS_INFO) << "OnInitializeDecoder " << static_cast<int>(payload_type) |
1241 << " " << payload_name; | 1241 << " " << payload_name; |
1242 vcm_->ResetDecoder(); | 1242 vcm_->ResetDecoder(); |
1243 | 1243 |
1244 return 0; | 1244 return 0; |
1245 } | 1245 } |
1246 | 1246 |
1247 void ViEChannel::OnIncomingSSRCChanged(const int32_t id, const uint32_t ssrc) { | 1247 void ViEChannel::OnIncomingSSRCChanged(const int32_t id, const uint32_t ssrc) { |
1248 DCHECK_EQ(channel_id_, ChannelId(id)); | 1248 RTC_DCHECK_EQ(channel_id_, ChannelId(id)); |
1249 rtp_rtcp_modules_[0]->SetRemoteSSRC(ssrc); | 1249 rtp_rtcp_modules_[0]->SetRemoteSSRC(ssrc); |
1250 } | 1250 } |
1251 | 1251 |
1252 void ViEChannel::OnIncomingCSRCChanged(const int32_t id, | 1252 void ViEChannel::OnIncomingCSRCChanged(const int32_t id, |
1253 const uint32_t CSRC, | 1253 const uint32_t CSRC, |
1254 const bool added) { | 1254 const bool added) { |
1255 DCHECK_EQ(channel_id_, ChannelId(id)); | 1255 RTC_DCHECK_EQ(channel_id_, ChannelId(id)); |
1256 CriticalSectionScoped cs(crit_.get()); | 1256 CriticalSectionScoped cs(crit_.get()); |
1257 } | 1257 } |
1258 | 1258 |
1259 void ViEChannel::RegisterSendFrameCountObserver( | 1259 void ViEChannel::RegisterSendFrameCountObserver( |
1260 FrameCountObserver* observer) { | 1260 FrameCountObserver* observer) { |
1261 send_frame_count_observer_.Set(observer); | 1261 send_frame_count_observer_.Set(observer); |
1262 } | 1262 } |
1263 | 1263 |
1264 void ViEChannel::RegisterReceiveStatisticsProxy( | 1264 void ViEChannel::RegisterReceiveStatisticsProxy( |
1265 ReceiveStatisticsProxy* receive_statistics_proxy) { | 1265 ReceiveStatisticsProxy* receive_statistics_proxy) { |
1266 CriticalSectionScoped cs(crit_.get()); | 1266 CriticalSectionScoped cs(crit_.get()); |
1267 receive_stats_callback_ = receive_statistics_proxy; | 1267 receive_stats_callback_ = receive_statistics_proxy; |
1268 } | 1268 } |
1269 | 1269 |
1270 void ViEChannel::SetIncomingVideoStream( | 1270 void ViEChannel::SetIncomingVideoStream( |
1271 IncomingVideoStream* incoming_video_stream) { | 1271 IncomingVideoStream* incoming_video_stream) { |
1272 CriticalSectionScoped cs(crit_.get()); | 1272 CriticalSectionScoped cs(crit_.get()); |
1273 incoming_video_stream_ = incoming_video_stream; | 1273 incoming_video_stream_ = incoming_video_stream; |
1274 } | 1274 } |
1275 } // namespace webrtc | 1275 } // namespace webrtc |
OLD | NEW |