OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 virtual void SetSink(std::unique_ptr<AudioSinkInterface> sink); | 89 virtual void SetSink(std::unique_ptr<AudioSinkInterface> sink); |
90 virtual void SetInputMute(bool muted); | 90 virtual void SetInputMute(bool muted); |
91 virtual void RegisterExternalTransport(Transport* transport); | 91 virtual void RegisterExternalTransport(Transport* transport); |
92 virtual void DeRegisterExternalTransport(); | 92 virtual void DeRegisterExternalTransport(); |
93 virtual void OnRtpPacket(const RtpPacketReceived& packet); | 93 virtual void OnRtpPacket(const RtpPacketReceived& packet); |
94 virtual bool ReceivedRTCPPacket(const uint8_t* packet, size_t length); | 94 virtual bool ReceivedRTCPPacket(const uint8_t* packet, size_t length); |
95 virtual const rtc::scoped_refptr<AudioDecoderFactory>& | 95 virtual const rtc::scoped_refptr<AudioDecoderFactory>& |
96 GetAudioDecoderFactory() const; | 96 GetAudioDecoderFactory() const; |
97 virtual void SetChannelOutputVolumeScaling(float scaling); | 97 virtual void SetChannelOutputVolumeScaling(float scaling); |
98 virtual void SetRtcEventLog(RtcEventLog* event_log); | 98 virtual void SetRtcEventLog(RtcEventLog* event_log); |
99 virtual void EnableAudioNetworkAdaptor(const std::string& config_string); | |
100 virtual void DisableAudioNetworkAdaptor(); | |
101 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, | |
102 int max_frame_length_ms); | |
103 virtual AudioMixer::Source::AudioFrameInfo GetAudioFrameWithInfo( | 99 virtual AudioMixer::Source::AudioFrameInfo GetAudioFrameWithInfo( |
104 int sample_rate_hz, | 100 int sample_rate_hz, |
105 AudioFrame* audio_frame); | 101 AudioFrame* audio_frame); |
106 virtual int NeededFrequency() const; | 102 virtual int NeededFrequency() const; |
107 virtual void SetTransportOverhead(int transport_overhead_per_packet); | 103 virtual void SetTransportOverhead(int transport_overhead_per_packet); |
108 virtual void AssociateSendChannel(const ChannelProxy& send_channel_proxy); | 104 virtual void AssociateSendChannel(const ChannelProxy& send_channel_proxy); |
109 virtual void DisassociateSendChannel(); | 105 virtual void DisassociateSendChannel(); |
110 virtual void GetRtpRtcp(RtpRtcp** rtp_rtcp, | 106 virtual void GetRtpRtcp(RtpRtcp** rtp_rtcp, |
111 RtpReceiver** rtp_receiver) const; | 107 RtpReceiver** rtp_receiver) const; |
112 virtual uint32_t GetPlayoutTimestamp() const; | 108 virtual uint32_t GetPlayoutTimestamp() const; |
113 virtual void SetMinimumPlayoutDelay(int delay_ms); | 109 virtual void SetMinimumPlayoutDelay(int delay_ms); |
114 virtual void SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats); | 110 virtual void SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats); |
115 virtual bool GetRecCodec(CodecInst* codec_inst) const; | 111 virtual bool GetRecCodec(CodecInst* codec_inst) const; |
116 virtual bool GetSendCodec(CodecInst* codec_inst) const; | |
117 virtual bool SetVADStatus(bool enable); | |
118 virtual bool SetCodecFECStatus(bool enable); | |
119 virtual bool SetOpusDtx(bool enable); | |
120 virtual bool SetOpusMaxPlaybackRate(int frequency_hz); | |
121 virtual bool SetSendCodec(const CodecInst& codec_inst); | |
122 virtual bool SetSendCNPayloadType(int type, PayloadFrequencies frequency); | |
123 | 112 |
124 private: | 113 private: |
125 Channel* channel() const; | 114 Channel* channel() const; |
126 | 115 |
127 // Thread checkers document and lock usage of some methods on voe::Channel to | 116 // Thread checkers document and lock usage of some methods on voe::Channel to |
128 // specific threads we know about. The goal is to eventually split up | 117 // specific threads we know about. The goal is to eventually split up |
129 // voe::Channel into parts with single-threaded semantics, and thereby reduce | 118 // voe::Channel into parts with single-threaded semantics, and thereby reduce |
130 // the need for locks. | 119 // the need for locks. |
131 rtc::ThreadChecker worker_thread_checker_; | 120 rtc::ThreadChecker worker_thread_checker_; |
132 rtc::ThreadChecker module_process_thread_checker_; | 121 rtc::ThreadChecker module_process_thread_checker_; |
133 // Methods accessed from audio and video threads are checked for sequential- | 122 // Methods accessed from audio and video threads are checked for sequential- |
134 // only access. We don't necessarily own and control these threads, so thread | 123 // only access. We don't necessarily own and control these threads, so thread |
135 // checkers cannot be used. E.g. Chromium may transfer "ownership" from one | 124 // checkers cannot be used. E.g. Chromium may transfer "ownership" from one |
136 // audio thread to another, but access is still sequential. | 125 // audio thread to another, but access is still sequential. |
137 rtc::RaceChecker audio_thread_race_checker_; | 126 rtc::RaceChecker audio_thread_race_checker_; |
138 rtc::RaceChecker video_capture_thread_race_checker_; | 127 rtc::RaceChecker video_capture_thread_race_checker_; |
139 ChannelOwner channel_owner_; | 128 ChannelOwner channel_owner_; |
140 | 129 |
141 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); | 130 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); |
142 }; | 131 }; |
143 } // namespace voe | 132 } // namespace voe |
144 } // namespace webrtc | 133 } // namespace webrtc |
145 | 134 |
146 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ | 135 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ |
OLD | NEW |