blob: 47e51e140837d4b9c496c56e3c49895197970586 [file] [log] [blame]
deadbeefe814a0d2017-02-25 18:15:09 -08001/*
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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef ORTC_TESTRTPPARAMETERS_H_
12#define ORTC_TESTRTPPARAMETERS_H_
deadbeefe814a0d2017-02-25 18:15:09 -080013
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "api/ortc/rtptransportinterface.h"
15#include "api/rtpparameters.h"
deadbeefe814a0d2017-02-25 18:15:09 -080016
17namespace 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
sprangdb2a9fc2017-08-09 06:42:32 -070033inline RtpTransportParameters MakeRtcpMuxParameters() {
34 RtpTransportParameters parameters;
35 parameters.rtcp.mux = true;
36 return parameters;
deadbeefe814a0d2017-02-25 18:15:09 -080037}
38
39RtpParameters MakeMinimalOpusParameters();
40RtpParameters MakeMinimalIsacParameters();
41RtpParameters MakeMinimalOpusParametersWithSsrc(uint32_t ssrc);
42RtpParameters MakeMinimalIsacParametersWithSsrc(uint32_t ssrc);
43
44RtpParameters MakeMinimalVp8Parameters();
45RtpParameters MakeMinimalVp9Parameters();
46RtpParameters MakeMinimalVp8ParametersWithSsrc(uint32_t ssrc);
47RtpParameters MakeMinimalVp9ParametersWithSsrc(uint32_t ssrc);
48
49// Will create an encoding with no SSRC (meaning "match first SSRC seen" for a
50// receiver, or "pick one automatically" for a sender).
51RtpParameters MakeMinimalOpusParametersWithNoSsrc();
52RtpParameters MakeMinimalIsacParametersWithNoSsrc();
53RtpParameters MakeMinimalVp8ParametersWithNoSsrc();
54RtpParameters MakeMinimalVp9ParametersWithNoSsrc();
55
56// Make audio 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).
60RtpParameters MakeFullOpusParameters();
61RtpParameters MakeFullIsacParameters();
62
63// Make video parameters with all the available properties configured and
64// features used, and with multiple codecs offered. Obtained by taking a
65// snapshot of a default PeerConnection offer (and adding other things, like
66// bitrate limit).
67RtpParameters MakeFullVp8Parameters();
68RtpParameters MakeFullVp9Parameters();
69
70} // namespace webrtc
71
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020072#endif // ORTC_TESTRTPPARAMETERS_H_