| 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; |
| 36 class Call; | 37 class Call; |
| 37 } | 38 } |
| 38 | 39 |
| 39 namespace cricket { | 40 namespace cricket { |
| 40 | 41 |
| 41 struct RtpCapabilities { | 42 struct RtpCapabilities { |
| 42 std::vector<webrtc::RtpExtension> header_extensions; | 43 std::vector<webrtc::RtpExtension> header_extensions; |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 // MediaEngineInterface is an abstraction of a media engine which can be | 46 // MediaEngineInterface is an abstraction of a media engine which can be |
| (...skipping 57 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 |