webrtc_m130/media/base/mediaengine.cc
Paulina Hensman 11b34f4d08 Remove chromium clang style errors affecting sdk/android/media_jni
Bug: webrtc:163
Change-Id: I1e98174817ca032ee13f9a6a386803382843389d
Reviewed-on: https://webrtc-review.googlesource.com/67360
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22796}
2018-04-09 13:55:49 +00:00

40 lines
1.2 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 {
RtpCapabilities::RtpCapabilities() = default;
RtpCapabilities::~RtpCapabilities() = default;
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