henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | /* |
kjellander | 1afca73 | 2016-02-07 20:46:45 -0800 | [diff] [blame] | 2 | * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 3 | * |
kjellander | 1afca73 | 2016-02-07 20:46:45 -0800 | [diff] [blame] | 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
kjellander@webrtc.org | 5ad1297 | 2016-02-12 06:39:40 +0100 | [diff] [blame^] | 11 | #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ |
| 12 | #define WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 13 | |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 14 | #include <string> |
| 15 | #include <vector> |
| 16 | |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 17 | #include "webrtc/config.h" |
kjellander | a96e2d7 | 2016-02-04 23:52:28 -0800 | [diff] [blame] | 18 | #include "webrtc/media/base/mediaengine.h" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 19 | |
| 20 | namespace webrtc { |
| 21 | class AudioDeviceModule; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 22 | } |
| 23 | namespace cricket { |
| 24 | class WebRtcVideoDecoderFactory; |
| 25 | class WebRtcVideoEncoderFactory; |
| 26 | } |
| 27 | |
buildbot@webrtc.org | 58e7c86 | 2014-06-20 00:26:50 +0000 | [diff] [blame] | 28 | namespace cricket { |
| 29 | |
henrike@webrtc.org | 0481f15 | 2014-08-19 14:56:59 +0000 | [diff] [blame] | 30 | class WebRtcMediaEngineFactory { |
buildbot@webrtc.org | 58e7c86 | 2014-06-20 00:26:50 +0000 | [diff] [blame] | 31 | public: |
henrike@webrtc.org | 0481f15 | 2014-08-19 14:56:59 +0000 | [diff] [blame] | 32 | static MediaEngineInterface* Create( |
buildbot@webrtc.org | 58e7c86 | 2014-06-20 00:26:50 +0000 | [diff] [blame] | 33 | webrtc::AudioDeviceModule* adm, |
buildbot@webrtc.org | bb2d658 | 2014-06-20 14:58:56 +0000 | [diff] [blame] | 34 | WebRtcVideoEncoderFactory* encoder_factory, |
henrike@webrtc.org | 0481f15 | 2014-08-19 14:56:59 +0000 | [diff] [blame] | 35 | WebRtcVideoDecoderFactory* decoder_factory); |
buildbot@webrtc.org | bb2d658 | 2014-06-20 14:58:56 +0000 | [diff] [blame] | 36 | }; |
| 37 | |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 38 | // Verify that extension IDs are within 1-byte extension range and are not |
| 39 | // overlapping. |
| 40 | bool ValidateRtpExtensions(const std::vector<RtpHeaderExtension>& extensions); |
Stefan Holmer | bbaf363 | 2015-10-29 18:53:23 +0100 | [diff] [blame] | 41 | |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 42 | // Convert cricket::RtpHeaderExtension:s to webrtc::RtpExtension:s, discarding |
| 43 | // any extensions not validated by the 'supported' predicate. Duplicate |
| 44 | // extensions are removed if 'filter_redundant_extensions' is set, and also any |
| 45 | // mutually exclusive extensions (see implementation for details). |
| 46 | std::vector<webrtc::RtpExtension> FilterRtpExtensions( |
Stefan Holmer | bbaf363 | 2015-10-29 18:53:23 +0100 | [diff] [blame] | 47 | const std::vector<RtpHeaderExtension>& extensions, |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 48 | bool (*supported)(const std::string&), |
| 49 | bool filter_redundant_extensions); |
Stefan Holmer | bbaf363 | 2015-10-29 18:53:23 +0100 | [diff] [blame] | 50 | |
buildbot@webrtc.org | bb2d658 | 2014-06-20 14:58:56 +0000 | [diff] [blame] | 51 | } // namespace cricket |
| 52 | |
kjellander@webrtc.org | 5ad1297 | 2016-02-12 06:39:40 +0100 | [diff] [blame^] | 53 | #endif // WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ |