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

Side by Side Diff: talk/media/base/mediaengine.h

Issue 1361633002: Remove the [Un]RegisterVoiceProcessor() API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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
« no previous file with comments | « talk/media/base/fakemediaprocessor.h ('k') | talk/media/base/videocapturer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 virtual const std::vector<VideoCodec>& video_codecs() = 0; 122 virtual const std::vector<VideoCodec>& video_codecs() = 0;
123 virtual const std::vector<RtpHeaderExtension>& 123 virtual const std::vector<RtpHeaderExtension>&
124 video_rtp_header_extensions() = 0; 124 video_rtp_header_extensions() = 0;
125 125
126 // Logging control 126 // Logging control
127 virtual void SetVoiceLogging(int min_sev, const char* filter) = 0; 127 virtual void SetVoiceLogging(int min_sev, const char* filter) = 0;
128 virtual void SetVideoLogging(int min_sev, const char* filter) = 0; 128 virtual void SetVideoLogging(int min_sev, const char* filter) = 0;
129 129
130 // Starts AEC dump using existing file. 130 // Starts AEC dump using existing file.
131 virtual bool StartAecDump(rtc::PlatformFile file) = 0; 131 virtual bool StartAecDump(rtc::PlatformFile file) = 0;
132
133 // Voice processors for effects.
134 virtual bool RegisterVoiceProcessor(uint32 ssrc,
135 VoiceProcessor* video_processor,
136 MediaProcessorDirection direction) = 0;
137 virtual bool UnregisterVoiceProcessor(uint32 ssrc,
138 VoiceProcessor* video_processor,
139 MediaProcessorDirection direction) = 0;
140 }; 132 };
141 133
142 134
143 #if !defined(DISABLE_MEDIA_ENGINE_FACTORY) 135 #if !defined(DISABLE_MEDIA_ENGINE_FACTORY)
144 class MediaEngineFactory { 136 class MediaEngineFactory {
145 public: 137 public:
146 typedef cricket::MediaEngineInterface* (*MediaEngineCreateFunction)(); 138 typedef cricket::MediaEngineInterface* (*MediaEngineCreateFunction)();
147 // Creates a media engine, using either the compiled system default or the 139 // Creates a media engine, using either the compiled system default or the
148 // creation function specified in SetCreateFunction, if specified. 140 // creation function specified in SetCreateFunction, if specified.
149 static MediaEngineInterface* Create(); 141 static MediaEngineInterface* Create();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 voice_.SetLogging(min_sev, filter); 226 voice_.SetLogging(min_sev, filter);
235 } 227 }
236 virtual void SetVideoLogging(int min_sev, const char* filter) { 228 virtual void SetVideoLogging(int min_sev, const char* filter) {
237 video_.SetLogging(min_sev, filter); 229 video_.SetLogging(min_sev, filter);
238 } 230 }
239 231
240 virtual bool StartAecDump(rtc::PlatformFile file) { 232 virtual bool StartAecDump(rtc::PlatformFile file) {
241 return voice_.StartAecDump(file); 233 return voice_.StartAecDump(file);
242 } 234 }
243 235
244 virtual bool RegisterVoiceProcessor(uint32 ssrc,
245 VoiceProcessor* processor,
246 MediaProcessorDirection direction) {
247 return voice_.RegisterProcessor(ssrc, processor, direction);
248 }
249 virtual bool UnregisterVoiceProcessor(uint32 ssrc,
250 VoiceProcessor* processor,
251 MediaProcessorDirection direction) {
252 return voice_.UnregisterProcessor(ssrc, processor, direction);
253 }
254
255 protected: 236 protected:
256 VOICE voice_; 237 VOICE voice_;
257 VIDEO video_; 238 VIDEO video_;
258 }; 239 };
259 240
260 // NullVoiceEngine can be used with CompositeMediaEngine in the case where only 241 // NullVoiceEngine can be used with CompositeMediaEngine in the case where only
261 // a video engine is desired. 242 // a video engine is desired.
262 class NullVoiceEngine { 243 class NullVoiceEngine {
263 public: 244 public:
264 bool Init(rtc::Thread* worker_thread) { return true; } 245 bool Init(rtc::Thread* worker_thread) { return true; }
(...skipping 14 matching lines...) Expand all
279 return true; 260 return true;
280 } 261 }
281 bool SetOutputVolume(int level) { return true; } 262 bool SetOutputVolume(int level) { return true; }
282 int GetInputLevel() { return 0; } 263 int GetInputLevel() { return 0; }
283 const std::vector<AudioCodec>& codecs() { return codecs_; } 264 const std::vector<AudioCodec>& codecs() { return codecs_; }
284 const std::vector<RtpHeaderExtension>& rtp_header_extensions() { 265 const std::vector<RtpHeaderExtension>& rtp_header_extensions() {
285 return rtp_header_extensions_; 266 return rtp_header_extensions_;
286 } 267 }
287 void SetLogging(int min_sev, const char* filter) {} 268 void SetLogging(int min_sev, const char* filter) {}
288 bool StartAecDump(rtc::PlatformFile file) { return false; } 269 bool StartAecDump(rtc::PlatformFile file) { return false; }
289 bool RegisterProcessor(uint32 ssrc,
290 VoiceProcessor* voice_processor,
291 MediaProcessorDirection direction) { return true; }
292 bool UnregisterProcessor(uint32 ssrc,
293 VoiceProcessor* voice_processor,
294 MediaProcessorDirection direction) { return true; }
295 270
296 private: 271 private:
297 std::vector<AudioCodec> codecs_; 272 std::vector<AudioCodec> codecs_;
298 std::vector<RtpHeaderExtension> rtp_header_extensions_; 273 std::vector<RtpHeaderExtension> rtp_header_extensions_;
299 }; 274 };
300 275
301 // NullVideoEngine can be used with CompositeMediaEngine in the case where only 276 // NullVideoEngine can be used with CompositeMediaEngine in the case where only
302 // a voice engine is desired. 277 // a voice engine is desired.
303 class NullVideoEngine { 278 class NullVideoEngine {
304 public: 279 public:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 class DataEngineInterface { 312 class DataEngineInterface {
338 public: 313 public:
339 virtual ~DataEngineInterface() {} 314 virtual ~DataEngineInterface() {}
340 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; 315 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0;
341 virtual const std::vector<DataCodec>& data_codecs() = 0; 316 virtual const std::vector<DataCodec>& data_codecs() = 0;
342 }; 317 };
343 318
344 } // namespace cricket 319 } // namespace cricket
345 320
346 #endif // TALK_MEDIA_BASE_MEDIAENGINE_H_ 321 #endif // TALK_MEDIA_BASE_MEDIAENGINE_H_
OLDNEW
« no previous file with comments | « talk/media/base/fakemediaprocessor.h ('k') | talk/media/base/videocapturer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698