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

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

Issue 1949533002: WIP: Move the creation of AudioCodecFactory into PeerConnectionFactory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 15 matching lines...) Expand all
26 #include "webrtc/media/base/mediachannel.h" 26 #include "webrtc/media/base/mediachannel.h"
27 #include "webrtc/media/base/mediacommon.h" 27 #include "webrtc/media/base/mediacommon.h"
28 #include "webrtc/media/base/videocapturer.h" 28 #include "webrtc/media/base/videocapturer.h"
29 #include "webrtc/media/base/videocommon.h" 29 #include "webrtc/media/base/videocommon.h"
30 30
31 #if defined(GOOGLE_CHROME_BUILD) || defined(CHROMIUM_BUILD) 31 #if defined(GOOGLE_CHROME_BUILD) || defined(CHROMIUM_BUILD)
32 #define DISABLE_MEDIA_ENGINE_FACTORY 32 #define DISABLE_MEDIA_ENGINE_FACTORY
33 #endif 33 #endif
34 34
35 namespace webrtc { 35 namespace webrtc {
36 class AudioDecoderFactory;
36 class AudioDeviceModule; 37 class AudioDeviceModule;
37 class Call; 38 class Call;
38 } 39 }
39 40
40 namespace cricket { 41 namespace cricket {
41 42
42 class VideoCapturer; 43 class VideoCapturer;
43 44
44 struct RtpCapabilities { 45 struct RtpCapabilities {
45 std::vector<RtpHeaderExtension> header_extensions; 46 std::vector<RtpHeaderExtension> header_extensions;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 private: 118 private:
118 static MediaEngineCreateFunction create_function_; 119 static MediaEngineCreateFunction create_function_;
119 }; 120 };
120 #endif 121 #endif
121 122
122 // CompositeMediaEngine constructs a MediaEngine from separate 123 // CompositeMediaEngine constructs a MediaEngine from separate
123 // voice and video engine classes. 124 // voice and video engine classes.
124 template<class VOICE, class VIDEO> 125 template<class VOICE, class VIDEO>
125 class CompositeMediaEngine : public MediaEngineInterface { 126 class CompositeMediaEngine : public MediaEngineInterface {
126 public: 127 public:
127 explicit CompositeMediaEngine(webrtc::AudioDeviceModule* adm) : voice_(adm) {} 128 explicit CompositeMediaEngine(
129 webrtc::AudioDeviceModule* adm,
130 std::shared_ptr<webrtc::AudioDecoderFactory> audio_decoder_factory)
131 : voice_(adm, std::move(audio_decoder_factory)) {}
128 virtual ~CompositeMediaEngine() {} 132 virtual ~CompositeMediaEngine() {}
129 virtual bool Init() { 133 virtual bool Init() {
130 video_.Init(); 134 video_.Init();
131 return true; 135 return true;
132 } 136 }
133 137
134 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { 138 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const {
135 return voice_.GetAudioState(); 139 return voice_.GetAudioState();
136 } 140 }
137 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, 141 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 virtual ~DataEngineInterface() {} 202 virtual ~DataEngineInterface() {}
199 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; 203 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0;
200 virtual const std::vector<DataCodec>& data_codecs() = 0; 204 virtual const std::vector<DataCodec>& data_codecs() = 0;
201 }; 205 };
202 206
203 webrtc::RtpParameters CreateRtpParametersWithOneEncoding(); 207 webrtc::RtpParameters CreateRtpParametersWithOneEncoding();
204 208
205 } // namespace cricket 209 } // namespace cricket
206 210
207 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ 211 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698