Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: webrtc/video/vie_channel.cc

Issue 1671893002: Remove ViEChannel calls for VideoReceiveStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove extra include + forward declare ProcessThread Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video/vie_channel.h ('k') | webrtc/video/vie_receiver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 PacedSender* paced_sender, 90 PacedSender* paced_sender,
91 PacketRouter* packet_router, 91 PacketRouter* packet_router,
92 size_t max_rtp_streams, 92 size_t max_rtp_streams,
93 bool sender) 93 bool sender)
94 : number_of_cores_(number_of_cores), 94 : number_of_cores_(number_of_cores),
95 sender_(sender), 95 sender_(sender),
96 module_process_thread_(module_process_thread), 96 module_process_thread_(module_process_thread),
97 send_payload_router_(send_payload_router), 97 send_payload_router_(send_payload_router),
98 vcm_protection_callback_(new ViEChannelProtectionCallback(this)), 98 vcm_protection_callback_(new ViEChannelProtectionCallback(this)),
99 vcm_(vcm), 99 vcm_(vcm),
100 vie_receiver_(vcm_, remote_bitrate_estimator, this), 100 vie_receiver_(vcm_, remote_bitrate_estimator, this),
stefan-webrtc 2016/02/05 14:35:57 I wonder if it would make sense to instantiate the
pbos-webrtc 2016/02/05 15:15:51 I think that makes sense in a follow-up, right now
101 vie_sync_(vcm_), 101 vie_sync_(vcm_),
102 stats_observer_(new ChannelStatsObserver(this)), 102 stats_observer_(new ChannelStatsObserver(this)),
103 receive_stats_callback_(nullptr), 103 receive_stats_callback_(nullptr),
104 incoming_video_stream_(nullptr), 104 incoming_video_stream_(nullptr),
105 intra_frame_observer_(intra_frame_observer), 105 intra_frame_observer_(intra_frame_observer),
106 rtt_stats_(rtt_stats), 106 rtt_stats_(rtt_stats),
107 paced_sender_(paced_sender), 107 paced_sender_(paced_sender),
108 packet_router_(packet_router), 108 packet_router_(packet_router),
109 bandwidth_observer_(bandwidth_observer), 109 bandwidth_observer_(bandwidth_observer),
110 transport_feedback_observer_(transport_feedback_observer), 110 transport_feedback_observer_(transport_feedback_observer),
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // Register new active modules. 410 // Register new active modules.
411 for (size_t i = num_prev_active_modules; i < num_active_modules; ++i) { 411 for (size_t i = num_prev_active_modules; i < num_active_modules; ++i) {
412 module_process_thread_->RegisterModule(rtp_rtcp_modules_[i]); 412 module_process_thread_->RegisterModule(rtp_rtcp_modules_[i]);
413 packet_router_->AddRtpModule(rtp_rtcp_modules_[i], sender_); 413 packet_router_->AddRtpModule(rtp_rtcp_modules_[i], sender_);
414 } 414 }
415 return 0; 415 return 0;
416 } 416 }
417 417
418 int32_t ViEChannel::SetReceiveCodec(const VideoCodec& video_codec) { 418 int32_t ViEChannel::SetReceiveCodec(const VideoCodec& video_codec) {
419 RTC_DCHECK(!sender_); 419 RTC_DCHECK(!sender_);
420 if (!vie_receiver_.SetReceiveCodec(video_codec)) { 420 if (!vie_receiver_.SetReceiveCodec(video_codec)) {
stefan-webrtc 2016/02/05 14:35:56 Should be able to move this out too
pbos-webrtc 2016/02/05 15:15:51 Done.
421 return -1; 421 return -1;
422 } 422 }
423 423
424 if (video_codec.codecType != kVideoCodecRED && 424 if (video_codec.codecType != kVideoCodecRED &&
425 video_codec.codecType != kVideoCodecULPFEC) { 425 video_codec.codecType != kVideoCodecULPFEC) {
426 // Register codec type with VCM, but do not register RED or ULPFEC. 426 // Register codec type with VCM, but do not register RED or ULPFEC.
427 if (vcm_->RegisterReceiveCodec(&video_codec, number_of_cores_, false) != 427 if (vcm_->RegisterReceiveCodec(&video_codec, number_of_cores_, false) !=
428 VCM_OK) { 428 VCM_OK) {
429 return -1; 429 return -1;
430 } 430 }
431 } 431 }
432 return 0; 432 return 0;
433 } 433 }
434 434
435 void ViEChannel::RegisterExternalDecoder(const uint8_t pl_type,
436 VideoDecoder* decoder) {
437 RTC_DCHECK(!sender_);
438 vcm_->RegisterExternalDecoder(decoder, pl_type);
439 }
440
441 int32_t ViEChannel::ReceiveCodecStatistics(uint32_t* num_key_frames,
442 uint32_t* num_delta_frames) {
443 rtc::CritScope lock(&crit_);
444 *num_key_frames = receive_frame_counts_.key_frames;
445 *num_delta_frames = receive_frame_counts_.delta_frames;
446 return 0;
447 }
448
449 void ViEChannel::SetExpectedRenderDelay(int delay_ms) {
450 RTC_DCHECK(!sender_);
451 vcm_->SetRenderDelay(delay_ms);
452 }
453
454 void ViEChannel::SetRTCPMode(const RtcpMode rtcp_mode) { 435 void ViEChannel::SetRTCPMode(const RtcpMode rtcp_mode) {
436 RTC_DCHECK(sender_);
455 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 437 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
456 rtp_rtcp->SetRTCPStatus(rtcp_mode); 438 rtp_rtcp->SetRTCPStatus(rtcp_mode);
457 } 439 }
458 440
459 void ViEChannel::SetProtectionMode(bool enable_nack, 441 void ViEChannel::SetProtectionMode(bool enable_nack,
460 bool enable_fec, 442 bool enable_fec,
461 int payload_type_red, 443 int payload_type_red,
462 int payload_type_fec) { 444 int payload_type_fec) {
463 // Validate payload types. 445 // Validate payload types.
464 if (enable_fec) { 446 if (enable_fec) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 return 0; 555 return 0;
574 // Enable the extension. 556 // Enable the extension.
575 int error = 0; 557 int error = 0;
576 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 558 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
577 error |= rtp_rtcp->RegisterSendRtpHeaderExtension( 559 error |= rtp_rtcp->RegisterSendRtpHeaderExtension(
578 kRtpExtensionTransmissionTimeOffset, id); 560 kRtpExtensionTransmissionTimeOffset, id);
579 } 561 }
580 return error; 562 return error;
581 } 563 }
582 564
583 int ViEChannel::SetReceiveTimestampOffsetStatus(bool enable, int id) {
584 return vie_receiver_.SetReceiveTimestampOffsetStatus(enable, id) ? 0 : -1;
585 }
586
587 int ViEChannel::SetSendAbsoluteSendTimeStatus(bool enable, int id) { 565 int ViEChannel::SetSendAbsoluteSendTimeStatus(bool enable, int id) {
588 // Disable any previous registrations of this extension to avoid errors. 566 // Disable any previous registrations of this extension to avoid errors.
589 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 567 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
590 rtp_rtcp->DeregisterSendRtpHeaderExtension(kRtpExtensionAbsoluteSendTime); 568 rtp_rtcp->DeregisterSendRtpHeaderExtension(kRtpExtensionAbsoluteSendTime);
591 if (!enable) 569 if (!enable)
592 return 0; 570 return 0;
593 // Enable the extension. 571 // Enable the extension.
594 int error = 0; 572 int error = 0;
595 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 573 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
596 error |= rtp_rtcp->RegisterSendRtpHeaderExtension( 574 error |= rtp_rtcp->RegisterSendRtpHeaderExtension(
597 kRtpExtensionAbsoluteSendTime, id); 575 kRtpExtensionAbsoluteSendTime, id);
598 } 576 }
599 return error; 577 return error;
600 } 578 }
601 579
602 int ViEChannel::SetReceiveAbsoluteSendTimeStatus(bool enable, int id) {
603 return vie_receiver_.SetReceiveAbsoluteSendTimeStatus(enable, id) ? 0 : -1;
604 }
605
606 int ViEChannel::SetSendVideoRotationStatus(bool enable, int id) { 580 int ViEChannel::SetSendVideoRotationStatus(bool enable, int id) {
607 // Disable any previous registrations of this extension to avoid errors. 581 // Disable any previous registrations of this extension to avoid errors.
608 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 582 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
609 rtp_rtcp->DeregisterSendRtpHeaderExtension(kRtpExtensionVideoRotation); 583 rtp_rtcp->DeregisterSendRtpHeaderExtension(kRtpExtensionVideoRotation);
610 if (!enable) 584 if (!enable)
611 return 0; 585 return 0;
612 // Enable the extension. 586 // Enable the extension.
613 int error = 0; 587 int error = 0;
614 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 588 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
615 error |= rtp_rtcp->RegisterSendRtpHeaderExtension( 589 error |= rtp_rtcp->RegisterSendRtpHeaderExtension(
616 kRtpExtensionVideoRotation, id); 590 kRtpExtensionVideoRotation, id);
617 } 591 }
618 return error; 592 return error;
619 } 593 }
620 594
621 int ViEChannel::SetReceiveVideoRotationStatus(bool enable, int id) {
622 return vie_receiver_.SetReceiveVideoRotationStatus(enable, id) ? 0 : -1;
623 }
624
625 int ViEChannel::SetSendTransportSequenceNumber(bool enable, int id) { 595 int ViEChannel::SetSendTransportSequenceNumber(bool enable, int id) {
596 RTC_DCHECK(sender_);
626 // Disable any previous registrations of this extension to avoid errors. 597 // Disable any previous registrations of this extension to avoid errors.
627 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 598 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
628 rtp_rtcp->DeregisterSendRtpHeaderExtension( 599 rtp_rtcp->DeregisterSendRtpHeaderExtension(
629 kRtpExtensionTransportSequenceNumber); 600 kRtpExtensionTransportSequenceNumber);
630 } 601 }
631 if (!enable) 602 if (!enable)
632 return 0; 603 return 0;
633 // Enable the extension. 604 // Enable the extension.
634 int error = 0; 605 int error = 0;
635 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 606 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
636 error |= rtp_rtcp->RegisterSendRtpHeaderExtension( 607 error |= rtp_rtcp->RegisterSendRtpHeaderExtension(
637 kRtpExtensionTransportSequenceNumber, id); 608 kRtpExtensionTransportSequenceNumber, id);
638 } 609 }
639 return error; 610 return error;
640 } 611 }
641 612
642 int ViEChannel::SetReceiveTransportSequenceNumber(bool enable, int id) {
643 return vie_receiver_.SetReceiveTransportSequenceNumber(enable, id) ? 0 : -1;
644 }
645
646 void ViEChannel::SetRtcpXrRrtrStatus(bool enable) {
647 rtp_rtcp_modules_[0]->SetRtcpXrRrtrStatus(enable);
648 }
649
650 void ViEChannel::EnableTMMBR(bool enable) {
651 rtp_rtcp_modules_[0]->SetTMMBRStatus(enable);
652 }
653
654 int32_t ViEChannel::SetSSRC(const uint32_t SSRC, 613 int32_t ViEChannel::SetSSRC(const uint32_t SSRC,
655 const StreamType usage, 614 const StreamType usage,
656 const uint8_t simulcast_idx) { 615 const uint8_t simulcast_idx) {
616 RTC_DCHECK(sender_);
657 RtpRtcp* rtp_rtcp = rtp_rtcp_modules_[simulcast_idx]; 617 RtpRtcp* rtp_rtcp = rtp_rtcp_modules_[simulcast_idx];
658 if (usage == kViEStreamTypeRtx) { 618 if (usage == kViEStreamTypeRtx) {
659 rtp_rtcp->SetRtxSsrc(SSRC); 619 rtp_rtcp->SetRtxSsrc(SSRC);
660 } else { 620 } else {
661 rtp_rtcp->SetSSRC(SSRC); 621 rtp_rtcp->SetSSRC(SSRC);
662 } 622 }
663 return 0; 623 return 0;
664 } 624 }
665 625
666 int32_t ViEChannel::SetRemoteSSRCType(const StreamType usage,
667 const uint32_t SSRC) {
668 vie_receiver_.SetRtxSsrc(SSRC);
669 return 0;
670 }
671
672 int32_t ViEChannel::GetLocalSSRC(uint8_t idx, unsigned int* ssrc) { 626 int32_t ViEChannel::GetLocalSSRC(uint8_t idx, unsigned int* ssrc) {
673 RTC_DCHECK_LE(idx, rtp_rtcp_modules_.size()); 627 RTC_DCHECK_LE(idx, rtp_rtcp_modules_.size());
674 *ssrc = rtp_rtcp_modules_[idx]->SSRC(); 628 *ssrc = rtp_rtcp_modules_[idx]->SSRC();
675 return 0; 629 return 0;
676 } 630 }
677 631
678 uint32_t ViEChannel::GetRemoteSSRC() { 632 uint32_t ViEChannel::GetRemoteSSRC() {
633 RTC_DCHECK(sender_);
679 return vie_receiver_.GetRemoteSsrc(); 634 return vie_receiver_.GetRemoteSsrc();
680 } 635 }
681 636
682 int ViEChannel::SetRtxSendPayloadType(int payload_type, 637 int ViEChannel::SetRtxSendPayloadType(int payload_type,
683 int associated_payload_type) { 638 int associated_payload_type) {
684 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 639 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
685 rtp_rtcp->SetRtxSendPayloadType(payload_type, associated_payload_type); 640 rtp_rtcp->SetRtxSendPayloadType(payload_type, associated_payload_type);
686 SetRtxSendStatus(true); 641 SetRtxSendStatus(true);
687 return 0; 642 return 0;
688 } 643 }
689 644
690 void ViEChannel::SetRtxSendStatus(bool enable) { 645 void ViEChannel::SetRtxSendStatus(bool enable) {
691 int rtx_settings = 646 int rtx_settings =
692 enable ? kRtxRetransmitted | kRtxRedundantPayloads : kRtxOff; 647 enable ? kRtxRetransmitted | kRtxRedundantPayloads : kRtxOff;
693 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 648 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
694 rtp_rtcp->SetRtxSendStatus(rtx_settings); 649 rtp_rtcp->SetRtxSendStatus(rtx_settings);
695 } 650 }
696 651
697 void ViEChannel::SetRtxReceivePayloadType(int payload_type, 652 void ViEChannel::SetRtxReceivePayloadType(int payload_type,
698 int associated_payload_type) { 653 int associated_payload_type) {
654 RTC_DCHECK(!sender_);
699 vie_receiver_.SetRtxPayloadType(payload_type, associated_payload_type); 655 vie_receiver_.SetRtxPayloadType(payload_type, associated_payload_type);
stefan-webrtc 2016/02/05 14:35:57 Move this out instead?
pbos-webrtc 2016/02/05 15:15:51 Done.
700 } 656 }
701 657
702 void ViEChannel::SetUseRtxPayloadMappingOnRestore(bool val) { 658 void ViEChannel::SetUseRtxPayloadMappingOnRestore(bool val) {
703 vie_receiver_.SetUseRtxPayloadMappingOnRestore(val); 659 vie_receiver_.SetUseRtxPayloadMappingOnRestore(val);
stefan-webrtc 2016/02/05 14:35:56 Same here
pbos-webrtc 2016/02/05 15:15:51 Done.
704 } 660 }
705 661
706 void ViEChannel::SetRtpStateForSsrc(uint32_t ssrc, const RtpState& rtp_state) { 662 void ViEChannel::SetRtpStateForSsrc(uint32_t ssrc, const RtpState& rtp_state) {
707 RTC_DCHECK(!rtp_rtcp_modules_[0]->Sending()); 663 RTC_DCHECK(!rtp_rtcp_modules_[0]->Sending());
708 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 664 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
709 if (rtp_rtcp->SetRtpStateForSsrc(ssrc, rtp_state)) 665 if (rtp_rtcp->SetRtpStateForSsrc(ssrc, rtp_state))
710 return; 666 return;
711 } 667 }
712 } 668 }
713 669
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 } 787 }
832 788
833 void ViEChannel::RegisterSendChannelRtpStatisticsCallback( 789 void ViEChannel::RegisterSendChannelRtpStatisticsCallback(
834 StreamDataCountersCallback* callback) { 790 StreamDataCountersCallback* callback) {
835 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 791 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
836 rtp_rtcp->RegisterSendChannelRtpStatisticsCallback(callback); 792 rtp_rtcp->RegisterSendChannelRtpStatisticsCallback(callback);
837 } 793 }
838 794
839 void ViEChannel::RegisterReceiveChannelRtpStatisticsCallback( 795 void ViEChannel::RegisterReceiveChannelRtpStatisticsCallback(
840 StreamDataCountersCallback* callback) { 796 StreamDataCountersCallback* callback) {
841 vie_receiver_.GetReceiveStatistics()->RegisterRtpStatisticsCallback(callback); 797 vie_receiver_.GetReceiveStatistics()->RegisterRtpStatisticsCallback(callback);
stefan-webrtc 2016/02/05 14:35:57 Maybe move out too?
pbos-webrtc 2016/02/05 15:15:51 Done.
842 } 798 }
843 799
844 void ViEChannel::GetSendRtcpPacketTypeCounter( 800 void ViEChannel::GetSendRtcpPacketTypeCounter(
845 RtcpPacketTypeCounter* packet_counter) const { 801 RtcpPacketTypeCounter* packet_counter) const {
846 std::map<uint32_t, RtcpPacketTypeCounter> counter_map = 802 std::map<uint32_t, RtcpPacketTypeCounter> counter_map =
847 rtcp_packet_type_counter_observer_.GetPacketTypeCounterMap(); 803 rtcp_packet_type_counter_observer_.GetPacketTypeCounterMap();
848 804
849 RtcpPacketTypeCounter counter; 805 RtcpPacketTypeCounter counter;
850 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 806 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
851 counter.Add(counter_map[rtp_rtcp->SSRC()]); 807 counter.Add(counter_map[rtp_rtcp->SSRC()]);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 return rtp_rtcp_modules_[0]->Sending(); 866 return rtp_rtcp_modules_[0]->Sending();
911 } 867 }
912 868
913 void ViEChannel::StartReceive() { 869 void ViEChannel::StartReceive() {
914 if (!sender_) 870 if (!sender_)
915 StartDecodeThread(); 871 StartDecodeThread();
916 vie_receiver_.StartReceive(); 872 vie_receiver_.StartReceive();
917 } 873 }
918 874
919 void ViEChannel::StopReceive() { 875 void ViEChannel::StopReceive() {
920 vie_receiver_.StopReceive(); 876 vie_receiver_.StopReceive();
stefan-webrtc 2016/02/05 14:35:56 Should we call these from outside?
pbos-webrtc 2016/02/05 15:15:51 Not until we've moved out the decoder thread (foll
921 if (!sender_) 877 if (!sender_)
922 StopDecodeThread(); 878 StopDecodeThread();
923 } 879 }
924 880
925 int32_t ViEChannel::ReceivedRTPPacket(const void* rtp_packet,
926 size_t rtp_packet_length,
927 const PacketTime& packet_time) {
928 return vie_receiver_.ReceivedRTPPacket(
929 rtp_packet, rtp_packet_length, packet_time);
930 }
931
932 int32_t ViEChannel::ReceivedRTCPPacket(const void* rtcp_packet, 881 int32_t ViEChannel::ReceivedRTCPPacket(const void* rtcp_packet,
933 size_t rtcp_packet_length) { 882 size_t rtcp_packet_length) {
934 return vie_receiver_.ReceivedRTCPPacket(rtcp_packet, rtcp_packet_length); 883 RTC_DCHECK(sender_);
884 return vie_receiver_.DeliverRtcp(
885 reinterpret_cast<const uint8_t*>(rtcp_packet), rtcp_packet_length)
886 ? 0
887 : -1;
935 } 888 }
936 889
937 int32_t ViEChannel::SetMTU(uint16_t mtu) { 890 int32_t ViEChannel::SetMTU(uint16_t mtu) {
891 RTC_DCHECK(sender_);
938 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 892 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
939 rtp_rtcp->SetMaxTransferUnit(mtu); 893 rtp_rtcp->SetMaxTransferUnit(mtu);
940 return 0; 894 return 0;
941 } 895 }
942 896
943 RtpRtcp* ViEChannel::rtp_rtcp() { 897 RtpRtcp* ViEChannel::rtp_rtcp() {
944 return rtp_rtcp_modules_[0]; 898 return rtp_rtcp_modules_[0];
945 } 899 }
946 900
901 ViEReceiver* ViEChannel::vie_receiver() {
902 return &vie_receiver_;
903 }
904
947 VCMProtectionCallback* ViEChannel::vcm_protection_callback() { 905 VCMProtectionCallback* ViEChannel::vcm_protection_callback() {
948 return vcm_protection_callback_.get(); 906 return vcm_protection_callback_.get();
949 } 907 }
950 908
951 CallStatsObserver* ViEChannel::GetStatsObserver() { 909 CallStatsObserver* ViEChannel::GetStatsObserver() {
952 return stats_observer_.get(); 910 return stats_observer_.get();
953 } 911 }
954 912
955 // Do not acquire the lock of |vcm_| in this function. Decode callback won't 913 // Do not acquire the lock of |vcm_| in this function. Decode callback won't
956 // necessarily be called from the decoding thread. The decoding thread may have 914 // necessarily be called from the decoding thread. The decoding thread may have
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 vie_receiver_.GetRtpReceiver()); 1111 vie_receiver_.GetRtpReceiver());
1154 } 1112 }
1155 1113
1156 int32_t ViEChannel::VoiceChannel() { 1114 int32_t ViEChannel::VoiceChannel() {
1157 RTC_DCHECK(!sender_); 1115 RTC_DCHECK(!sender_);
1158 return vie_sync_.VoiceChannel(); 1116 return vie_sync_.VoiceChannel();
1159 } 1117 }
1160 1118
1161 void ViEChannel::RegisterPreRenderCallback( 1119 void ViEChannel::RegisterPreRenderCallback(
1162 I420FrameCallback* pre_render_callback) { 1120 I420FrameCallback* pre_render_callback) {
1121 RTC_DCHECK(!sender_);
1163 rtc::CritScope lock(&crit_); 1122 rtc::CritScope lock(&crit_);
1164 pre_render_callback_ = pre_render_callback; 1123 pre_render_callback_ = pre_render_callback;
1165 } 1124 }
1166 1125
1167 void ViEChannel::RegisterPreDecodeImageCallback(
1168 EncodedImageCallback* pre_decode_callback) {
1169 RTC_DCHECK(!sender_);
1170 vcm_->RegisterPreDecodeImageCallback(pre_decode_callback);
1171 }
1172
1173 // TODO(pbos): Remove as soon as audio can handle a changing payload type 1126 // TODO(pbos): Remove as soon as audio can handle a changing payload type
1174 // without this callback. 1127 // without this callback.
1175 int32_t ViEChannel::OnInitializeDecoder( 1128 int32_t ViEChannel::OnInitializeDecoder(
1176 const int8_t payload_type, 1129 const int8_t payload_type,
1177 const char payload_name[RTP_PAYLOAD_NAME_SIZE], 1130 const char payload_name[RTP_PAYLOAD_NAME_SIZE],
1178 const int frequency, 1131 const int frequency,
1179 const size_t channels, 1132 const size_t channels,
1180 const uint32_t rate) { 1133 const uint32_t rate) {
1181 RTC_NOTREACHED(); 1134 RTC_NOTREACHED();
1182 return 0; 1135 return 0;
(...skipping 15 matching lines...) Expand all
1198 rtc::CritScope lock(&crit_); 1151 rtc::CritScope lock(&crit_);
1199 receive_stats_callback_ = receive_statistics_proxy; 1152 receive_stats_callback_ = receive_statistics_proxy;
1200 } 1153 }
1201 1154
1202 void ViEChannel::SetIncomingVideoStream( 1155 void ViEChannel::SetIncomingVideoStream(
1203 IncomingVideoStream* incoming_video_stream) { 1156 IncomingVideoStream* incoming_video_stream) {
1204 rtc::CritScope lock(&crit_); 1157 rtc::CritScope lock(&crit_);
1205 incoming_video_stream_ = incoming_video_stream; 1158 incoming_video_stream_ = incoming_video_stream;
1206 } 1159 }
1207 } // namespace webrtc 1160 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/vie_channel.h ('k') | webrtc/video/vie_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698