blob: 8aad94ccdf8a697337ecff636d622afeb3a3a030 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
kjellander1afca732016-02-07 20:46:45 -08002 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00003 *
kjellander1afca732016-02-07 20:46:45 -08004 * 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.org28e20752013-07-10 00:45:36 +00009 */
10
kjellander@webrtc.org5ad12972016-02-12 06:39:40 +010011#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_
12#define WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_
henrike@webrtc.org28e20752013-07-10 00:45:36 +000013
solenberg7e4e01a2015-12-02 08:05:01 -080014#include <string>
15#include <vector>
16
solenberg7e4e01a2015-12-02 08:05:01 -080017#include "webrtc/config.h"
kjellandera96e2d72016-02-04 23:52:28 -080018#include "webrtc/media/base/mediaengine.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000019
20namespace webrtc {
21class AudioDeviceModule;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000022}
23namespace cricket {
24class WebRtcVideoDecoderFactory;
25class WebRtcVideoEncoderFactory;
26}
27
buildbot@webrtc.org58e7c862014-06-20 00:26:50 +000028namespace cricket {
29
henrike@webrtc.org0481f152014-08-19 14:56:59 +000030class WebRtcMediaEngineFactory {
buildbot@webrtc.org58e7c862014-06-20 00:26:50 +000031 public:
henrike@webrtc.org0481f152014-08-19 14:56:59 +000032 static MediaEngineInterface* Create(
buildbot@webrtc.org58e7c862014-06-20 00:26:50 +000033 webrtc::AudioDeviceModule* adm,
buildbot@webrtc.orgbb2d6582014-06-20 14:58:56 +000034 WebRtcVideoEncoderFactory* encoder_factory,
henrike@webrtc.org0481f152014-08-19 14:56:59 +000035 WebRtcVideoDecoderFactory* decoder_factory);
buildbot@webrtc.orgbb2d6582014-06-20 14:58:56 +000036};
37
solenberg7e4e01a2015-12-02 08:05:01 -080038// Verify that extension IDs are within 1-byte extension range and are not
39// overlapping.
isheriff6f8d6862016-05-26 11:24:55 -070040bool ValidateRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions);
Stefan Holmerbbaf3632015-10-29 18:53:23 +010041
isheriff6f8d6862016-05-26 11:24:55 -070042// Discard any extensions not validated by the 'supported' predicate. Duplicate
solenberg7e4e01a2015-12-02 08:05:01 -080043// extensions are removed if 'filter_redundant_extensions' is set, and also any
isheriff6f8d6862016-05-26 11:24:55 -070044// mutually exclusive extensions (see implementation for details) are removed.
solenberg7e4e01a2015-12-02 08:05:01 -080045std::vector<webrtc::RtpExtension> FilterRtpExtensions(
isheriff6f8d6862016-05-26 11:24:55 -070046 const std::vector<webrtc::RtpExtension>& extensions,
solenberg7e4e01a2015-12-02 08:05:01 -080047 bool (*supported)(const std::string&),
48 bool filter_redundant_extensions);
Stefan Holmerbbaf3632015-10-29 18:53:23 +010049
buildbot@webrtc.orgbb2d6582014-06-20 14:58:56 +000050} // namespace cricket
51
kjellander@webrtc.org5ad12972016-02-12 06:39:40 +010052#endif // WEBRTC_MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_