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 <memory> | |
| 14 #include <string> | 15 #include <string> |
| 15 #include <vector> | 16 #include <vector> |
| 16 | 17 |
| 17 #include "webrtc/call/call.h" | 18 #include "webrtc/call/call.h" |
| 18 #include "webrtc/config.h" | 19 #include "webrtc/config.h" |
| 19 #include "webrtc/media/base/mediaengine.h" | 20 #include "webrtc/media/base/mediaengine.h" |
| 20 | 21 |
| 21 namespace webrtc { | 22 namespace webrtc { |
| 22 class AudioDecoderFactory; | 23 class AudioDecoderFactory; |
| 23 class AudioDeviceModule; | 24 class AudioDeviceModule; |
| 24 class AudioMixer; | 25 class AudioMixer; |
| 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: |
| 35 // TODO(ossu): Backwards-compatible interface. Will be deprecated once the | 36 // TODO(ossu): Backwards-compatible interface. Will be deprecated once the |
| 36 // audio decoder factory is fully plumbed and used throughout WebRTC. | 37 // audio decoder factory is fully plumbed and used throughout WebRTC. |
| 37 // See: crbug.com/webrtc/6000 | 38 // See: crbug.com/webrtc/6000 |
| 38 static MediaEngineInterface* Create( | 39 static std::unique_ptr<MediaEngineInterface> Create( |
| 39 webrtc::AudioDeviceModule* adm, | 40 webrtc::AudioDeviceModule* adm, |
| 40 WebRtcVideoEncoderFactory* video_encoder_factory, | 41 WebRtcVideoEncoderFactory* video_encoder_factory, |
| 41 WebRtcVideoDecoderFactory* video_decoder_factory); | 42 WebRtcVideoDecoderFactory* video_decoder_factory); |
| 42 | 43 |
| 43 static MediaEngineInterface* Create( | 44 static std::unique_ptr<MediaEngineInterface> Create( |
| 44 webrtc::AudioDeviceModule* adm, | 45 webrtc::AudioDeviceModule* adm, |
| 45 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 46 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
| 46 audio_decoder_factory, | 47 audio_decoder_factory, |
| 47 WebRtcVideoEncoderFactory* video_encoder_factory, | 48 WebRtcVideoEncoderFactory* video_encoder_factory, |
| 48 WebRtcVideoDecoderFactory* video_decoder_factory); | 49 WebRtcVideoDecoderFactory* video_decoder_factory); |
| 49 | 50 |
| 50 static MediaEngineInterface* Create( | 51 static std::unique_ptr<MediaEngineInterface> Create( |
|
pthatcher1
2017/02/08 01:33:49
This allow seems like a big enough change to warra
Taylor Brandstetter
2017/02/10 00:19:45
Actually, I'm putting this specific change off, si
| |
| 51 webrtc::AudioDeviceModule* adm, | 52 webrtc::AudioDeviceModule* adm, |
| 52 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 53 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
| 53 audio_decoder_factory, | 54 audio_decoder_factory, |
| 54 WebRtcVideoEncoderFactory* video_encoder_factory, | 55 WebRtcVideoEncoderFactory* video_encoder_factory, |
| 55 WebRtcVideoDecoderFactory* video_decoder_factory, | 56 WebRtcVideoDecoderFactory* video_decoder_factory, |
| 56 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer); | 57 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer); |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 // Verify that extension IDs are within 1-byte extension range and are not | 60 // Verify that extension IDs are within 1-byte extension range and are not |
| 60 // overlapping. | 61 // overlapping. |
| 61 bool ValidateRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); | 62 bool ValidateRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); |
| 62 | 63 |
| 63 // Discard any extensions not validated by the 'supported' predicate. Duplicate | 64 // Discard any extensions not validated by the 'supported' predicate. Duplicate |
| 64 // extensions are removed if 'filter_redundant_extensions' is set, and also any | 65 // extensions are removed if 'filter_redundant_extensions' is set, and also any |
| 65 // mutually exclusive extensions (see implementation for details) are removed. | 66 // mutually exclusive extensions (see implementation for details) are removed. |
| 66 std::vector<webrtc::RtpExtension> FilterRtpExtensions( | 67 std::vector<webrtc::RtpExtension> FilterRtpExtensions( |
| 67 const std::vector<webrtc::RtpExtension>& extensions, | 68 const std::vector<webrtc::RtpExtension>& extensions, |
| 68 bool (*supported)(const std::string&), | 69 bool (*supported)(const std::string&), |
| 69 bool filter_redundant_extensions); | 70 bool filter_redundant_extensions); |
| 70 | 71 |
| 71 webrtc::Call::Config::BitrateConfig GetBitrateConfigForCodec( | 72 webrtc::Call::Config::BitrateConfig GetBitrateConfigForCodec( |
| 72 const Codec& codec); | 73 const Codec& codec); |
| 73 | 74 |
| 74 } // namespace cricket | 75 } // namespace cricket |
| 75 | 76 |
| 76 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ | 77 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ |
| OLD | NEW |