OLD | NEW |
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 |
11 #ifndef WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ | 11 #ifndef WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ |
12 #define WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ | 12 #define WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ |
13 | 13 |
14 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) | 14 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) |
15 #include <CoreAudio/CoreAudio.h> | 15 #include <CoreAudio/CoreAudio.h> |
16 #endif | 16 #endif |
17 | 17 |
18 #include <string> | 18 #include <string> |
19 #include <vector> | 19 #include <vector> |
20 | 20 |
| 21 #include "webrtc/api/audio/audio_mixer.h" |
21 #include "webrtc/api/call/audio_state.h" | 22 #include "webrtc/api/call/audio_state.h" |
22 #include "webrtc/api/rtpparameters.h" | 23 #include "webrtc/api/rtpparameters.h" |
23 #include "webrtc/base/fileutils.h" | 24 #include "webrtc/base/fileutils.h" |
24 #include "webrtc/base/sigslotrepeater.h" | 25 #include "webrtc/base/sigslotrepeater.h" |
25 #include "webrtc/media/base/codec.h" | 26 #include "webrtc/media/base/codec.h" |
26 #include "webrtc/media/base/mediachannel.h" | 27 #include "webrtc/media/base/mediachannel.h" |
27 #include "webrtc/media/base/videocommon.h" | 28 #include "webrtc/media/base/videocommon.h" |
28 #include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" | 29 #include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" |
29 | 30 |
30 #if defined(GOOGLE_CHROME_BUILD) || defined(CHROMIUM_BUILD) | 31 #if defined(GOOGLE_CHROME_BUILD) || defined(CHROMIUM_BUILD) |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 private: | 104 private: |
104 static MediaEngineCreateFunction create_function_; | 105 static MediaEngineCreateFunction create_function_; |
105 }; | 106 }; |
106 #endif | 107 #endif |
107 | 108 |
108 // CompositeMediaEngine constructs a MediaEngine from separate | 109 // CompositeMediaEngine constructs a MediaEngine from separate |
109 // voice and video engine classes. | 110 // voice and video engine classes. |
110 template<class VOICE, class VIDEO> | 111 template<class VOICE, class VIDEO> |
111 class CompositeMediaEngine : public MediaEngineInterface { | 112 class CompositeMediaEngine : public MediaEngineInterface { |
112 public: | 113 public: |
113 CompositeMediaEngine( | 114 CompositeMediaEngine(webrtc::AudioDeviceModule* adm, |
114 webrtc::AudioDeviceModule* adm, | 115 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
115 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 116 audio_decoder_factory, |
116 audio_decoder_factory) | 117 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer) |
117 : voice_(adm, audio_decoder_factory) {} | 118 : voice_(adm, audio_decoder_factory, audio_mixer) {} |
118 virtual ~CompositeMediaEngine() {} | 119 virtual ~CompositeMediaEngine() {} |
119 virtual bool Init() { | 120 virtual bool Init() { |
120 video_.Init(); | 121 video_.Init(); |
121 return true; | 122 return true; |
122 } | 123 } |
123 | 124 |
124 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 125 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
125 return voice_.GetAudioState(); | 126 return voice_.GetAudioState(); |
126 } | 127 } |
127 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 128 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 virtual ~DataEngineInterface() {} | 173 virtual ~DataEngineInterface() {} |
173 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; | 174 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; |
174 virtual const std::vector<DataCodec>& data_codecs() = 0; | 175 virtual const std::vector<DataCodec>& data_codecs() = 0; |
175 }; | 176 }; |
176 | 177 |
177 webrtc::RtpParameters CreateRtpParametersWithOneEncoding(); | 178 webrtc::RtpParameters CreateRtpParametersWithOneEncoding(); |
178 | 179 |
179 } // namespace cricket | 180 } // namespace cricket |
180 | 181 |
181 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ | 182 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ |
OLD | NEW |