Lines Matching refs:channel

56 // WebRtc channel id and capture id share the same number space.
58 // renderer for a channel or it is adding a renderer for a capturer.
318 bool remb_contribute_; // This channel contributes to the remb report.
319 bool remb_bw_partition_; // This channel is allocated part of total bw.
411 bool IsChannel(int channel) const {
412 return (channels_.find(channel) != channels_.end());
435 int GetCaptureId(int channel) const {
436 WEBRTC_ASSERT_CHANNEL(channel);
437 return channels_.find(channel)->second->capture_id_;
439 int GetOriginalChannelId(int channel) const {
440 WEBRTC_ASSERT_CHANNEL(channel);
441 return channels_.find(channel)->second->original_channel_id_;
443 bool GetHasRenderer(int channel) const {
444 WEBRTC_ASSERT_CHANNEL(channel);
445 return channels_.find(channel)->second->has_renderer_;
447 bool GetRenderStarted(int channel) const {
448 WEBRTC_ASSERT_CHANNEL(channel);
449 return channels_.find(channel)->second->render_started_;
451 bool GetSend(int channel) const {
452 WEBRTC_ASSERT_CHANNEL(channel);
453 return channels_.find(channel)->second->send;
455 bool GetReceive(int channel) const {
456 WEBRTC_ASSERT_CHANNEL(channel);
457 return channels_.find(channel)->second->receive_;
471 webrtc::ViERTCPMode GetRtcpStatus(int channel) const {
472 WEBRTC_ASSERT_CHANNEL(channel);
473 return channels_.find(channel)->second->rtcp_status_;
475 webrtc::ViEKeyFrameRequestMethod GetKeyFrameRequestMethod(int channel) const {
476 WEBRTC_ASSERT_CHANNEL(channel);
477 return channels_.find(channel)->second->key_frame_request_method_;
479 bool GetTmmbrStatus(int channel) const {
480 WEBRTC_ASSERT_CHANNEL(channel);
481 return channels_.find(channel)->second->tmmbr_;
483 bool GetRembStatusBwPartition(int channel) const {
484 WEBRTC_ASSERT_CHANNEL(channel);
485 return channels_.find(channel)->second->remb_bw_partition_;
487 bool GetRembStatusContribute(int channel) const {
488 WEBRTC_ASSERT_CHANNEL(channel);
489 return channels_.find(channel)->second->remb_contribute_;
491 int GetSendRtpExtensionId(int channel, const std::string& extension) {
492 WEBRTC_ASSERT_CHANNEL(channel);
494 return channels_.find(channel)->second->rtp_offset_send_id_;
496 return channels_.find(channel)->second->rtp_absolute_send_time_send_id_;
500 int GetReceiveRtpExtensionId(int channel, const std::string& extension) {
501 WEBRTC_ASSERT_CHANNEL(channel);
503 return channels_.find(channel)->second->rtp_offset_receive_id_;
506 channels_.find(channel)->second->rtp_absolute_send_time_receive_id_;
510 bool GetTransmissionSmoothingStatus(int channel) {
511 WEBRTC_ASSERT_CHANNEL(channel);
512 return channels_.find(channel)->second->transmission_smoothing_;
514 int GetSenderTargetDelay(int channel) {
515 WEBRTC_ASSERT_CHANNEL(channel);
516 return channels_.find(channel)->second->sender_target_delay_;
518 int GetReceiverTargetDelay(int channel) {
519 WEBRTC_ASSERT_CHANNEL(channel);
520 return channels_.find(channel)->second->receiver_target_delay_;
522 bool GetNackStatus(int channel) const {
523 WEBRTC_ASSERT_CHANNEL(channel);
524 return channels_.find(channel)->second->nack_;
526 bool GetHybridNackFecStatus(int channel) const {
527 WEBRTC_ASSERT_CHANNEL(channel);
528 return channels_.find(channel)->second->hybrid_nack_fec_;
530 int GetNumSsrcs(int channel) const {
531 WEBRTC_ASSERT_CHANNEL(channel);
533 channels_.find(channel)->second->ssrcs_.size());
535 int GetNumRtxSsrcs(int channel) const {
536 WEBRTC_ASSERT_CHANNEL(channel);
538 channels_.find(channel)->second->rtx_ssrcs_.size());
540 bool GetIsTransmitting(int channel) const {
541 WEBRTC_ASSERT_CHANNEL(channel);
542 return channels_.find(channel)->second->can_transmit_;
544 webrtc::CpuOveruseObserver* GetCpuOveruseObserver(int channel) const {
545 WEBRTC_ASSERT_CHANNEL(channel);
546 return channels_.find(channel)->second->overuse_observer_;
548 webrtc::CpuOveruseOptions GetCpuOveruseOptions(int channel) const {
549 WEBRTC_ASSERT_CHANNEL(channel);
550 return channels_.find(channel)->second->overuse_options_;
552 int GetSsrc(int channel, int idx) const {
553 WEBRTC_ASSERT_CHANNEL(channel);
554 if (channels_.find(channel)->second->ssrcs_.find(idx) ==
555 channels_.find(channel)->second->ssrcs_.end()) {
558 return channels_.find(channel)->second->ssrcs_[idx];
560 int GetRtxSsrc(int channel, int idx) const {
561 WEBRTC_ASSERT_CHANNEL(channel);
562 if (channels_.find(channel)->second->rtx_ssrcs_.find(idx) ==
563 channels_.find(channel)->second->rtx_ssrcs_.end()) {
566 return channels_.find(channel)->second->rtx_ssrcs_[idx];
568 bool ReceiveCodecRegistered(int channel,
570 WEBRTC_ASSERT_CHANNEL(channel);
572 channels_.find(channel)->second->recv_codecs;
575 bool ExternalDecoderRegistered(int channel,
577 WEBRTC_ASSERT_CHANNEL(channel);
578 return channels_.find(channel)->second->
581 int GetNumExternalDecoderRegistered(int channel) const {
582 WEBRTC_ASSERT_CHANNEL(channel);
584 channels_.find(channel)->second->ext_decoder_pl_types_.size());
586 bool ExternalEncoderRegistered(int channel,
588 WEBRTC_ASSERT_CHANNEL(channel);
589 return channels_.find(channel)->second->
592 int GetNumExternalEncoderRegistered(int channel) const {
593 WEBRTC_ASSERT_CHANNEL(channel);
595 channels_.find(channel)->second->ext_encoder_pl_types_.size());
605 void SetSendBitrates(int channel, unsigned int video_bitrate,
607 WEBRTC_ASSERT_CHANNEL(channel);
608 channels_[channel]->send_video_bitrate_ = video_bitrate;
609 channels_[channel]->send_fec_bitrate_ = fec_bitrate;
610 channels_[channel]->send_nack_bitrate_ = nack_bitrate;
612 void SetSendBandwidthEstimate(int channel, unsigned int send_bandwidth) {
613 WEBRTC_ASSERT_CHANNEL(channel);
614 channels_[GetOriginalChannelId(channel)]->send_bandwidth_ = send_bandwidth;
616 void SetReceiveBandwidthEstimate(int channel,
618 WEBRTC_ASSERT_CHANNEL(channel);
619 channels_[GetOriginalChannelId(channel)]->receive_bandwidth_ =
622 int GetRtxSendPayloadType(int channel) {
623 WEBRTC_CHECK_CHANNEL(channel);
624 return channels_[channel]->rtx_send_payload_type;
626 int GetRtxRecvPayloadType(int channel) {
627 WEBRTC_CHECK_CHANNEL(channel);
628 return channels_[channel]->rtx_recv_payload_type;
630 int GetRemoteRtxSsrc(int channel) {
631 WEBRTC_CHECK_CHANNEL(channel);
632 return channels_.find(channel)->second->remote_rtx_ssrc_;
634 bool GetSuspendBelowMinBitrateStatus(int channel) {
635 WEBRTC_ASSERT_CHANNEL(channel);
636 return channels_.find(channel)->second->suspend_below_min_bitrate_;
638 int GetLastRecvdPayloadType(int channel) const {
639 WEBRTC_CHECK_CHANNEL(channel);
640 return channels_.find(channel)->second->last_recvd_payload_type_;
642 unsigned int GetReservedTransmitBitrate(int channel) {
643 WEBRTC_ASSERT_CHANNEL(channel);
644 return channels_.find(channel)->second->reserved_transmit_bitrate_bps_;
655 WEBRTC_FUNC(CreateChannel, (int& channel)) { // NOLINT
664 // The original channel of the first channel in a group refers to itself
668 channel = last_channel_;
671 WEBRTC_FUNC(CreateChannel, (int& channel, int original_channel)) {
673 if (CreateChannel(channel) != 0) {
676 channels_[channel]->original_channel_id_ = original_channel;
679 WEBRTC_FUNC(CreateReceiveChannel, (int& channel, int original_channel)) {
680 return CreateChannel(channel, original_channel);
682 WEBRTC_FUNC(DeleteChannel, (const int channel)) {
683 WEBRTC_CHECK_CHANNEL(channel);
684 // Make sure we deregister all the decoders before deleting a channel.
685 EXPECT_EQ(0, GetNumExternalDecoderRegistered(channel));
686 delete channels_[channel];
687 channels_.erase(channel);
691 (int channel, webrtc::CpuOveruseObserver* observer)) {
692 WEBRTC_CHECK_CHANNEL(channel);
693 channels_[channel]->overuse_observer_ = observer;
702 (int channel, const webrtc::CpuOveruseOptions& options)) {
703 WEBRTC_CHECK_CHANNEL(channel);
704 channels_[channel]->overuse_options_ = options;
709 WEBRTC_FUNC(StartSend, (const int channel)) {
710 WEBRTC_CHECK_CHANNEL(channel);
711 channels_[channel]->send = true;
714 WEBRTC_FUNC(StopSend, (const int channel)) {
715 WEBRTC_CHECK_CHANNEL(channel);
716 channels_[channel]->send = false;
719 WEBRTC_FUNC(StartReceive, (const int channel)) {
720 WEBRTC_CHECK_CHANNEL(channel);
721 channels_[channel]->receive_ = true;
724 WEBRTC_FUNC(StopReceive, (const int channel)) {
725 WEBRTC_CHECK_CHANNEL(channel);
726 channels_[channel]->receive_ = false;
765 WEBRTC_FUNC(SetSendCodec, (const int channel,
767 WEBRTC_CHECK_CHANNEL(channel);
768 channels_[channel]->send_codec = codec;
772 WEBRTC_FUNC_CONST(GetSendCodec, (const int channel,
774 WEBRTC_CHECK_CHANNEL(channel);
775 codec = channels_.find(channel)->second->send_codec;
778 WEBRTC_FUNC(SetReceiveCodec, (const int channel,
780 WEBRTC_CHECK_CHANNEL(channel);
781 channels_[channel]->recv_codecs.push_back(codec);
794 WEBRTC_FUNC_CONST(GetCodecTargetBitrate, (const int channel,
796 WEBRTC_CHECK_CHANNEL(channel);
798 std::map<int, Channel*>::const_iterator it = channels_.find(channel);
807 virtual unsigned int GetDiscardedPackets(const int channel) const {
824 WEBRTC_VOID_FUNC(SuspendBelowMinBitrate, (int channel)) {
825 WEBRTC_ASSERT_CHANNEL(channel);
826 channels_[channel]->suspend_below_min_bitrate_ = true;
856 const int channel)) {
857 WEBRTC_CHECK_CHANNEL(channel);
859 channels_[channel]->capture_id_ = capture_id;
860 capturers_[capture_id]->set_channel_id(channel);
863 WEBRTC_FUNC(DisconnectCaptureDevice, (const int channel)) {
864 WEBRTC_CHECK_CHANNEL(channel);
865 int capture_id = channels_[channel]->capture_id_;
867 channels_[channel]->capture_id_ = -1;
887 WEBRTC_VOID_FUNC(SetNetworkTransmissionState, (const int channel,
889 WEBRTC_ASSERT_CHANNEL(channel);
890 channels_[channel]->can_transmit_ = is_transmitting;
895 WEBRTC_FUNC(ReceivedRTPPacket, (const int channel,
899 WEBRTC_ASSERT_CHANNEL(channel);
902 channels_[channel]->last_recvd_payload_type_ = payload_type;
908 virtual bool IsIPv6Enabled(int channel) { return true; }
974 WEBRTC_FUNC(SetLocalSSRC, (const int channel,
978 WEBRTC_CHECK_CHANNEL(channel);
981 channels_[channel]->ssrcs_[idx] = ssrc;
984 channels_[channel]->rtx_ssrcs_[idx] = ssrc;
992 WEBRTC_FUNC_CONST(SetRemoteSSRCType, (const int channel,
994 WEBRTC_CHECK_CHANNEL(channel);
996 channels_.find(channel)->second->remote_rtx_ssrc_ = ssrc;
1002 WEBRTC_FUNC_CONST(GetLocalSSRC, (const int channel,
1005 WEBRTC_CHECK_CHANNEL(channel);
1006 ssrc = channels_.find(channel)->second->ssrcs_[0];
1012 WEBRTC_FUNC(SetRtxSendPayloadType, (const int channel,
1014 WEBRTC_CHECK_CHANNEL(channel);
1015 channels_[channel]->rtx_send_payload_type = payload_type;
1023 WEBRTC_FUNC(SetRtxReceivePayloadType, (const int channel,
1025 WEBRTC_CHECK_CHANNEL(channel);
1026 channels_[channel]->rtx_recv_payload_type = payload_type;
1032 (const int channel, const webrtc::ViERTCPMode mode)) {
1033 WEBRTC_CHECK_CHANNEL(channel);
1034 channels_[channel]->rtcp_status_ = mode;
1038 WEBRTC_FUNC(SetRTCPCName, (const int channel,
1040 WEBRTC_CHECK_CHANNEL(channel);
1041 channels_[channel]->cname_.assign(rtcp_cname);
1044 WEBRTC_FUNC_CONST(GetRTCPCName, (const int channel,
1046 WEBRTC_CHECK_CHANNEL(channel);
1048 channels_.find(channel)->second->cname_.c_str());
1054 WEBRTC_FUNC(SetNACKStatus, (const int channel, const bool enable)) {
1055 WEBRTC_CHECK_CHANNEL(channel);
1056 channels_[channel]->nack_ = enable;
1057 channels_[channel]->hybrid_nack_fec_ = false;
1062 WEBRTC_FUNC(SetHybridNACKFECStatus, (const int channel, const bool enable,
1064 WEBRTC_CHECK_CHANNEL(channel);
1066 red_type == channels_[channel]->send_codec.plType ||
1067 fec_type == channels_[channel]->send_codec.plType) {
1070 channels_[channel]->nack_ = false;
1071 channels_[channel]->hybrid_nack_fec_ = enable;
1075 (const int channel,
1077 WEBRTC_CHECK_CHANNEL(channel);
1078 channels_[channel]->key_frame_request_method_ = method;
1081 WEBRTC_FUNC(SetSenderBufferingMode, (int channel, int target_delay)) {
1082 WEBRTC_CHECK_CHANNEL(channel);
1083 channels_[channel]->sender_target_delay_ = target_delay;
1086 WEBRTC_FUNC(SetReceiverBufferingMode, (int channel, int target_delay)) {
1087 WEBRTC_CHECK_CHANNEL(channel);
1088 channels_[channel]->receiver_target_delay_ = target_delay;
1093 WEBRTC_FUNC(SetRembStatus, (int channel, bool send, bool receive)) {
1094 WEBRTC_CHECK_CHANNEL(channel);
1095 channels_[channel]->remb_contribute_ = receive;
1096 channels_[channel]->remb_bw_partition_ = send;
1099 WEBRTC_FUNC(SetTMMBRStatus, (const int channel, const bool enable)) {
1100 WEBRTC_CHECK_CHANNEL(channel);
1101 channels_[channel]->tmmbr_ = enable;
1104 WEBRTC_FUNC(SetSendTimestampOffsetStatus, (int channel, bool enable,
1106 WEBRTC_CHECK_CHANNEL(channel);
1107 channels_[channel]->rtp_offset_send_id_ = (enable) ? id : -1;
1110 WEBRTC_FUNC(SetReceiveTimestampOffsetStatus, (int channel, bool enable,
1112 WEBRTC_CHECK_CHANNEL(channel);
1113 channels_[channel]->rtp_offset_receive_id_ = (enable) ? id : -1;
1116 WEBRTC_FUNC(SetSendAbsoluteSendTimeStatus, (int channel, bool enable,
1118 WEBRTC_CHECK_CHANNEL(channel);
1119 channels_[channel]->rtp_absolute_send_time_send_id_ = (enable) ? id : -1;
1122 WEBRTC_FUNC(SetReceiveAbsoluteSendTimeStatus, (int channel, bool enable,
1124 WEBRTC_CHECK_CHANNEL(channel);
1125 channels_[channel]->rtp_absolute_send_time_receive_id_ = (enable) ? id : -1;
1129 WEBRTC_FUNC(SetTransmissionSmoothingStatus, (int channel, bool enable)) {
1130 WEBRTC_CHECK_CHANNEL(channel);
1131 channels_[channel]->transmission_smoothing_ = enable;
1134 WEBRTC_FUNC(SetReservedTransmitBitrate, (int channel,
1136 WEBRTC_CHECK_CHANNEL(channel);
1137 channels_[channel]->reserved_transmit_bitrate_bps_ =
1155 WEBRTC_FUNC_CONST(GetBandwidthUsage, (const int channel,
1158 WEBRTC_CHECK_CHANNEL(channel);
1159 std::map<int, Channel*>::const_iterator it = channels_.find(channel);
1173 WEBRTC_FUNC_CONST(GetEstimatedSendBandwidth, (const int channel,
1175 WEBRTC_CHECK_CHANNEL(channel);
1176 std::map<int, Channel*>::const_iterator it = channels_.find(channel);
1179 it = channels_.find(GetOriginalChannelId(channel));
1186 WEBRTC_FUNC_CONST(GetEstimatedReceiveBandwidth, (const int channel,
1188 WEBRTC_CHECK_CHANNEL(channel);
1189 std::map<int, Channel*>::const_iterator it = channels_.find(channel);
1191 it = channels_.find(GetOriginalChannelId(channel));
1255 (const int channel, const unsigned char pl_type, webrtc::VideoEncoder*,
1257 WEBRTC_CHECK_CHANNEL(channel);
1258 channels_[channel]->ext_encoder_pl_types_.insert(pl_type);
1262 (const int channel, const unsigned char pl_type)) {
1263 WEBRTC_CHECK_CHANNEL(channel);
1264 channels_[channel]->ext_encoder_pl_types_.erase(pl_type);
1268 (const int channel, const unsigned int pl_type, webrtc::VideoDecoder*,
1270 WEBRTC_CHECK_CHANNEL(channel);
1271 channels_[channel]->ext_decoder_pl_types_.insert(pl_type);
1275 (const int channel, const unsigned char pl_type)) {
1276 WEBRTC_CHECK_CHANNEL(channel);
1277 channels_[channel]->ext_decoder_pl_types_.erase(pl_type);