Lines Matching refs:channel

298   bool GetPlayout(int channel) {
299 return channels_[channel]->playout;
301 bool GetSend(int channel) {
302 return channels_[channel]->send;
307 bool GetVAD(int channel) {
308 return channels_[channel]->vad;
310 bool GetRED(int channel) {
311 return channels_[channel]->red;
313 bool GetCodecFEC(int channel) {
314 return channels_[channel]->codec_fec;
316 int GetMaxEncodingBandwidth(int channel) {
317 return channels_[channel]->max_encoding_bandwidth;
319 bool GetNACK(int channel) {
320 return channels_[channel]->nack;
322 int GetNACKMaxPackets(int channel) {
323 return channels_[channel]->nack_max_packets;
325 webrtc::ViENetwork* GetViENetwork(int channel) {
326 WEBRTC_ASSERT_CHANNEL(channel);
329 return channels_[channel]->vie_network;
331 int GetVideoChannel(int channel) {
332 WEBRTC_ASSERT_CHANNEL(channel);
333 return channels_[channel]->video_channel;
335 const webrtc::PacketTime& GetLastRtpPacketTime(int channel) {
336 WEBRTC_ASSERT_CHANNEL(channel);
337 return channels_[channel]->last_rtp_packet_time;
339 int GetSendCNPayloadType(int channel, bool wideband) {
341 channels_[channel]->cn16_type :
342 channels_[channel]->cn8_type;
344 int GetSendTelephoneEventPayloadType(int channel) {
345 return channels_[channel]->dtmf_type;
347 int GetSendREDPayloadType(int channel) {
348 return channels_[channel]->red_type;
350 bool CheckPacket(int channel, const void* data, size_t len) {
351 bool result = !CheckNoPacket(channel);
353 std::string packet = channels_[channel]->packets.front();
355 channels_[channel]->packets.pop_front();
359 bool CheckNoPacket(int channel) {
360 return channels_[channel]->packets.empty();
366 void set_playout_fail_channel(int channel) {
367 playout_fail_channel_ = channel;
369 void set_send_fail_channel(int channel) {
370 send_fail_channel_ = channel;
405 int GetSendRtpExtensionId(int channel, const std::string& extension) {
406 WEBRTC_ASSERT_CHANNEL(channel);
408 return channels_[channel]->send_audio_level_ext_;
410 return channels_[channel]->send_absolute_sender_time_ext_;
414 int GetReceiveRtpExtensionId(int channel, const std::string& extension) {
415 WEBRTC_ASSERT_CHANNEL(channel);
417 return channels_[channel]->receive_audio_level_ext_;
419 return channels_[channel]->receive_absolute_sender_time_ext_;
457 WEBRTC_FUNC(DeleteChannel, (int channel)) {
458 WEBRTC_CHECK_CHANNEL(channel);
459 delete channels_[channel];
460 channels_.erase(channel);
463 WEBRTC_STUB(StartReceive, (int channel));
464 WEBRTC_FUNC(StartPlayout, (int channel)) {
465 if (playout_fail_channel_ != channel) {
466 WEBRTC_CHECK_CHANNEL(channel);
467 channels_[channel]->playout = true;
470 // When playout_fail_channel_ == channel, fail the StartPlayout on this
471 // channel.
475 WEBRTC_FUNC(StartSend, (int channel)) {
476 if (send_fail_channel_ != channel) {
477 WEBRTC_CHECK_CHANNEL(channel);
478 channels_[channel]->send = true;
481 // When send_fail_channel_ == channel, fail the StartSend on this
482 // channel.
486 WEBRTC_STUB(StopReceive, (int channel));
487 WEBRTC_FUNC(StopPlayout, (int channel)) {
488 WEBRTC_CHECK_CHANNEL(channel);
489 channels_[channel]->playout = false;
492 WEBRTC_FUNC(StopSend, (int channel)) {
493 WEBRTC_CHECK_CHANNEL(channel);
494 channels_[channel]->send = false;
519 WEBRTC_FUNC(SetSendCodec, (int channel, const webrtc::CodecInst& codec)) {
520 WEBRTC_CHECK_CHANNEL(channel);
528 channels_[channel]->send_codec = codec;
532 WEBRTC_FUNC(GetSendCodec, (int channel, webrtc::CodecInst& codec)) {
533 WEBRTC_CHECK_CHANNEL(channel);
534 codec = channels_[channel]->send_codec;
537 WEBRTC_STUB(SetSecondarySendCodec, (int channel,
540 WEBRTC_STUB(RemoveSecondarySendCodec, (int channel));
541 WEBRTC_STUB(GetSecondarySendCodec, (int channel,
543 WEBRTC_FUNC(GetRecCodec, (int channel, webrtc::CodecInst& codec)) {
544 WEBRTC_CHECK_CHANNEL(channel);
545 const Channel* c = channels_[channel];
563 WEBRTC_STUB(SetAMREncFormat, (int channel, webrtc::AmrMode mode));
564 WEBRTC_STUB(SetAMRDecFormat, (int channel, webrtc::AmrMode mode));
565 WEBRTC_STUB(SetAMRWbEncFormat, (int channel, webrtc::AmrMode mode));
566 WEBRTC_STUB(SetAMRWbDecFormat, (int channel, webrtc::AmrMode mode));
567 WEBRTC_STUB(SetISACInitTargetRate, (int channel, int rateBps,
569 WEBRTC_STUB(SetISACMaxRate, (int channel, int rateBps));
570 WEBRTC_STUB(SetISACMaxPayloadSize, (int channel, int sizeBytes));
571 WEBRTC_FUNC(SetRecPayloadType, (int channel,
573 WEBRTC_CHECK_CHANNEL(channel);
574 Channel* ch = channels_[channel];
599 WEBRTC_FUNC(SetSendCNPayloadType, (int channel, int type,
601 WEBRTC_CHECK_CHANNEL(channel);
603 channels_[channel]->cn8_type = type;
605 channels_[channel]->cn16_type = type;
609 WEBRTC_FUNC(GetRecPayloadType, (int channel, webrtc::CodecInst& codec)) {
610 WEBRTC_CHECK_CHANNEL(channel);
611 Channel* ch = channels_[channel];
624 WEBRTC_FUNC(SetVADStatus, (int channel, bool enable, webrtc::VadModes mode,
626 WEBRTC_CHECK_CHANNEL(channel);
627 if (channels_[channel]->send_codec.channels == 2) {
631 channels_[channel]->vad = enable;
634 WEBRTC_STUB(GetVADStatus, (int channel, bool& enabled,
638 WEBRTC_FUNC(SetFECStatus, (int channel, bool enable)) {
639 WEBRTC_CHECK_CHANNEL(channel);
640 if (_stricmp(channels_[channel]->send_codec.plname, "opus") != 0) {
645 channels_[channel]->codec_fec = enable;
648 WEBRTC_FUNC(GetFECStatus, (int channel, bool& enable)) {
649 WEBRTC_CHECK_CHANNEL(channel);
650 enable = channels_[channel]->codec_fec;
654 WEBRTC_FUNC(SetOpusMaxPlaybackRate, (int channel, int frequency_hz)) {
655 WEBRTC_CHECK_CHANNEL(channel);
656 if (_stricmp(channels_[channel]->send_codec.plname, "opus") != 0) {
661 channels_[channel]->max_encoding_bandwidth = kOpusBandwidthNb;
663 channels_[channel]->max_encoding_bandwidth = kOpusBandwidthMb;
665 channels_[channel]->max_encoding_bandwidth = kOpusBandwidthWb;
667 channels_[channel]->max_encoding_bandwidth = kOpusBandwidthSwb;
669 channels_[channel]->max_encoding_bandwidth = kOpusBandwidthFb;
675 WEBRTC_FUNC(SendTelephoneEvent, (int channel, int event_code,
677 channels_[channel]->dtmf_info.dtmf_event_code = event_code;
678 channels_[channel]->dtmf_info.dtmf_out_of_band = out_of_band;
679 channels_[channel]->dtmf_info.dtmf_length_ms = length_ms;
684 (int channel, unsigned char type)) {
685 channels_[channel]->dtmf_type = type;
689 (int channel, unsigned char& type));
693 WEBRTC_STUB(SetDtmfPlayoutStatus, (int channel, bool enable));
694 WEBRTC_STUB(GetDtmfPlayoutStatus, (int channel, bool& enabled));
707 WEBRTC_FUNC(StartPlayingFileLocally, (int channel, const char* fileNameUTF8,
711 WEBRTC_CHECK_CHANNEL(channel);
712 channels_[channel]->file = true;
715 WEBRTC_FUNC(StartPlayingFileLocally, (int channel, webrtc::InStream* stream,
719 WEBRTC_CHECK_CHANNEL(channel);
720 channels_[channel]->file = true;
723 WEBRTC_FUNC(StopPlayingFileLocally, (int channel)) {
724 WEBRTC_CHECK_CHANNEL(channel);
725 channels_[channel]->file = false;
728 WEBRTC_FUNC(IsPlayingFileLocally, (int channel)) {
729 WEBRTC_CHECK_CHANNEL(channel);
730 return (channels_[channel]->file) ? 1 : 0;
732 WEBRTC_STUB(ScaleLocalFilePlayout, (int channel, float scale));
733 WEBRTC_STUB(StartPlayingFileAsMicrophone, (int channel,
739 WEBRTC_STUB(StartPlayingFileAsMicrophone, (int channel,
744 WEBRTC_STUB(StopPlayingFileAsMicrophone, (int channel));
745 WEBRTC_STUB(IsPlayingFileAsMicrophone, (int channel));
746 WEBRTC_STUB(ScaleFileAsMicrophonePlayout, (int channel, float scale));
747 WEBRTC_STUB(StartRecordingPlayout, (int channel, const char* fileNameUTF8,
750 WEBRTC_STUB(StartRecordingPlayout, (int channel, webrtc::OutStream* stream,
752 WEBRTC_STUB(StopRecordingPlayout, (int channel));
797 WEBRTC_STUB(GetPlaybackPosition, (int channel, int& positionMs));
844 WEBRTC_FUNC_CONST(GetDecodingCallStatistics, (int channel,
846 WEBRTC_CHECK_CHANNEL(channel);
851 WEBRTC_FUNC(RegisterExternalTransport, (int channel,
853 WEBRTC_CHECK_CHANNEL(channel);
854 channels_[channel]->external_transport = true;
857 WEBRTC_FUNC(DeRegisterExternalTransport, (int channel)) {
858 WEBRTC_CHECK_CHANNEL(channel);
859 channels_[channel]->external_transport = false;
862 WEBRTC_FUNC(ReceivedRTPPacket, (int channel, const void* data,
864 WEBRTC_CHECK_CHANNEL(channel);
865 if (!channels_[channel]->external_transport) return -1;
866 channels_[channel]->packets.push_back(
870 WEBRTC_FUNC(ReceivedRTPPacket, (int channel, const void* data,
873 WEBRTC_CHECK_CHANNEL(channel);
874 if (ReceivedRTPPacket(channel, data, length) == -1) {
877 channels_[channel]->last_rtp_packet_time = packet_time;
881 WEBRTC_STUB(ReceivedRTCPPacket, (int channel, const void* data,
885 WEBRTC_STUB(RegisterRTPObserver, (int channel,
887 WEBRTC_STUB(DeRegisterRTPObserver, (int channel));
888 WEBRTC_STUB(RegisterRTCPObserver, (int channel,
890 WEBRTC_STUB(DeRegisterRTCPObserver, (int channel));
891 WEBRTC_FUNC(SetLocalSSRC, (int channel, unsigned int ssrc)) {
892 WEBRTC_CHECK_CHANNEL(channel);
893 channels_[channel]->send_ssrc = ssrc;
896 WEBRTC_FUNC(GetLocalSSRC, (int channel, unsigned int& ssrc)) {
897 WEBRTC_CHECK_CHANNEL(channel);
898 ssrc = channels_[channel]->send_ssrc;
901 WEBRTC_STUB(GetRemoteSSRC, (int channel, unsigned int& ssrc));
902 WEBRTC_FUNC(SetSendAudioLevelIndicationStatus, (int channel, bool enable,
904 WEBRTC_CHECK_CHANNEL(channel);
906 channels_[channel]->send_audio_level_ext_ = (enable) ? id : -1;
909 WEBRTC_FUNC(SetReceiveAudioLevelIndicationStatus, (int channel, bool enable,
911 WEBRTC_CHECK_CHANNEL(channel);
913 channels_[channel]->receive_audio_level_ext_ = (enable) ? id : -1;
916 WEBRTC_FUNC(SetSendAbsoluteSenderTimeStatus, (int channel, bool enable,
918 WEBRTC_CHECK_CHANNEL(channel);
920 channels_[channel]->send_absolute_sender_time_ext_ = (enable) ? id : -1;
923 WEBRTC_FUNC(SetReceiveAbsoluteSenderTimeStatus, (int channel, bool enable,
925 WEBRTC_CHECK_CHANNEL(channel);
927 channels_[channel]->receive_absolute_sender_time_ext_ = (enable) ? id : -1;
931 WEBRTC_STUB(GetRemoteCSRCs, (int channel, unsigned int arrCSRC[15]));
932 WEBRTC_STUB(SetRTCPStatus, (int channel, bool enable));
933 WEBRTC_STUB(GetRTCPStatus, (int channel, bool& enabled));
934 WEBRTC_STUB(SetRTCP_CNAME, (int channel, const char cname[256]));
935 WEBRTC_STUB(GetRTCP_CNAME, (int channel, char cname[256]));
936 WEBRTC_STUB(GetRemoteRTCP_CNAME, (int channel, char* cname));
937 WEBRTC_STUB(GetRemoteRTCPData, (int channel, unsigned int& NTPHigh,
943 WEBRTC_STUB(GetRemoteRTCPSenderInfo, (int channel,
946 (int channel, std::vector<webrtc::ReportBlock>* receive_blocks)) {
947 WEBRTC_CHECK_CHANNEL(channel);
949 block.source_SSRC = channels_[channel]->send_ssrc;
950 webrtc::CodecInst send_codec = channels_[channel]->send_codec;
962 WEBRTC_STUB(SendApplicationDefinedRTCPPacket, (int channel,
967 WEBRTC_STUB(GetRTPStatistics, (int channel, unsigned int& averageJitterMs,
970 WEBRTC_FUNC(GetRTCPStatistics, (int channel, webrtc::CallStatistics& stats)) {
971 WEBRTC_CHECK_CHANNEL(channel);
984 WEBRTC_FUNC(SetREDStatus, (int channel, bool enable, int redPayloadtype)) {
985 return SetFECStatus(channel, enable, redPayloadtype);
990 WEBRTC_FUNC(SetFECStatus, (int channel, bool enable, int redPayloadtype)) {
991 WEBRTC_CHECK_CHANNEL(channel);
992 channels_[channel]->red = enable;
993 channels_[channel]->red_type = redPayloadtype;
997 WEBRTC_FUNC(GetREDStatus, (int channel, bool& enable, int& redPayloadtype)) {
998 return GetFECStatus(channel, enable, redPayloadtype);
1003 WEBRTC_FUNC(GetFECStatus, (int channel, bool& enable, int& redPayloadtype)) {
1004 WEBRTC_CHECK_CHANNEL(channel);
1005 enable = channels_[channel]->red;
1006 redPayloadtype = channels_[channel]->red_type;
1009 WEBRTC_FUNC(SetNACKStatus, (int channel, bool enable, int maxNoPackets)) {
1010 WEBRTC_CHECK_CHANNEL(channel);
1011 channels_[channel]->nack = enable;
1012 channels_[channel]->nack_max_packets = maxNoPackets;
1015 WEBRTC_STUB(StartRTPDump, (int channel, const char* fileNameUTF8,
1017 WEBRTC_STUB(StopRTPDump, (int channel, webrtc::RTPDirections direction));
1018 WEBRTC_STUB(RTPDumpIsActive, (int channel, webrtc::RTPDirections direction));
1019 WEBRTC_STUB(InsertExtraRTPPacket, (int channel, unsigned char payloadType,
1022 WEBRTC_STUB(GetLastRemoteTimeStamp, (int channel,
1024 WEBRTC_FUNC(SetVideoEngineBWETarget, (int channel,
1027 WEBRTC_CHECK_CHANNEL(channel);
1028 channels_[channel]->vie_network = vie_network;
1029 channels_[channel]->video_channel = video_channel;
1032 // attempt to call functions on the interface stored in the channel.
1040 WEBRTC_STUB(GetPlayoutTimestamp, (int channel, unsigned int& timestamp));
1042 WEBRTC_STUB(SetInitTimestamp, (int channel, unsigned int timestamp));
1043 WEBRTC_STUB(SetInitSequenceNumber, (int channel, short sequenceNumber));
1044 WEBRTC_STUB(SetMinimumPlayoutDelay, (int channel, int delayMs));
1045 WEBRTC_STUB(SetInitialPlayoutDelay, (int channel, int delay_ms));
1046 WEBRTC_STUB(GetDelayEstimate, (int channel, int* jitter_buffer_delay_ms,
1048 WEBRTC_STUB_CONST(GetLeastRequiredDelayMs, (int channel));
1065 WEBRTC_FUNC(SetChannelOutputVolumeScaling, (int channel, float scale)) {
1066 WEBRTC_CHECK_CHANNEL(channel);
1067 channels_[channel]->volume_scale= scale;
1070 WEBRTC_FUNC(GetChannelOutputVolumeScaling, (int channel, float& scale)) {
1071 WEBRTC_CHECK_CHANNEL(channel);
1072 scale = channels_[channel]->volume_scale;
1075 WEBRTC_FUNC(SetOutputVolumePan, (int channel, float left, float right)) {
1076 WEBRTC_CHECK_CHANNEL(channel);
1077 channels_[channel]->volume_pan_left = left;
1078 channels_[channel]->volume_pan_right = right;
1081 WEBRTC_FUNC(GetOutputVolumePan, (int channel, float& left, float& right)) {
1082 WEBRTC_CHECK_CHANNEL(channel);
1083 left = channels_[channel]->volume_pan_left;
1084 right = channels_[channel]->volume_pan_right;
1143 WEBRTC_STUB(SetRxNsStatus, (int channel, bool enable, webrtc::NsModes mode));
1144 WEBRTC_STUB(GetRxNsStatus, (int channel, bool& enabled,
1146 WEBRTC_FUNC(SetRxAgcStatus, (int channel, bool enable,
1148 channels_[channel]->rx_agc_enabled = enable;
1149 channels_[channel]->rx_agc_mode = mode;
1152 WEBRTC_FUNC(GetRxAgcStatus, (int channel, bool& enabled,
1154 enabled = channels_[channel]->rx_agc_enabled;
1155 mode = channels_[channel]->rx_agc_mode;
1159 WEBRTC_FUNC(SetRxAgcConfig, (int channel, webrtc::AgcConfig config)) {
1160 channels_[channel]->rx_agc_config = config;
1163 WEBRTC_FUNC(GetRxAgcConfig, (int channel, webrtc::AgcConfig& config)) {
1164 config = channels_[channel]->rx_agc_config;
1169 WEBRTC_STUB(DeRegisterRxVadObserver, (int channel));
1170 WEBRTC_STUB(VoiceActivityIndicator, (int channel));
1214 bool WasSendTelephoneEventCalled(int channel, int event_code, int length_ms) {
1215 return (channels_[channel]->dtmf_info.dtmf_event_code == event_code &&
1216 channels_[channel]->dtmf_info.dtmf_out_of_band == true &&
1217 channels_[channel]->dtmf_info.dtmf_length_ms == length_ms);
1225 (int channel, webrtc::ProcessingTypes type,
1227 WEBRTC_CHECK_CHANNEL(channel);
1228 if (channels_[channel]->media_processor_registered) {
1231 channels_[channel]->media_processor_registered = true;
1236 (int channel, webrtc::ProcessingTypes type)) {
1237 WEBRTC_CHECK_CHANNEL(channel);
1238 if (!channels_[channel]->media_processor_registered) {
1241 channels_[channel]->media_processor_registered = false;
1253 WEBRTC_STUB(GetAudioFrame, (int channel, int desired_sample_rate_hz,
1255 WEBRTC_STUB(SetExternalMixing, (int channel, bool enable));