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
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MEDIA_ENGINE_SIMULCAST_H_
|
|
|
|
|
#define MEDIA_ENGINE_SIMULCAST_H_
|
2014-12-10 09:01:18 +00:00
|
|
|
|
2017-10-31 09:53:08 -07:00
|
|
|
#include <string>
|
2014-12-10 09:01:18 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "call/video_config.h"
|
|
|
|
|
#include "rtc_base/basictypes.h"
|
2014-12-10 09:01:18 +00:00
|
|
|
|
|
|
|
|
namespace cricket {
|
|
|
|
|
struct StreamParams;
|
|
|
|
|
|
2017-01-26 06:12:26 -08:00
|
|
|
// TODO(sprang): Remove this, as we're moving away from temporal layer mode.
|
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.
|
2017-01-26 06:12:26 -08:00
|
|
|
// TODO(sprang): Remove default parameter when it's not longer referenced.
|
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,
|
2017-01-26 06:12:26 -08:00
|
|
|
int max_framerate,
|
|
|
|
|
bool is_screencast = false);
|
|
|
|
|
|
|
|
|
|
bool UseSimulcastScreenshare();
|
2014-12-10 09:01:18 +00:00
|
|
|
|
|
|
|
|
} // namespace cricket
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MEDIA_ENGINE_SIMULCAST_H_
|