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 |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "webrtc/media/base/mediachannel.h" | 26 #include "webrtc/media/base/mediachannel.h" |
27 #include "webrtc/media/base/videocommon.h" | 27 #include "webrtc/media/base/videocommon.h" |
28 #include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" | 28 #include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" |
29 | 29 |
30 #if defined(GOOGLE_CHROME_BUILD) || defined(CHROMIUM_BUILD) | 30 #if defined(GOOGLE_CHROME_BUILD) || defined(CHROMIUM_BUILD) |
31 #define DISABLE_MEDIA_ENGINE_FACTORY | 31 #define DISABLE_MEDIA_ENGINE_FACTORY |
32 #endif | 32 #endif |
33 | 33 |
34 namespace webrtc { | 34 namespace webrtc { |
35 class AudioDeviceModule; | 35 class AudioDeviceModule; |
36 class AudioMixer; | |
37 class Call; | 36 class Call; |
38 } | 37 } |
39 | 38 |
40 namespace cricket { | 39 namespace cricket { |
41 | 40 |
42 struct RtpCapabilities { | 41 struct RtpCapabilities { |
43 std::vector<webrtc::RtpExtension> header_extensions; | 42 std::vector<webrtc::RtpExtension> header_extensions; |
44 }; | 43 }; |
45 | 44 |
46 // MediaEngineInterface is an abstraction of a media engine which can be | 45 // MediaEngineInterface is an abstraction of a media engine which can be |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 private: | 103 private: |
105 static MediaEngineCreateFunction create_function_; | 104 static MediaEngineCreateFunction create_function_; |
106 }; | 105 }; |
107 #endif | 106 #endif |
108 | 107 |
109 // CompositeMediaEngine constructs a MediaEngine from separate | 108 // CompositeMediaEngine constructs a MediaEngine from separate |
110 // voice and video engine classes. | 109 // voice and video engine classes. |
111 template<class VOICE, class VIDEO> | 110 template<class VOICE, class VIDEO> |
112 class CompositeMediaEngine : public MediaEngineInterface { | 111 class CompositeMediaEngine : public MediaEngineInterface { |
113 public: | 112 public: |
114 CompositeMediaEngine(webrtc::AudioDeviceModule* adm, | 113 CompositeMediaEngine( |
115 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 114 webrtc::AudioDeviceModule* adm, |
116 audio_decoder_factory, | 115 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
117 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer) | 116 audio_decoder_factory) |
118 : voice_(adm, audio_decoder_factory, audio_mixer) {} | 117 : voice_(adm, audio_decoder_factory) {} |
119 virtual ~CompositeMediaEngine() {} | 118 virtual ~CompositeMediaEngine() {} |
120 virtual bool Init() { | 119 virtual bool Init() { |
121 video_.Init(); | 120 video_.Init(); |
122 return true; | 121 return true; |
123 } | 122 } |
124 | 123 |
125 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 124 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
126 return voice_.GetAudioState(); | 125 return voice_.GetAudioState(); |
127 } | 126 } |
128 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 127 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 virtual ~DataEngineInterface() {} | 172 virtual ~DataEngineInterface() {} |
174 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; | 173 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; |
175 virtual const std::vector<DataCodec>& data_codecs() = 0; | 174 virtual const std::vector<DataCodec>& data_codecs() = 0; |
176 }; | 175 }; |
177 | 176 |
178 webrtc::RtpParameters CreateRtpParametersWithOneEncoding(); | 177 webrtc::RtpParameters CreateRtpParametersWithOneEncoding(); |
179 | 178 |
180 } // namespace cricket | 179 } // namespace cricket |
181 | 180 |
182 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ | 181 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ |
OLD | NEW |