Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: talk/media/webrtc/webrtcmediaengine.h

Issue 1481963002: Add header extension filtering for WebRtcVoiceEngine/MediaChannel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: two more test cases Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « talk/media/base/mediachannel.h ('k') | talk/media/webrtc/webrtcmediaengine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 10 matching lines...) Expand all
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #ifndef TALK_MEDIA_WEBRTCMEDIAENGINE_H_ 28 #ifndef TALK_MEDIA_WEBRTCMEDIAENGINE_H_
29 #define TALK_MEDIA_WEBRTCMEDIAENGINE_H_ 29 #define TALK_MEDIA_WEBRTCMEDIAENGINE_H_
30 30
31 #include <string>
32 #include <vector>
33
31 #include "talk/media/base/mediaengine.h" 34 #include "talk/media/base/mediaengine.h"
35 #include "webrtc/config.h"
32 36
33 namespace webrtc { 37 namespace webrtc {
34 class AudioDeviceModule; 38 class AudioDeviceModule;
35 } 39 }
36 namespace cricket { 40 namespace cricket {
37 class WebRtcVideoDecoderFactory; 41 class WebRtcVideoDecoderFactory;
38 class WebRtcVideoEncoderFactory; 42 class WebRtcVideoEncoderFactory;
39 } 43 }
40 44
41 namespace cricket { 45 namespace cricket {
42 46
43 class WebRtcMediaEngineFactory { 47 class WebRtcMediaEngineFactory {
44 public: 48 public:
45 static MediaEngineInterface* Create( 49 static MediaEngineInterface* Create(
46 webrtc::AudioDeviceModule* adm, 50 webrtc::AudioDeviceModule* adm,
47 WebRtcVideoEncoderFactory* encoder_factory, 51 WebRtcVideoEncoderFactory* encoder_factory,
48 WebRtcVideoDecoderFactory* decoder_factory); 52 WebRtcVideoDecoderFactory* decoder_factory);
49 }; 53 };
50 54
51 extern const char* kBweExtensionPriorities[]; 55 // Verify that extension IDs are within 1-byte extension range and are not
52 extern const size_t kBweExtensionPrioritiesLength; 56 // overlapping.
57 bool ValidateRtpExtensions(const std::vector<RtpHeaderExtension>& extensions);
53 58
54 std::vector<RtpHeaderExtension> FilterRedundantRtpExtensions( 59 // Convert cricket::RtpHeaderExtension:s to webrtc::RtpExtension:s, discarding
60 // any extensions not validated by the 'supported' predicate. Duplicate
61 // extensions are removed if 'filter_redundant_extensions' is set, and also any
62 // mutually exclusive extensions (see implementation for details).
63 std::vector<webrtc::RtpExtension> FilterRtpExtensions(
55 const std::vector<RtpHeaderExtension>& extensions, 64 const std::vector<RtpHeaderExtension>& extensions,
56 const char* extension_prios[], 65 bool (*supported)(const std::string&),
57 size_t extension_prios_length); 66 bool filter_redundant_extensions);
58 67
59 } // namespace cricket 68 } // namespace cricket
60 69
61 #endif // TALK_MEDIA_WEBRTCMEDIAENGINE_H_ 70 #endif // TALK_MEDIA_WEBRTCMEDIAENGINE_H_
OLDNEW
« no previous file with comments | « talk/media/base/mediachannel.h ('k') | talk/media/webrtc/webrtcmediaengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698