| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 #include "webrtc/media/engine/webrtcmediaengine.h" | 11 #include "webrtc/media/engine/webrtcmediaengine.h" |
| 12 | 12 |
| 13 #include <algorithm> | 13 #include <algorithm> |
| 14 | 14 |
| 15 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" | 15 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" |
| 16 #include "webrtc/api/audio_codecs/builtin_audio_encoder_factory.h" | 16 #include "webrtc/api/audio_codecs/builtin_audio_encoder_factory.h" |
| 17 #include "webrtc/media/engine/webrtcvoiceengine.h" | 17 #include "webrtc/media/engine/webrtcvoiceengine.h" |
| 18 | 18 |
| 19 #ifdef HAVE_WEBRTC_VIDEO | 19 #ifdef HAVE_WEBRTC_VIDEO |
| 20 #include "webrtc/media/engine/webrtcvideoengine2.h" | 20 #include "webrtc/media/engine/webrtcvideoengine.h" |
| 21 #else | 21 #else |
| 22 #include "webrtc/media/engine/nullwebrtcvideoengine.h" | 22 #include "webrtc/media/engine/nullwebrtcvideoengine.h" |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 namespace cricket { | 25 namespace cricket { |
| 26 | 26 |
| 27 class WebRtcMediaEngine2 | 27 class WebRtcMediaEngine2 |
| 28 #ifdef HAVE_WEBRTC_VIDEO | 28 #ifdef HAVE_WEBRTC_VIDEO |
| 29 : public CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine2> { | 29 : public CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine> { |
| 30 #else | 30 #else |
| 31 : public CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine> { | 31 : public CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine> { |
| 32 #endif | 32 #endif |
| 33 public: | 33 public: |
| 34 WebRtcMediaEngine2(webrtc::AudioDeviceModule* adm, | 34 WebRtcMediaEngine2(webrtc::AudioDeviceModule* adm, |
| 35 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& | 35 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& |
| 36 audio_encoder_factory, | 36 audio_encoder_factory, |
| 37 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 37 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
| 38 audio_decoder_factory, | 38 audio_decoder_factory, |
| 39 WebRtcVideoEncoderFactory* video_encoder_factory, | 39 WebRtcVideoEncoderFactory* video_encoder_factory, |
| 40 WebRtcVideoDecoderFactory* video_decoder_factory, | 40 WebRtcVideoDecoderFactory* video_decoder_factory, |
| 41 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer) | 41 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer) |
| 42 #ifdef HAVE_WEBRTC_VIDEO | 42 #ifdef HAVE_WEBRTC_VIDEO |
| 43 : CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine2>( | 43 : CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine>( |
| 44 adm, | 44 adm, |
| 45 audio_encoder_factory, | 45 audio_encoder_factory, |
| 46 audio_decoder_factory, | 46 audio_decoder_factory, |
| 47 audio_mixer){ | 47 audio_mixer){ |
| 48 #else | 48 #else |
| 49 : CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine>( | 49 : CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine>( |
| 50 adm, | 50 adm, |
| 51 audio_encoder_factory, | 51 audio_encoder_factory, |
| 52 audio_decoder_factory, | 52 audio_decoder_factory, |
| 53 audio_mixer) { | 53 audio_mixer) { |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 } | 244 } |
| 245 if (codec.GetParam(kCodecParamMaxBitrate, &bitrate_kbps) && | 245 if (codec.GetParam(kCodecParamMaxBitrate, &bitrate_kbps) && |
| 246 bitrate_kbps > 0) { | 246 bitrate_kbps > 0) { |
| 247 config.max_bitrate_bps = bitrate_kbps * 1000; | 247 config.max_bitrate_bps = bitrate_kbps * 1000; |
| 248 } else { | 248 } else { |
| 249 config.max_bitrate_bps = -1; | 249 config.max_bitrate_bps = -1; |
| 250 } | 250 } |
| 251 return config; | 251 return config; |
| 252 } | 252 } |
| 253 } // namespace cricket | 253 } // namespace cricket |
| OLD | NEW |