Skip to content

Commit

Permalink
Merge pull request #4 from versatica/v3
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
penguinol authored May 28, 2020
2 parents de2ed3f + 8095e49 commit e9f84c0
Show file tree
Hide file tree
Showing 38 changed files with 754 additions and 647 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Changelog

### 3.5.14 (WIP)
### 3.5.16 (WIP)

* Update `Catch2` to v2.12.2.


### 3.5.15

* Simulcast and SVC: Better computation of desired bitrate based on `maxBitrate` field in the `producer.rtpParameters.encodings`.


### 3.5.14

* Update deps, speciall `uuid` and `@types/uuid` that had a TypeScript related bug.
* `TransportCongestionClient.cpp`: Improve sender side bandwidth estimation by do not reporting `this->initialAvailableBitrate` as available bitrate due to strange behavior in the algorithm.
Expand Down
5 changes: 5 additions & 0 deletions lib/RtpParameters.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ export declare type RtpEncodingParameters = {
* See webrtc-svc.
*/
scalabilityMode?: string;
/**
* Others.
*/
scaleResolutionDownBy?: number;
maxBitrate?: number;
};
/**
* Defines a RTP header extension within the RTP parameters. The list of RTP
Expand Down
2 changes: 1 addition & 1 deletion lib/RtpParameters.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Worker extends EnhancedEventEmitter_1.EnhancedEventEmitter {
// options
{
env: {
MEDIASOUP_VERSION: '3.5.14'
MEDIASOUP_VERSION: '3.5.15'
},
detached: false,
// fd 0 (stdin) : Just ignore it.
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports.types = types;
/**
* Expose mediasoup version.
*/
exports.version = '3.5.14';
exports.version = '3.5.15';
/**
* Expose parseScalabilityMode() function.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/ortc.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lib/ortc.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,12 @@ function getConsumerRtpParameters(consumableParams, caps) {
}
if (scalabilityMode)
consumerEncoding.scalabilityMode = scalabilityMode;
// Use the maximum maxBitrate in any encoding and honor it in the Consumer's
// encoding.
const maxEncodingMaxBitrate = consumableParams.encodings.reduce((maxBitrate, encoding) => (encoding.maxBitrate > maxBitrate ? encoding.maxBitrate : maxBitrate), 0);
if (maxEncodingMaxBitrate) {
consumerEncoding.maxBitrate = maxEncodingMaxBitrate;
}
// Set a single encoding for the Consumer.
consumerParams.encodings.push(consumerEncoding);
// Copy verbatim.
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mediasoup",
"version": "3.5.14",
"version": "3.5.15",
"description": "Cutting Edge WebRTC Video Conferencing",
"contributors": [
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
Expand Down Expand Up @@ -59,18 +59,18 @@
"@types/debug": "^4.1.5",
"@types/random-number": "0.0.0",
"@types/uuid": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^3.0.0",
"@typescript-eslint/parser": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^3.0.2",
"@typescript-eslint/parser": "^3.0.2",
"cross-env": "^7.0.2",
"eslint": "^7.0.0",
"eslint-plugin-jest": "^23.13.1",
"eslint": "^7.1.0",
"eslint-plugin-jest": "^23.13.2",
"gulp": "^4.0.2",
"gulp-clang-format": "^1.0.27",
"jest": "^26.0.1",
"jest-tobetype": "^1.2.3",
"open-cli": "^6.0.1",
"sctp": "^0.0.21",
"tsc-watch": "^4.2.7",
"tsc-watch": "^4.2.8",
"typescript": "~3.8.3"
},
"optionalDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions src/RtpParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ export type RtpEncodingParameters =
* See webrtc-svc.
*/
scalabilityMode?: string;

/**
* Others.
*/
scaleResolutionDownBy?: number;
maxBitrate?: number;
}

/**
Expand Down
12 changes: 12 additions & 0 deletions src/ortc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,18 @@ export function getConsumerRtpParameters(
if (scalabilityMode)
consumerEncoding.scalabilityMode = scalabilityMode;

// Use the maximum maxBitrate in any encoding and honor it in the Consumer's
// encoding.
const maxEncodingMaxBitrate =
consumableParams.encodings.reduce((maxBitrate, encoding) => (
encoding.maxBitrate > maxBitrate ? encoding.maxBitrate : maxBitrate), 0
);

if (maxEncodingMaxBitrate)
{
consumerEncoding.maxBitrate = maxEncodingMaxBitrate;
}

// Set a single encoding for the Consumer.
consumerParams.encodings.push(consumerEncoding);

Expand Down
1 change: 1 addition & 0 deletions test/test-ortc.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ test('getProducerRtpParametersMapping(), getConsumableRtpParameters(), getConsum
expect(consumerRtpParameters.encodings[0].rtx).toBeType('object');
expect(consumerRtpParameters.encodings[0].rtx.ssrc).toBeType('number');
expect(consumerRtpParameters.encodings[0].scalabilityMode).toBe('S3T3');
expect(consumerRtpParameters.encodings[0].maxBitrate).toBe(333333);

expect(consumerRtpParameters.headerExtensions).toEqual(
[
Expand Down
2 changes: 1 addition & 1 deletion worker/deps/catch/.conan/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def upload(self):
not match the stable pattern. Otherwise it will upload to stable
channel.
"""
return os.getenv("CONAN_UPLOAD", "https://api.bintray.com/conan/catchorg/Catch2")
return os.getenv("CONAN_UPLOAD", "https://api.bintray.com/conan/catchorg/catch2")

@property
def upload_only_when_stable(self):
Expand Down
1 change: 1 addition & 0 deletions worker/deps/catch/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ Build
cmake-build-*
benchmark-dir
.conan/test_package/build
bazel-*
10 changes: 10 additions & 0 deletions worker/deps/catch/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Load the cc_library rule.
load("@rules_cc//cc:defs.bzl", "cc_library")

# Header-only rule to export catch2/catch.hpp.
cc_library(
name = "catch2",
hdrs = ["single_include/catch2/catch.hpp"],
visibility = ["//visibility:public"],
includes = ["single_include/"],
)
2 changes: 1 addition & 1 deletion worker/deps/catch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()


project(Catch2 LANGUAGES CXX VERSION 2.12.1)
project(Catch2 LANGUAGES CXX VERSION 2.12.2)

# Provide path for scripts
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")
Expand Down
4 changes: 2 additions & 2 deletions worker/deps/catch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
[![Build Status](https://travis-ci.org/catchorg/Catch2.svg?branch=master)](https://travis-ci.org/catchorg/Catch2)
[![Build status](https://ci.appveyor.com/api/projects/status/github/catchorg/Catch2?svg=true)](https://ci.appveyor.com/project/catchorg/catch2)
[![codecov](https://codecov.io/gh/catchorg/Catch2/branch/master/graph/badge.svg)](https://codecov.io/gh/catchorg/Catch2)
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/DQL97fLLJLZXwB8d)
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/QdDfqVqDGRuwcduN)
[![Join the chat in Discord: https://discord.gg/4CWS9zD](https://img.shields.io/badge/Discord-Chat!-brightgreen.svg)](https://discord.gg/4CWS9zD)


<a href="https://github.com/catchorg/Catch2/releases/download/v2.12.1/catch.hpp">The latest version of the single header can be downloaded directly using this link</a>
<a href="https://github.com/catchorg/Catch2/releases/download/v2.12.2/catch.hpp">The latest version of the single header can be downloaded directly using this link</a>

## Catch2 is released!

Expand Down
Empty file added worker/deps/catch/WORKSPACE
Empty file.
3 changes: 3 additions & 0 deletions worker/deps/catch/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ def package(self):

def package_id(self):
self.info.header_only()

def package_info(self):
self.cpp_info.builddirs.append("lib/cmake/Catch2")
4 changes: 2 additions & 2 deletions worker/deps/catch/docs/own-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ The easiest way to use Catch is to let it supply ```main()``` for you and handle

This is achieved by writing ```#define CATCH_CONFIG_MAIN``` before the ```#include "catch.hpp"``` in *exactly one* source file.

Sometimes, though, you need to write your own version of main(). You can do this by writing ```#define CATCH_CONFIG_RUNNER``` instead. Now you are free to write ```main()``` as normal and call into Catch yourself manually.
Sometimes, though, you need to write your own version of main(). You can do this by writing ```#define CATCH_CONFIG_RUNNER``` instead. Now you are free to write ```main()``` as normal and call into Catch yourself manually. You now have a lot of flexibility - but here are three recipes to get your started:

You now have a lot of flexibility - but here are three recipes to get your started:
**Important note: you can only provide `main` in the same file you defined `CATCH_CONFIG_RUNNER`.**

## Let Catch take full control of args and config

Expand Down
15 changes: 15 additions & 0 deletions worker/deps/catch/docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Release notes
**Contents**<br>
[2.12.2](#2122)<br>
[2.12.1](#2121)<br>
[2.12.0](#2120)<br>
[2.11.3](#2113)<br>
Expand Down Expand Up @@ -36,6 +37,20 @@
[Older versions](#older-versions)<br>
[Even Older versions](#even-older-versions)<br>


## 2.12.2

### Fixes
* Fixed compilation failure if `is_range` ADL found deleted function (#1929)
* Fixed potential UB in `CAPTURE` if the expression contained non-ASCII characters (#1925)

### Improvements
* `std::result_of` is not used if `std::invoke_result` is available (#1934)
* JUnit reporter writes out `status` attribute for tests (#1899)
* Suppresed clang-tidy's `hicpp-vararg` warning (#1921)
* Catch2 was already suppressing the `cppcoreguidelines-pro-type-vararg` alias of the warning


## 2.12.1

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion worker/deps/catch/include/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#define CATCH_VERSION_MAJOR 2
#define CATCH_VERSION_MINOR 12
#define CATCH_VERSION_PATCH 1
#define CATCH_VERSION_PATCH 2

#ifdef __clang__
# pragma clang system_header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED

#include "../../catch_enforce.h"
#include "../../catch_meta.hpp"

#include <type_traits>
#include <utility>
Expand Down Expand Up @@ -42,20 +43,18 @@ namespace Catch {
return {};
}
};
template <typename Sig>
using ResultOf_t = typename std::result_of<Sig>::type;

// invoke and not return void :(
template <typename Fun, typename... Args>
CompleteType_t<ResultOf_t<Fun(Args...)>> complete_invoke(Fun&& fun, Args&&... args) {
return CompleteInvoker<ResultOf_t<Fun(Args...)>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...);
CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun&& fun, Args&&... args) {
return CompleteInvoker<FunctionReturnType<Fun, Args...>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...);
}

const std::string benchmarkErrorMsg = "a benchmark failed to run successfully";
} // namespace Detail

template <typename Fun>
Detail::CompleteType_t<Detail::ResultOf_t<Fun()>> user_code(Fun&& fun) {
Detail::CompleteType_t<FunctionReturnType<Fun>> user_code(Fun&& fun) {
CATCH_TRY{
return Detail::complete_invoke(std::forward<Fun>(fun));
} CATCH_CATCH_ALL{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Catch {
namespace Benchmark {
namespace Detail {
template <typename Clock, typename Fun, typename... Args>
TimingOf<Clock, Fun(Args...)> measure(Fun&& fun, Args&&... args) {
TimingOf<Clock, Fun, Args...> measure(Fun&& fun, Args&&... args) {
auto start = Clock::now();
auto&& r = Detail::complete_invoke(fun, std::forward<Args>(args)...);
auto end = Clock::now();
Expand Down
Loading

0 comments on commit e9f84c0

Please sign in to comment.