2014-12-10 09:01:18 +00:00
|
|
|
/*
|
2016-02-07 20:46:45 -08:00
|
|
|
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
|
2014-12-10 09:01:18 +00:00
|
|
|
*
|
2016-02-07 20:46:45 -08:00
|
|
|
* 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.
|
2014-12-10 09:01:18 +00:00
|
|
|
*/
|
2015-01-20 21:36:13 +00:00
|
|
|
|
2016-02-12 06:39:40 +01:00
|
|
|
#ifndef WEBRTC_MEDIA_ENGINE_SIMULCAST_H_
|
|
|
|
|
#define WEBRTC_MEDIA_ENGINE_SIMULCAST_H_
|
2014-12-10 09:01:18 +00:00
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
#include "webrtc/base/basictypes.h"
|
|
|
|
|
#include "webrtc/config.h"
|
|
|
|
|
|
|
|
|
|
namespace cricket {
|
|
|
|
|
struct StreamParams;
|
|
|
|
|
|
2014-12-23 15:19:35 +00:00
|
|
|
// Config for use with screen cast when temporal layers are enabled.
|
|
|
|
|
struct ScreenshareLayerConfig {
|
|
|
|
|
public:
|
|
|
|
|
ScreenshareLayerConfig(int tl0_bitrate, int tl1_bitrate);
|
|
|
|
|
|
|
|
|
|
// Bitrates, for temporal layers 0 and 1.
|
|
|
|
|
int tl0_bitrate_kbps;
|
|
|
|
|
int tl1_bitrate_kbps;
|
|
|
|
|
|
|
|
|
|
static ScreenshareLayerConfig GetDefault();
|
|
|
|
|
|
|
|
|
|
// Parse bitrate from group name on format "(tl0_bitrate)-(tl1_bitrate)",
|
|
|
|
|
// eg. "100-1000" for the default rates.
|
|
|
|
|
static bool FromFieldTrialGroup(const std::string& group,
|
|
|
|
|
ScreenshareLayerConfig* config);
|
|
|
|
|
};
|
|
|
|
|
|
2014-12-10 09:01:18 +00:00
|
|
|
// TODO(pthatcher): Write unit tests just for these functions,
|
|
|
|
|
// independent of WebrtcVideoEngine.
|
|
|
|
|
|
2015-10-16 12:49:39 -07:00
|
|
|
int GetTotalMaxBitrateBps(const std::vector<webrtc::VideoStream>& streams);
|
2014-12-10 09:01:18 +00:00
|
|
|
|
|
|
|
|
// Get the ssrcs of the SIM group from the stream params.
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
void GetSimulcastSsrcs(const StreamParams& sp, std::vector<uint32_t>* ssrcs);
|
2014-12-10 09:01:18 +00:00
|
|
|
|
|
|
|
|
// Get simulcast settings.
|
2015-10-16 12:49:39 -07:00
|
|
|
std::vector<webrtc::VideoStream> GetSimulcastConfig(size_t max_streams,
|
|
|
|
|
int width,
|
|
|
|
|
int height,
|
|
|
|
|
int max_bitrate_bps,
|
|
|
|
|
int max_qp,
|
|
|
|
|
int max_framerate);
|
2014-12-10 09:01:18 +00:00
|
|
|
|
|
|
|
|
} // namespace cricket
|
|
|
|
|
|
2016-02-12 06:39:40 +01:00
|
|
|
#endif // WEBRTC_MEDIA_ENGINE_SIMULCAST_H_
|