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

Side by Side Diff: webrtc/voice_engine/channel_proxy.h

Issue 2770233003: Implemented the GetSources() in native code. (Closed)
Patch Set: Add a direct dependency to the webrtc/voice_engine/BUILD.gn Created 3 years, 8 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
OLDNEW
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
11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ 11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_
12 #define WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_
13 13
14 #include "webrtc/api/audio/audio_mixer.h" 14 #include "webrtc/api/audio/audio_mixer.h"
15 #include "webrtc/api/rtpreceiverinterface.h"
15 #include "webrtc/base/constructormagic.h" 16 #include "webrtc/base/constructormagic.h"
16 #include "webrtc/base/race_checker.h" 17 #include "webrtc/base/race_checker.h"
17 #include "webrtc/base/thread_checker.h" 18 #include "webrtc/base/thread_checker.h"
18 #include "webrtc/voice_engine/channel_manager.h" 19 #include "webrtc/voice_engine/channel_manager.h"
19 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" 20 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
20 21
21 #include <memory> 22 #include <memory>
22 #include <string> 23 #include <string>
23 #include <vector> 24 #include <vector>
24 25
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 virtual bool SetVADStatus(bool enable); 115 virtual bool SetVADStatus(bool enable);
115 virtual bool SetCodecFECStatus(bool enable); 116 virtual bool SetCodecFECStatus(bool enable);
116 virtual bool SetOpusDtx(bool enable); 117 virtual bool SetOpusDtx(bool enable);
117 virtual bool SetOpusMaxPlaybackRate(int frequency_hz); 118 virtual bool SetOpusMaxPlaybackRate(int frequency_hz);
118 virtual bool SetSendCodec(const CodecInst& codec_inst); 119 virtual bool SetSendCodec(const CodecInst& codec_inst);
119 virtual bool SetSendCNPayloadType(int type, PayloadFrequencies frequency); 120 virtual bool SetSendCNPayloadType(int type, PayloadFrequencies frequency);
120 virtual void OnTwccBasedUplinkPacketLossRate(float packet_loss_rate); 121 virtual void OnTwccBasedUplinkPacketLossRate(float packet_loss_rate);
121 virtual void OnRecoverableUplinkPacketLossRate( 122 virtual void OnRecoverableUplinkPacketLossRate(
122 float recoverable_packet_loss_rate); 123 float recoverable_packet_loss_rate);
123 virtual void RegisterLegacyReceiveCodecs(); 124 virtual void RegisterLegacyReceiveCodecs();
125 virtual std::vector<webrtc::RtpSource> GetSources() const;
124 126
125 private: 127 private:
126 Channel* channel() const; 128 Channel* channel() const;
127 129
128 // Thread checkers document and lock usage of some methods on voe::Channel to 130 // Thread checkers document and lock usage of some methods on voe::Channel to
129 // specific threads we know about. The goal is to eventually split up 131 // specific threads we know about. The goal is to eventually split up
130 // voe::Channel into parts with single-threaded semantics, and thereby reduce 132 // voe::Channel into parts with single-threaded semantics, and thereby reduce
131 // the need for locks. 133 // the need for locks.
132 rtc::ThreadChecker worker_thread_checker_; 134 rtc::ThreadChecker worker_thread_checker_;
133 rtc::ThreadChecker module_process_thread_checker_; 135 rtc::ThreadChecker module_process_thread_checker_;
134 // Methods accessed from audio and video threads are checked for sequential- 136 // Methods accessed from audio and video threads are checked for sequential-
135 // only access. We don't necessarily own and control these threads, so thread 137 // only access. We don't necessarily own and control these threads, so thread
136 // checkers cannot be used. E.g. Chromium may transfer "ownership" from one 138 // checkers cannot be used. E.g. Chromium may transfer "ownership" from one
137 // audio thread to another, but access is still sequential. 139 // audio thread to another, but access is still sequential.
138 rtc::RaceChecker audio_thread_race_checker_; 140 rtc::RaceChecker audio_thread_race_checker_;
139 rtc::RaceChecker video_capture_thread_race_checker_; 141 rtc::RaceChecker video_capture_thread_race_checker_;
140 ChannelOwner channel_owner_; 142 ChannelOwner channel_owner_;
141 143
142 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); 144 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy);
143 }; 145 };
144 } // namespace voe 146 } // namespace voe
145 } // namespace webrtc 147 } // namespace webrtc
146 148
147 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ 149 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698