Home | History | Annotate | Download | only in webrtc

Lines Matching refs:channel

63 // WebRtc channel id and capture id share the same number space.
65 // renderer for a channel or it is adding a renderer for a capturer.
270 struct Channel {
271 Channel()
313 bool remb_contribute_; // This channel contributes to the remb report.
314 bool remb_bw_partition_; // This channel is allocated part of total bw.
386 for (std::map<int, Channel*>::const_iterator iter = channels_.begin();
396 bool IsChannel(int channel) const {
397 return (channels_.find(channel) != channels_.end());
410 int GetCaptureId(int channel) const {
411 WEBRTC_ASSERT_CHANNEL(channel);
412 return channels_.find(channel)->second->capture_id_;
414 int GetOriginalChannelId(int channel) const {
415 WEBRTC_ASSERT_CHANNEL(channel);
416 return channels_.find(channel)->second->original_channel_id_;
418 bool GetHasRenderer(int channel) const {
419 WEBRTC_ASSERT_CHANNEL(channel);
420 return channels_.find(channel)->second->has_renderer_;
422 bool GetRenderStarted(int channel) const {
423 WEBRTC_ASSERT_CHANNEL(channel);
424 return channels_.find(channel)->second->render_started_;
426 bool GetSend(int channel) const {
427 WEBRTC_ASSERT_CHANNEL(channel);
428 return channels_.find(channel)->second->send;
442 webrtc::ViERTCPMode GetRtcpStatus(int channel) const {
443 WEBRTC_ASSERT_CHANNEL(channel);
444 return channels_.find(channel)->second->rtcp_status_;
446 webrtc::ViEKeyFrameRequestMethod GetKeyFrameRequestMethod(int channel) const {
447 WEBRTC_ASSERT_CHANNEL(channel);
448 return channels_.find(channel)->second->key_frame_request_method_;
450 bool GetTmmbrStatus(int channel) const {
451 WEBRTC_ASSERT_CHANNEL(channel);
452 return channels_.find(channel)->second->tmmbr_;
454 bool GetRembStatusBwPartition(int channel) const {
455 WEBRTC_ASSERT_CHANNEL(channel);
456 return channels_.find(channel)->second->remb_bw_partition_;
458 bool GetRembStatusContribute(int channel) const {
459 WEBRTC_ASSERT_CHANNEL(channel);
460 return channels_.find(channel)->second->remb_contribute_;
462 int GetSendRtpTimestampOffsetExtensionId(int channel) {
463 WEBRTC_ASSERT_CHANNEL(channel);
464 return channels_.find(channel)->second->rtp_offset_send_id_;
466 int GetReceiveRtpTimestampOffsetExtensionId(int channel) {
467 WEBRTC_ASSERT_CHANNEL(channel);
468 return channels_.find(channel)->second->rtp_offset_receive_id_;
470 int GetSendAbsoluteSendTimeExtensionId(int channel) {
471 WEBRTC_ASSERT_CHANNEL(channel);
472 return channels_.find(channel)->second->rtp_absolute_send_time_send_id_;
474 int GetReceiveAbsoluteSendTimeExtensionId(int channel) {
475 WEBRTC_ASSERT_CHANNEL(channel);
476 return channels_.find(channel)->second->rtp_absolute_send_time_receive_id_;
478 bool GetTransmissionSmoothingStatus(int channel) {
479 WEBRTC_ASSERT_CHANNEL(channel);
480 return channels_.find(channel)->second->transmission_smoothing_;
482 int GetSenderTargetDelay(int channel) {
483 WEBRTC_ASSERT_CHANNEL(channel);
484 return channels_.find(channel)->second->sender_target_delay_;
486 int GetReceiverTargetDelay(int channel) {
487 WEBRTC_ASSERT_CHANNEL(channel);
488 return channels_.find(channel)->second->receiver_target_delay_;
490 bool GetNackStatus(int channel) const {
491 channel);
492 return channels_.find(channel)->second->nack_;
494 bool GetHybridNackFecStatus(int channel) const {
495 WEBRTC_ASSERT_CHANNEL(channel);
496 return channels_.find(channel)->second->hybrid_nack_fec_;
498 int GetNumSsrcs(int channel) const {
499 WEBRTC_ASSERT_CHANNEL(channel);
501 channels_.find(channel)->second->ssrcs_.size());
503 bool GetIsTransmitting(int channel) const {
504 WEBRTC_ASSERT_CHANNEL(channel);
505 return channels_.find(channel)->second->can_transmit_;
507 bool ReceiveCodecRegistered(int channel,
509 WEBRTC_ASSERT_CHANNEL(channel);
511 channels_.find(channel)->second->recv_codecs;
514 bool ExternalDecoderRegistered(int channel,
516 WEBRTC_ASSERT_CHANNEL(channel);
517 return channels_.find(channel)->second->
520 int GetNumExternalDecoderRegistered(int channel) const {
521 WEBRTC_ASSERT_CHANNEL(channel);
523 channels_.find(channel)->second->ext_decoder_pl_types_.size());
525 bool ExternalEncoderRegistered(int channel,
527 WEBRTC_ASSERT_CHANNEL(channel);
528 return channels_.find(channel)->second->
531 int GetNumExternalEncoderRegistered(int channel) const {
532 WEBRTC_ASSERT_CHANNEL(channel);
534 channels_.find(channel)->second->ext_encoder_pl_types_.size());
537 std::map<int, Channel*>::const_iterator it;
544 void SetSendBitrates(int channel, unsigned int video_bitrate,
546 WEBRTC_ASSERT_CHANNEL(channel);
547 channels_[channel]->send_video_bitrate_ = video_bitrate;
548 channels_[channel]->send_fec_bitrate_ = fec_bitrate;
549 channels_[channel]->send_nack_bitrate_ = nack_bitrate;
551 void SetSendBandwidthEstimate(int channel, unsigned int send_bandwidth) {
552 WEBRTC_ASSERT_CHANNEL(channel);
553 channels_[channel]->send_bandwidth_ = send_bandwidth;
555 void SetReceiveBandwidthEstimate(int channel,
557 WEBRTC_ASSERT_CHANNEL(channel);
558 channels_[channel]->receive_bandwidth_ = receive_bandwidth;
569 WEBRTC_FUNC(CreateChannel, (int& channel)) { // NOLINT
576 Channel* ch = new Channel();
578 channel = last_channel_;
581 WEBRTC_FUNC(CreateChannel, (int& channel, int original_channel)) {
583 if (CreateChannel(channel) != 0) {
586 channels_[channel]->original_channel_id_ = original_channel;
589 WEBRTC_FUNC(CreateReceiveChannel, (int& channel, int original_channel)) {
590 return CreateChannel(channel, original_channel);
592 WEBRTC_FUNC(DeleteChannel, (const int channel)) {
593 WEBRTC_CHECK_CHANNEL(channel);
594 // Make sure we deregister all the decoders before deleting a channel.
595 EXPECT_EQ(0, GetNumExternalDecoderRegistered(channel));
596 delete channels_[channel];
597 channels_.erase(channel);
601 (int channel, webrtc::CpuOveruseObserver* observer));
604 WEBRTC_FUNC(StartSend, (const int channel)) {
605 WEBRTC_CHECK_CHANNEL(channel);
606 channels_[channel]->send = true;
609 WEBRTC_FUNC(StopSend, (const int channel)) {
610 WEBRTC_CHECK_CHANNEL(channel);
611 channels_[channel]->send = false;
614 WEBRTC_FUNC(StartReceive, (const int channel)) {
615 WEBRTC_CHECK_CHANNEL(channel);
616 channels_[channel]->receive_ = true;
619 WEBRTC_FUNC(StopReceive, (const int channel)) {
620 WEBRTC_CHECK_CHANNEL(channel);
621 channels_[channel]->receive_ = false;
660 WEBRTC_FUNC(SetSendCodec, (const int channel,
662 WEBRTC_CHECK_CHANNEL(channel);
663 channels_[channel]->send_codec = codec;
667 WEBRTC_FUNC_CONST(GetSendCodec, (const int channel,
669 WEBRTC_CHECK_CHANNEL(channel);
670 codec = channels_.find(channel)->second->send_codec;
673 WEBRTC_FUNC(SetReceiveCodec, (const int channel,
675 WEBRTC_CHECK_CHANNEL(channel);
676 channels_[channel]->recv_codecs.push_back(codec);
689 WEBRTC_FUNC_CONST(GetCodecTargetBitrate, (const int channel,
691 WEBRTC_CHECK_CHANNEL(channel);
693 std::map<int, Channel*>::const_iterator it = channels_.find(channel);
702 virtual unsigned int GetDiscardedPackets(const int channel) const {
747 const int channel)) {
748 WEBRTC_CHECK_CHANNEL(channel);
750 channels_[channel]->capture_id_ = capture_id;
751 capturers_[capture_id]->set_channel_id(channel);
754 WEBRTC_FUNC(DisconnectCaptureDevice, (const int channel)) {
755 WEBRTC_CHECK_CHANNEL(channel);
756 int capture_id = channels_[channel]->capture_id_;
758 channels_[channel]->capture_id_ = -1;
778 WEBRTC_VOID_FUNC(SetNetworkTransmissionState, (const int channel,
780 WEBRTC_ASSERT_CHANNEL(channel);
781 channels_[channel]->can_transmit_ = is_transmitting;
788 virtual bool IsIPv6Enabled(int channel) { return true; }
853 WEBRTC_FUNC(SetLocalSSRC, (const int channel,
857 WEBRTC_CHECK_CHANNEL(channel);
858 channels_[channel]->ssrcs_[idx] = ssrc;
864 WEBRTC_FUNC_CONST(GetLocalSSRC, (const int channel,
867 WEBRTC_CHECK_CHANNEL(channel);
868 ssrc = channels_.find(channel)->second->ssrcs_[0];
879 (const int channel, const webrtc::ViERTCPMode mode)) {
880 WEBRTC_CHECK_CHANNEL(channel);
881 channels_[channel]->rtcp_status_ = mode;
885 WEBRTC_FUNC(SetRTCPCName, (const int channel,
887 WEBRTC_CHECK_CHANNEL(channel);
888 channels_[channel]->cname_.assign(rtcp_cname);
891 WEBRTC_FUNC_CONST(GetRTCPCName, (const int channel,
893 WEBRTC_CHECK_CHANNEL(channel);
895 channels_.find(channel)->second->cname_.c_str());
901 WEBRTC_FUNC(SetNACKStatus, (const int channel, const bool enable)) {
902 WEBRTC_CHECK_CHANNEL(channel);
903 channels_[channel]->nack_ = enable;
904 channels_[channel]->hybrid_nack_fec_ = false;
909 WEBRTC_FUNC(SetHybridNACKFECStatus, (const int channel, const bool enable,
911 WEBRTC_CHECK_CHANNEL(channel);
913 red_type == channels_[channel]->send_codec.plType ||
914 fec_type == channels_[channel]->send_codec.plType) {
917 channels_[channel]->nack_ = false;
918 channels_[channel]->hybrid_nack_fec_ = enable;
922 (const int channel,
924 WEBRTC_CHECK_CHANNEL(channel);
925 channels_[channel]->key_frame_request_method_ = method;
928 WEBRTC_FUNC(SetSenderBufferingMode, (int channel, int target_delay)) {
929 WEBRTC_CHECK_CHANNEL(channel);
930 channels_[channel]->sender_target_delay_ = target_delay;
933 WEBRTC_FUNC(SetReceiverBufferingMode, (int channel, int target_delay)) {
934 WEBRTC_CHECK_CHANNEL(channel);
935 channels_[channel]->receiver_target_delay_ = target_delay;
940 WEBRTC_FUNC(SetRembStatus, (int channel, bool send, bool receive)) {
941 WEBRTC_CHECK_CHANNEL(channel);
942 channels_[channel]->remb_contribute_ = receive;
943 channels_[channel]->remb_bw_partition_ = send;
946 WEBRTC_FUNC(SetTMMBRStatus, (const int channel, const bool enable)) {
947 WEBRTC_CHECK_CHANNEL(channel);
948 channels_[channel]->tmmbr_ = enable;
951 WEBRTC_FUNC(SetSendTimestampOffsetStatus, (int channel, bool enable,
953 WEBRTC_CHECK_CHANNEL(channel);
954 channels_[channel]->rtp_offset_send_id_ = (enable) ? id : 0;
957 WEBRTC_FUNC(SetReceiveTimestampOffsetStatus, (int channel, bool enable,
959 WEBRTC_CHECK_CHANNEL(channel);
960 channels_[channel]->rtp_offset_receive_id_ = (enable) ? id : 0;
963 WEBRTC_FUNC(SetSendAbsoluteSendTimeStatus, (int channel, bool enable,
965 WEBRTC_CHECK_CHANNEL(channel);
966 channels_[channel]->rtp_absolute_send_time_send_id_ = (enable) ? id : 0;
969 WEBRTC_FUNC(SetReceiveAbsoluteSendTimeStatus, (int channel, bool enable,
971 WEBRTC_CHECK_CHANNEL(channel);
972 channels_[channel]->rtp_absolute_send_time_receive_id_ = (enable) ? id : 0;
975 WEBRTC_FUNC(SetTransmissionSmoothingStatus, (int channel, bool enable)) {
976 WEBRTC_CHECK_CHANNEL(channel);
977 channels_[channel]->transmission_smoothing_ = enable;
986 WEBRTC_FUNC_CONST(GetBandwidthUsage, (const int channel,
989 WEBRTC_CHECK_CHANNEL(channel);
990 std::map<int, Channel*>::const_iterator it = channels_.find(channel);
1004 WEBRTC_FUNC_CONST(GetEstimatedSendBandwidth, (const int channel,
1006 WEBRTC_CHECK_CHANNEL(channel);
1007 std::map<int, Channel*>::const_iterator it = channels_.find(channel);
1016 WEBRTC_FUNC_CONST(GetEstimatedReceiveBandwidth, (const int channel,
1018 WEBRTC_CHECK_CHANNEL(channel);
1019 std::map<int, Channel*>::const_iterator it = channels_.find(channel);
1056 (const int channel, const unsigned char pl_type, webrtc::VideoEncoder*,
1058 WEBRTC_CHECK_CHANNEL(channel);
1059 channels_[channel]->ext_encoder_pl_types_.insert(pl_type);
1063 (const int channel, const unsigned char pl_type)) {
1064 WEBRTC_CHECK_CHANNEL(channel);
1065 channels_[channel]->ext_encoder_pl_types_.erase(pl_type);
1069 (const int channel, const unsigned int pl_type, webrtc::VideoDecoder*,
1071 WEBRTC_CHECK_CHANNEL(channel);
1072 channels_[channel]->ext_decoder_pl_types_.insert(pl_type);
1076 (const int channel, const unsigned char pl_type)) {
1077 WEBRTC_CHECK_CHANNEL(channel);
1078 channels_[channel]->ext_decoder_pl_types_.erase(pl_type);
1092 std::map<int, Channel*> channels_;