Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ | 11 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ |
| 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ | 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "webrtc/config.h" | 17 #include "webrtc/config.h" |
| 18 #include "webrtc/media/base/mediaengine.h" | 18 #include "webrtc/media/base/mediaengine.h" |
| 19 | 19 |
| 20 namespace webrtc { | 20 namespace webrtc { |
| 21 class AudioDecoderFactory; | 21 class AudioDecoderFactory; |
| 22 class AudioDeviceModule; | 22 class AudioDeviceModule; |
| 23 class AudioMixer; | |
| 23 } | 24 } |
| 24 namespace cricket { | 25 namespace cricket { |
| 25 class WebRtcVideoDecoderFactory; | 26 class WebRtcVideoDecoderFactory; |
| 26 class WebRtcVideoEncoderFactory; | 27 class WebRtcVideoEncoderFactory; |
| 27 } | 28 } |
| 28 | 29 |
| 29 namespace cricket { | 30 namespace cricket { |
| 30 | 31 |
| 31 class WebRtcMediaEngineFactory { | 32 class WebRtcMediaEngineFactory { |
| 32 public: | 33 public: |
| 33 // TODO(ossu): Backwards-compatible interface. Will be deprecated once the | 34 // TODO(ossu): Backwards-compatible interface. Will be deprecated once the |
| 34 // audio decoder factory is fully plumbed and used throughout WebRTC. | 35 // audio decoder factory is fully plumbed and used throughout WebRTC. |
| 35 // See: crbug.com/webrtc/6000 | 36 // See: crbug.com/webrtc/6000 |
| 36 static MediaEngineInterface* Create( | 37 static MediaEngineInterface* Create( |
| 37 webrtc::AudioDeviceModule* adm, | 38 webrtc::AudioDeviceModule* adm, |
| 38 WebRtcVideoEncoderFactory* video_encoder_factory, | 39 WebRtcVideoEncoderFactory* video_encoder_factory, |
| 39 WebRtcVideoDecoderFactory* video_decoder_factory); | 40 WebRtcVideoDecoderFactory* video_decoder_factory, |
| 41 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer); | |
|
the sun
2016/12/12 20:50:05
is this version of the function actually used with
GeorgeZ
2016/12/13 00:16:42
Thanks for point this out.
| |
| 40 | 42 |
| 41 static MediaEngineInterface* Create( | 43 static MediaEngineInterface* Create( |
| 42 webrtc::AudioDeviceModule* adm, | 44 webrtc::AudioDeviceModule* adm, |
| 43 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 45 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
| 44 audio_decoder_factory, | 46 audio_decoder_factory, |
| 45 WebRtcVideoEncoderFactory* video_encoder_factory, | 47 WebRtcVideoEncoderFactory* video_encoder_factory, |
| 46 WebRtcVideoDecoderFactory* video_decoder_factory); | 48 WebRtcVideoDecoderFactory* video_decoder_factory, |
| 49 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer); | |
| 47 }; | 50 }; |
| 48 | 51 |
| 49 // Verify that extension IDs are within 1-byte extension range and are not | 52 // Verify that extension IDs are within 1-byte extension range and are not |
| 50 // overlapping. | 53 // overlapping. |
| 51 bool ValidateRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); | 54 bool ValidateRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); |
| 52 | 55 |
| 53 // Discard any extensions not validated by the 'supported' predicate. Duplicate | 56 // Discard any extensions not validated by the 'supported' predicate. Duplicate |
| 54 // extensions are removed if 'filter_redundant_extensions' is set, and also any | 57 // extensions are removed if 'filter_redundant_extensions' is set, and also any |
| 55 // mutually exclusive extensions (see implementation for details) are removed. | 58 // mutually exclusive extensions (see implementation for details) are removed. |
| 56 std::vector<webrtc::RtpExtension> FilterRtpExtensions( | 59 std::vector<webrtc::RtpExtension> FilterRtpExtensions( |
| 57 const std::vector<webrtc::RtpExtension>& extensions, | 60 const std::vector<webrtc::RtpExtension>& extensions, |
| 58 bool (*supported)(const std::string&), | 61 bool (*supported)(const std::string&), |
| 59 bool filter_redundant_extensions); | 62 bool filter_redundant_extensions); |
| 60 | 63 |
| 61 } // namespace cricket | 64 } // namespace cricket |
| 62 | 65 |
| 63 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ | 66 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ |
| OLD | NEW |