| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "talk/media/webrtc/webrtcmediaengine.h" | 28 #include "talk/media/webrtc/webrtcmediaengine.h" |
| 29 | 29 |
| 30 #include <algorithm> | 30 #include <algorithm> |
| 31 | 31 |
| 32 #ifdef HAVE_WEBRTC_VIDEO |
| 32 #include "talk/media/webrtc/webrtcvideoengine2.h" | 33 #include "talk/media/webrtc/webrtcvideoengine2.h" |
| 34 #else |
| 35 #include "talk/media/webrtc/nullwebrtcvideoengine.h" |
| 36 #endif |
| 33 #include "talk/media/webrtc/webrtcvoiceengine.h" | 37 #include "talk/media/webrtc/webrtcvoiceengine.h" |
| 34 | 38 |
| 35 namespace cricket { | 39 namespace cricket { |
| 36 | 40 |
| 37 class WebRtcMediaEngine2 | 41 class WebRtcMediaEngine2 |
| 42 #ifdef HAVE_WEBRTC_VIDEO |
| 38 : public CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine2> { | 43 : public CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine2> { |
| 44 #else |
| 45 : public CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine> { |
| 46 #endif |
| 39 public: | 47 public: |
| 40 WebRtcMediaEngine2(webrtc::AudioDeviceModule* adm, | 48 WebRtcMediaEngine2(webrtc::AudioDeviceModule* adm, |
| 41 WebRtcVideoEncoderFactory* encoder_factory, | 49 WebRtcVideoEncoderFactory* encoder_factory, |
| 42 WebRtcVideoDecoderFactory* decoder_factory) { | 50 WebRtcVideoDecoderFactory* decoder_factory) { |
| 43 voice_.SetAudioDeviceModule(adm); | 51 voice_.SetAudioDeviceModule(adm); |
| 44 video_.SetExternalDecoderFactory(decoder_factory); | 52 video_.SetExternalDecoderFactory(decoder_factory); |
| 45 video_.SetExternalEncoderFactory(encoder_factory); | 53 video_.SetExternalEncoderFactory(encoder_factory); |
| 46 } | 54 } |
| 47 }; | 55 }; |
| 48 | 56 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 kRtpTransportSequenceNumberHeaderExtension, | 154 kRtpTransportSequenceNumberHeaderExtension, |
| 147 kRtpAbsoluteSenderTimeHeaderExtension, | 155 kRtpAbsoluteSenderTimeHeaderExtension, |
| 148 kRtpTimestampOffsetHeaderExtension | 156 kRtpTimestampOffsetHeaderExtension |
| 149 }; | 157 }; |
| 150 DiscardRedundantExtensions(&result, kBweExtensionPriorities); | 158 DiscardRedundantExtensions(&result, kBweExtensionPriorities); |
| 151 } | 159 } |
| 152 | 160 |
| 153 return result; | 161 return result; |
| 154 } | 162 } |
| 155 } // namespace cricket | 163 } // namespace cricket |
| OLD | NEW |