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

Side by Side Diff: talk/media/webrtc/webrtcvoiceengine.h

Issue 1457653003: Remove SetVideoLogging/SetAudioLogging from ChannelManager and down the stack. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: moar dy Created 5 years, 1 month 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 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 bool GetOutputVolume(int* level); 79 bool GetOutputVolume(int* level);
80 bool SetOutputVolume(int level); 80 bool SetOutputVolume(int level);
81 int GetInputLevel(); 81 int GetInputLevel();
82 82
83 const std::vector<AudioCodec>& codecs(); 83 const std::vector<AudioCodec>& codecs();
84 bool FindCodec(const AudioCodec& codec); 84 bool FindCodec(const AudioCodec& codec);
85 bool FindWebRtcCodec(const AudioCodec& codec, webrtc::CodecInst* gcodec); 85 bool FindWebRtcCodec(const AudioCodec& codec, webrtc::CodecInst* gcodec);
86 86
87 const std::vector<RtpHeaderExtension>& rtp_header_extensions() const; 87 const std::vector<RtpHeaderExtension>& rtp_header_extensions() const;
88 88
89 void SetLogging(int min_sev, const char* filter);
90
91 // For tracking WebRtc channels. Needed because we have to pause them 89 // For tracking WebRtc channels. Needed because we have to pause them
92 // all when switching devices. 90 // all when switching devices.
93 // May only be called by WebRtcVoiceMediaChannel. 91 // May only be called by WebRtcVoiceMediaChannel.
94 void RegisterChannel(WebRtcVoiceMediaChannel* channel); 92 void RegisterChannel(WebRtcVoiceMediaChannel* channel);
95 void UnregisterChannel(WebRtcVoiceMediaChannel* channel); 93 void UnregisterChannel(WebRtcVoiceMediaChannel* channel);
96 94
97 // Called by WebRtcVoiceMediaChannel to set a gain offset from 95 // Called by WebRtcVoiceMediaChannel to set a gain offset from
98 // the default AGC target level. 96 // the default AGC target level.
99 bool AdjustAgcLevel(int delta); 97 bool AdjustAgcLevel(int delta);
100 98
(...skipping 14 matching lines...) Expand all
115 bool StartRtcEventLog(rtc::PlatformFile file); 113 bool StartRtcEventLog(rtc::PlatformFile file);
116 114
117 // Stops recording the RtcEventLog. 115 // Stops recording the RtcEventLog.
118 void StopRtcEventLog(); 116 void StopRtcEventLog();
119 117
120 private: 118 private:
121 void Construct(); 119 void Construct();
122 void ConstructCodecs(); 120 void ConstructCodecs();
123 bool GetVoeCodec(int index, webrtc::CodecInst* codec); 121 bool GetVoeCodec(int index, webrtc::CodecInst* codec);
124 bool InitInternal(); 122 bool InitInternal();
125 void SetTraceFilter(int filter); 123 void SetTraceFilter(int filter); // !!!!!!!!!! Remove?
126 void SetTraceOptions(const std::string& options); 124 void SetTraceOptions(const std::string& options); // !!!!!!!!!! Remove?
pthatcher1 2015/11/18 19:26:26 If these only have an effect when SetLogging is ca
the sun 2015/11/19 15:55:12 Done.
127 // Every option that is "set" will be applied. Every option not "set" will be 125 // Every option that is "set" will be applied. Every option not "set" will be
128 // ignored. This allows us to selectively turn on and off different options 126 // ignored. This allows us to selectively turn on and off different options
129 // easily at any time. 127 // easily at any time.
130 bool ApplyOptions(const AudioOptions& options); 128 bool ApplyOptions(const AudioOptions& options);
131 129
132 // webrtc::TraceCallback: 130 // webrtc::TraceCallback:
133 void Print(webrtc::TraceLevel level, const char* trace, int length) override; 131 void Print(webrtc::TraceLevel level, const char* trace, int length) override;
134 132
135 // Given the device type, name, and id, find device id. Return true and 133 // Given the device type, name, and id, find device id. Return true and
136 // set the output parameter rtc_id if successful. 134 // set the output parameter rtc_id if successful.
137 bool FindWebRtcAudioDeviceId( 135 bool FindWebRtcAudioDeviceId(
138 bool is_input, const std::string& dev_name, int dev_id, int* rtc_id); 136 bool is_input, const std::string& dev_name, int dev_id, int* rtc_id);
139 137
140 void StartAecDump(const std::string& filename); 138 void StartAecDump(const std::string& filename);
141 int CreateVoEChannel(); 139 int CreateVoEChannel();
142 140
143 static const int kDefaultLogSeverity = rtc::LS_WARNING; 141 static const int kDefaultLogSeverity = rtc::LS_WARNING;
144 142
145 rtc::ThreadChecker signal_thread_checker_; 143 rtc::ThreadChecker signal_thread_checker_;
146 rtc::ThreadChecker worker_thread_checker_; 144 rtc::ThreadChecker worker_thread_checker_;
147 145
148 // The primary instance of WebRtc VoiceEngine. 146 // The primary instance of WebRtc VoiceEngine.
149 rtc::scoped_ptr<VoEWrapper> voe_wrapper_; 147 rtc::scoped_ptr<VoEWrapper> voe_wrapper_;
150 rtc::scoped_ptr<VoETraceWrapper> tracing_; 148 rtc::scoped_ptr<VoETraceWrapper> tracing_;
151 rtc::scoped_refptr<webrtc::AudioState> audio_state_; 149 rtc::scoped_refptr<webrtc::AudioState> audio_state_;
152 // The external audio device manager 150 // The external audio device manager
153 webrtc::AudioDeviceModule* adm_ = nullptr; 151 webrtc::AudioDeviceModule* adm_ = nullptr;
154 int log_filter_; 152 int log_filter_;
155 std::string log_options_; 153 std::string log_options_; // !!!!!!!!!!! Remove?
pthatcher1 2015/11/18 19:26:26 If SetLogging is the only thing that sets it, and
the sun 2015/11/19 15:55:12 Yes, as well as some other stuff.
156 bool is_dumping_aec_ = false; 154 bool is_dumping_aec_ = false;
157 std::vector<AudioCodec> codecs_; 155 std::vector<AudioCodec> codecs_;
158 std::vector<RtpHeaderExtension> rtp_header_extensions_; 156 std::vector<RtpHeaderExtension> rtp_header_extensions_;
159 std::vector<WebRtcVoiceMediaChannel*> channels_; 157 std::vector<WebRtcVoiceMediaChannel*> channels_;
160 webrtc::AgcConfig default_agc_config_; 158 webrtc::AgcConfig default_agc_config_;
161 159
162 webrtc::Config voe_config_; 160 webrtc::Config voe_config_;
163 161
164 bool initialized_ = false; 162 bool initialized_ = false;
165 AudioOptions options_; 163 AudioOptions options_;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // the WebRtc thread must be synchronized with edits on the worker thread. 325 // the WebRtc thread must be synchronized with edits on the worker thread.
328 // Reads on the worker thread are ok. 326 // Reads on the worker thread are ok.
329 std::vector<RtpHeaderExtension> receive_extensions_; 327 std::vector<RtpHeaderExtension> receive_extensions_;
330 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; 328 std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
331 329
332 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); 330 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
333 }; 331 };
334 } // namespace cricket 332 } // namespace cricket
335 333
336 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ 334 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698