| 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 16 matching lines...) Expand all Loading... |
| 27 #include "webrtc/media/base/mediachannel.h" | 27 #include "webrtc/media/base/mediachannel.h" |
| 28 #include "webrtc/media/base/videocommon.h" | 28 #include "webrtc/media/base/videocommon.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; | 36 class AudioMixer; |
| 37 class AudioProcessing; |
| 37 class Call; | 38 class Call; |
| 38 } | 39 } |
| 39 | 40 |
| 40 namespace cricket { | 41 namespace cricket { |
| 41 | 42 |
| 42 struct RtpCapabilities { | 43 struct RtpCapabilities { |
| 43 std::vector<webrtc::RtpExtension> header_extensions; | 44 std::vector<webrtc::RtpExtension> header_extensions; |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 // MediaEngineInterface is an abstraction of a media engine which can be | 47 // 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: | 105 private: |
| 105 static MediaEngineCreateFunction create_function_; | 106 static MediaEngineCreateFunction create_function_; |
| 106 }; | 107 }; |
| 107 #endif | 108 #endif |
| 108 | 109 |
| 109 // CompositeMediaEngine constructs a MediaEngine from separate | 110 // CompositeMediaEngine constructs a MediaEngine from separate |
| 110 // voice and video engine classes. | 111 // voice and video engine classes. |
| 111 template<class VOICE, class VIDEO> | 112 template<class VOICE, class VIDEO> |
| 112 class CompositeMediaEngine : public MediaEngineInterface { | 113 class CompositeMediaEngine : public MediaEngineInterface { |
| 113 public: | 114 public: |
| 114 CompositeMediaEngine(webrtc::AudioDeviceModule* adm, | 115 CompositeMediaEngine( |
| 115 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& | 116 webrtc::AudioDeviceModule* adm, |
| 116 audio_encoder_factory, | 117 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& |
| 117 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 118 audio_encoder_factory, |
| 118 audio_decoder_factory, | 119 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
| 119 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer) | 120 audio_decoder_factory, |
| 120 : voice_(adm, audio_encoder_factory, audio_decoder_factory, audio_mixer) { | 121 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer, |
| 121 } | 122 rtc::scoped_refptr<webrtc::AudioProcessing> audio_processing) |
| 123 : voice_(adm, |
| 124 audio_encoder_factory, |
| 125 audio_decoder_factory, |
| 126 audio_mixer, |
| 127 audio_processing) {} |
| 122 virtual ~CompositeMediaEngine() {} | 128 virtual ~CompositeMediaEngine() {} |
| 123 virtual bool Init() { | 129 virtual bool Init() { |
| 124 voice_.Init(); | 130 voice_.Init(); |
| 125 video_.Init(); | 131 video_.Init(); |
| 126 return true; | 132 return true; |
| 127 } | 133 } |
| 128 | 134 |
| 129 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 135 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
| 130 return voice_.GetAudioState(); | 136 return voice_.GetAudioState(); |
| 131 } | 137 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 virtual ~DataEngineInterface() {} | 183 virtual ~DataEngineInterface() {} |
| 178 virtual DataMediaChannel* CreateChannel(const MediaConfig& config) = 0; | 184 virtual DataMediaChannel* CreateChannel(const MediaConfig& config) = 0; |
| 179 virtual const std::vector<DataCodec>& data_codecs() = 0; | 185 virtual const std::vector<DataCodec>& data_codecs() = 0; |
| 180 }; | 186 }; |
| 181 | 187 |
| 182 webrtc::RtpParameters CreateRtpParametersWithOneEncoding(); | 188 webrtc::RtpParameters CreateRtpParametersWithOneEncoding(); |
| 183 | 189 |
| 184 } // namespace cricket | 190 } // namespace cricket |
| 185 | 191 |
| 186 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ | 192 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ |
| OLD | NEW |