OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 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. |
| 9 */ |
| 10 |
| 11 #ifndef WEBRTC_ORTC_TESTRTPPARAMETERS_H_ |
| 12 #define WEBRTC_ORTC_TESTRTPPARAMETERS_H_ |
| 13 |
| 14 #include "webrtc/api/ortc/rtptransportinterface.h" |
| 15 #include "webrtc/api/rtpparameters.h" |
| 16 |
| 17 namespace webrtc { |
| 18 |
| 19 // Helper methods to create RtpParameters to use for sending/receiving. |
| 20 // |
| 21 // "MakeMinimal" methods contain the minimal necessary information for an |
| 22 // RtpSender or RtpReceiver to function. The "MakeFull" methods are the |
| 23 // opposite, and include all features that would normally be offered by a |
| 24 // PeerConnection, and in some cases additional ones. |
| 25 // |
| 26 // These methods are intended to be used for end-to-end testing (such as in |
| 27 // ortcfactory_integrationtest.cc), or unit testing that doesn't care about the |
| 28 // specific contents of the parameters. Tests should NOT assume that these |
| 29 // methods will not change; tests that are testing that a specific value in the |
| 30 // parameters is applied properly should construct the parameters in the test |
| 31 // itself. |
| 32 |
| 33 inline RtcpParameters MakeRtcpMuxParameters() { |
| 34 RtcpParameters rtcp_parameters; |
| 35 rtcp_parameters.mux = true; |
| 36 return rtcp_parameters; |
| 37 } |
| 38 |
| 39 RtpParameters MakeMinimalOpusParameters(); |
| 40 RtpParameters MakeMinimalIsacParameters(); |
| 41 RtpParameters MakeMinimalOpusParametersWithSsrc(uint32_t ssrc); |
| 42 RtpParameters MakeMinimalIsacParametersWithSsrc(uint32_t ssrc); |
| 43 |
| 44 RtpParameters MakeMinimalVp8Parameters(); |
| 45 RtpParameters MakeMinimalVp9Parameters(); |
| 46 RtpParameters MakeMinimalVp8ParametersWithSsrc(uint32_t ssrc); |
| 47 RtpParameters MakeMinimalVp9ParametersWithSsrc(uint32_t ssrc); |
| 48 |
| 49 // Make audio parameters with all the available properties configured and |
| 50 // features used, and with multiple codecs offered. Obtained by taking a |
| 51 // snapshot of a default PeerConnection offer (and adding other things, like |
| 52 // bitrate limit). |
| 53 RtpParameters MakeFullOpusParameters(); |
| 54 RtpParameters MakeFullIsacParameters(); |
| 55 |
| 56 // Make video parameters with all the available properties configured and |
| 57 // features used, and with multiple codecs offered. Obtained by taking a |
| 58 // snapshot of a default PeerConnection offer (and adding other things, like |
| 59 // bitrate limit). |
| 60 RtpParameters MakeFullVp8Parameters(); |
| 61 RtpParameters MakeFullVp9Parameters(); |
| 62 |
| 63 } // namespace webrtc |
| 64 |
| 65 #endif // WEBRTC_ORTC_TESTRTPPARAMETERS_H_ |
OLD | NEW |