webrtc_m130/media/base/mediaengine.cc
Zach Stein 3ca452be48 Create an RtpEncodingParameters struct for each simulcast stream
The additional structs are not used anywhere yet.

Bug: webrtc:8653
Change-Id: I8b3891e7f8d92286ffd43ea6010258a5828fa3b8
Reviewed-on: https://webrtc-review.googlesource.com/35007
Commit-Queue: Zach Stein <zstein@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21682}
2018-01-18 19:02:43 +00:00

37 lines
1.1 KiB
C++

/*
* Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "media/base/mediaengine.h"
namespace cricket {
webrtc::RtpParameters CreateRtpParametersWithOneEncoding() {
webrtc::RtpParameters parameters;
webrtc::RtpEncodingParameters encoding;
parameters.encodings.push_back(encoding);
return parameters;
}
webrtc::RtpParameters CreateRtpParametersWithEncodings(StreamParams sp) {
std::vector<uint32_t> primary_ssrcs;
sp.GetPrimarySsrcs(&primary_ssrcs);
size_t encoding_count = primary_ssrcs.size();
std::vector<webrtc::RtpEncodingParameters> encodings(encoding_count);
for (size_t i = 0; i < encodings.size(); ++i) {
encodings[i].ssrc = primary_ssrcs[i];
}
webrtc::RtpParameters parameters;
parameters.encodings = encodings;
return parameters;
}
}; // namespace cricket