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/call/call.h" | 17 #include "webrtc/call/call.h" |
18 #include "webrtc/config.h" | 18 #include "webrtc/config.h" |
19 #include "webrtc/media/base/mediaengine.h" | 19 #include "webrtc/media/base/mediaengine.h" |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 class AudioDecoderFactory; | 22 class AudioDecoderFactory; |
23 class AudioDeviceModule; | 23 class AudioDeviceModule; |
24 class AudioMixer; | 24 class AudioMixer; |
| 25 class AudioProcessing; |
25 } | 26 } |
26 namespace cricket { | 27 namespace cricket { |
27 class WebRtcVideoDecoderFactory; | 28 class WebRtcVideoDecoderFactory; |
28 class WebRtcVideoEncoderFactory; | 29 class WebRtcVideoEncoderFactory; |
29 } | 30 } |
30 | 31 |
31 namespace cricket { | 32 namespace cricket { |
32 | 33 |
33 class WebRtcMediaEngineFactory { | 34 class WebRtcMediaEngineFactory { |
34 public: | 35 public: |
(...skipping 17 matching lines...) Loading... |
52 audio_decoder_factory, | 53 audio_decoder_factory, |
53 WebRtcVideoEncoderFactory* video_encoder_factory, | 54 WebRtcVideoEncoderFactory* video_encoder_factory, |
54 WebRtcVideoDecoderFactory* video_decoder_factory); | 55 WebRtcVideoDecoderFactory* video_decoder_factory); |
55 | 56 |
56 static MediaEngineInterface* Create( | 57 static MediaEngineInterface* Create( |
57 webrtc::AudioDeviceModule* adm, | 58 webrtc::AudioDeviceModule* adm, |
58 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 59 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
59 audio_decoder_factory, | 60 audio_decoder_factory, |
60 WebRtcVideoEncoderFactory* video_encoder_factory, | 61 WebRtcVideoEncoderFactory* video_encoder_factory, |
61 WebRtcVideoDecoderFactory* video_decoder_factory, | 62 WebRtcVideoDecoderFactory* video_decoder_factory, |
62 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer); | 63 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer, |
| 64 rtc::scoped_refptr<webrtc::AudioProcessing> apm); |
63 | 65 |
64 static MediaEngineInterface* Create( | 66 static MediaEngineInterface* Create( |
65 webrtc::AudioDeviceModule* adm, | 67 webrtc::AudioDeviceModule* adm, |
66 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& | 68 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& |
67 audio_encoder_factory, | 69 audio_encoder_factory, |
68 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 70 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
69 audio_decoder_factory, | 71 audio_decoder_factory, |
70 WebRtcVideoEncoderFactory* video_encoder_factory, | 72 WebRtcVideoEncoderFactory* video_encoder_factory, |
71 WebRtcVideoDecoderFactory* video_decoder_factory); | 73 WebRtcVideoDecoderFactory* video_decoder_factory); |
72 | 74 |
73 static MediaEngineInterface* Create( | 75 static MediaEngineInterface* Create( |
74 webrtc::AudioDeviceModule* adm, | 76 webrtc::AudioDeviceModule* adm, |
75 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& | 77 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& |
76 audio_encoder_factory, | 78 audio_encoder_factory, |
77 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 79 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
78 audio_decoder_factory, | 80 audio_decoder_factory, |
79 WebRtcVideoEncoderFactory* video_encoder_factory, | 81 WebRtcVideoEncoderFactory* video_encoder_factory, |
80 WebRtcVideoDecoderFactory* video_decoder_factory, | 82 WebRtcVideoDecoderFactory* video_decoder_factory, |
81 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer); | 83 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer, |
| 84 rtc::scoped_refptr<webrtc::AudioProcessing> apm); |
82 }; | 85 }; |
83 | 86 |
84 // Verify that extension IDs are within 1-byte extension range and are not | 87 // Verify that extension IDs are within 1-byte extension range and are not |
85 // overlapping. | 88 // overlapping. |
86 bool ValidateRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); | 89 bool ValidateRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); |
87 | 90 |
88 // Discard any extensions not validated by the 'supported' predicate. Duplicate | 91 // Discard any extensions not validated by the 'supported' predicate. Duplicate |
89 // extensions are removed if 'filter_redundant_extensions' is set, and also any | 92 // extensions are removed if 'filter_redundant_extensions' is set, and also any |
90 // mutually exclusive extensions (see implementation for details) are removed. | 93 // mutually exclusive extensions (see implementation for details) are removed. |
91 std::vector<webrtc::RtpExtension> FilterRtpExtensions( | 94 std::vector<webrtc::RtpExtension> FilterRtpExtensions( |
92 const std::vector<webrtc::RtpExtension>& extensions, | 95 const std::vector<webrtc::RtpExtension>& extensions, |
93 bool (*supported)(const std::string&), | 96 bool (*supported)(const std::string&), |
94 bool filter_redundant_extensions); | 97 bool filter_redundant_extensions); |
95 | 98 |
96 webrtc::Call::Config::BitrateConfig GetBitrateConfigForCodec( | 99 webrtc::Call::Config::BitrateConfig GetBitrateConfigForCodec( |
97 const Codec& codec); | 100 const Codec& codec); |
98 | 101 |
99 } // namespace cricket | 102 } // namespace cricket |
100 | 103 |
101 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ | 104 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ |
OLD | NEW |