Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Commit 4ee4f15

Browse files
authored
[MV-451] Update deps and bump version to 0.13.0 (#270)
1 parent cccaa89 commit 4ee4f15

File tree

6 files changed

+66
-79
lines changed

6 files changed

+66
-79
lines changed

.credo.exs

+3-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
{Credo.Check.Refactor.MatchInCondition, []},
126126
{Credo.Check.Refactor.NegatedConditionsInUnless, []},
127127
{Credo.Check.Refactor.NegatedConditionsWithElse, []},
128-
{Credo.Check.Refactor.Nesting, []},
128+
{Credo.Check.Refactor.Nesting, [max_nesting: 3]},
129129
{Credo.Check.Refactor.UnlessWithElse, []},
130130
{Credo.Check.Refactor.WithClauses, []},
131131

@@ -176,7 +176,8 @@
176176
{Credo.Check.Refactor.VariableRebinding, false},
177177
{Credo.Check.Warning.LeakyEnvironment, false},
178178
{Credo.Check.Warning.MapGetUnsafePass, false},
179-
{Credo.Check.Warning.UnsafeToAtom, false}
179+
{Credo.Check.Warning.UnsafeToAtom, false},
180+
{Credo.Check.Warning.MissedMetadataKeyInLoggerConfig, false}
180181

181182
#
182183
# Custom checks can be created using `mix credo.gen.check`.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The package can be installed by adding `membrane_rtc_engine` to your list of dep
2121
```elixir
2222
def deps do
2323
[
24-
{:membrane_rtc_engine, "~> 0.12.1"}
24+
{:membrane_rtc_engine, "~> 0.13.0"}
2525
]
2626
end
2727
```

guides/metrics.md

+43-33
Original file line numberDiff line numberDiff line change
@@ -18,46 +18,56 @@ Membrane.TelemetryMetrics.Reporter.scrape(reporter)
1818
There is a report example below, with only one room with one peer inside
1919
```elixir
2020
%{
21-
{:room_id, "my_meeting"} => %{
22-
{:peer_id, "aa83837e-c18a-4d0e-b7f1-565acdddd3e0"} => %{
21+
{:room_id, "test"} => %{
22+
{:peer_id, "7eda6931-0313-497e-93a0-6a9540407f77"} => %{
23+
:"ice.binding_requests_received" => 3,
24+
:"ice.binding_responses_sent" => 3,
25+
:"ice.bytes_received" => 20672,
26+
:"ice.bytes_sent" => 1634,
27+
:"ice.packets_received" => 46,
28+
:"ice.packets_sent" => 3,
29+
:"ice.port" => 51895,
30+
:"ice.protocol" => :udp,
31+
:"peer.metadata" => nil,
32+
:"sdp.answer" => "v=0\r\no=- ...",
33+
:"sdp.offer" => "v=0\r\no=- ...",
2334
{:track_id,
24-
"aa83837e-c18a-4d0e-b7f1-565acdddd3e0:2cfee338-37f9-46cf-8c5b-d3909caa4dce:l"} => %{
25-
"inbound-rtp.frames" => 5450,
26-
"inbound-rtp.keyframes" => 46,
27-
"inbound-rtp.bytes_received" => 4106974,
28-
"inbound-rtp.encoding" => :VP8,
29-
"inbound-rtp.keyframe_request_sent" => 22,
30-
"inbound-rtp.packets" => 6099,
31-
"inbound-rtp.ssrc" => 1507540019
35+
"7eda6931-0313-497e-93a0-6a9540407f77:3d228c10-d3b9-4009-b14f-4b0f2b89f7ba:l"} => %{
36+
"inbound-rtp.bytes_received": 6470,
37+
"inbound-rtp.encoding": :H264,
38+
"inbound-rtp.markers_received": 4,
39+
"inbound-rtp.packets": 10,
40+
"inbound-rtp.ssrc": 1546136873,
41+
rtx_stream: %{
42+
"inbound-rtp.bytes_received": 5120,
43+
"inbound-rtp.encoding": :rtx,
44+
"inbound-rtp.markers_received": 1,
45+
"inbound-rtp.packets": 6,
46+
"inbound-rtp.ssrc": 84792660
47+
},
48+
"track.metadata": %{"active" => true, "type" => "camera"}
3249
},
3350
{:track_id,
34-
"aa83837e-c18a-4d0e-b7f1-565acdddd3e0:2cfee338-37f9-46cf-8c5b-d3909caa4dce:m"} => %{
35-
"inbound-rtp.frames" => 5303,
36-
"inbound-rtp.keyframes" => 45,
37-
"inbound-rtp.bytes_received" => 21999552,
38-
"inbound-rtp.encoding" => :VP8,
39-
"inbound-rtp.keyframe_request_sent" => 22,
40-
"inbound-rtp.packets" => 20757,
41-
"inbound-rtp.ssrc" => 1441607303
51+
"7eda6931-0313-497e-93a0-6a9540407f77:3d228c10-d3b9-4009-b14f-4b0f2b89f7ba:m"} => %{
52+
"inbound-rtp.bytes_received": 5988,
53+
"inbound-rtp.encoding": :H264,
54+
"inbound-rtp.packets": 6,
55+
"inbound-rtp.ssrc": 3428415963,
56+
"track.metadata": %{"active" => true, "type" => "camera"}
4257
},
4358
{:track_id,
44-
"aa83837e-c18a-4d0e-b7f1-565acdddd3e0:a8ffd71d-932a-4955-b4da-d941449aa329:"} => %{
45-
"inbound-rtp.frames" => 11348,
46-
"inbound-rtp.bytes_received" => 1175977,
47-
"inbound-rtp.encoding" => :OPUS,
48-
"inbound-rtp.keyframe_request_sent" => 22,
49-
"inbound-rtp.packets" => 11348,
50-
"inbound-rtp.ssrc" => 3192426135
51-
},
52-
"ice.binding_requests_received" => 94,
53-
"ice.binding_responses_sent" => 94,
54-
"ice.bytes_received" => 27329251,
55-
"ice.bytes_sent" => 76030,
56-
"ice.packets_received" => 39189,
57-
"ice.packets_sent" => 975
59+
"7eda6931-0313-497e-93a0-6a9540407f77:90ce43b1-d37a-452e-8a04-b2883e7d54dc:"} => %{
60+
"inbound-rtp.bytes_received": 1885,
61+
"inbound-rtp.encoding": :OPUS,
62+
"inbound-rtp.markers_received": 1,
63+
"inbound-rtp.packets": 18,
64+
"inbound-rtp.ssrc": 3178961132,
65+
"rtcp.total_packets_sent": 1,
66+
"track.metadata": %{"active" => true, "type" => "audio"}
67+
}
5868
}
5969
}
6070
}
6171
```
6272

63-
You can also go to [`membrane_videoroom`](https://github.com/membraneframework/membrane_videoroom) or [`membrane_telemetry_metrics`](https://github.com/membraneframework/membrane_telemetry_metrics) docs for more examples.
73+
You can also go to [`membrane_videoroom`](https://github.com/membraneframework/membrane_videoroom) or [`membrane_telemetry_metrics`](https://github.com/membraneframework/membrane_telemetry_metrics) docs for more examples.

lib/membrane_rtc_engine/metrics.ex

+8-35
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,21 @@
11
defmodule Membrane.RTC.Engine.Metrics do
22
@moduledoc """
33
Defines list of metrics, that Reporter instance can aggregate by listening on events emitted in RTC Engine.
4-
Suggested Reporter implementation is `Membrane.TelemetryMetrics.Reporter` from `membrane_telemetry_metrics`.
5-
`Membrane.TelemetryMetrics.Reporter` started with metrics returned by `metrics/1` function will be able to generate reports, that matches type `Membrane.RTC.Engine.Metrics.rtc_engine_report()`
6-
You can see usage example in (`membrane_videoroom`)[github.com/membraneframework/membrane_videoroom].
7-
"""
8-
9-
alias Membrane.RTC.Engine.Endpoint.WebRTC.TrackReceiver
10-
alias Membrane.RTC.Engine.Track
4+
Suggested Reporter implementation is `Membrane.TelemetryMetrics.Reporter` from
5+
[`membrane_telemetry_metrics`](https://github.com/membraneframework/membrane_telemetry_metrics).
6+
You can see usage example in [`membrane_videoroom`](https://github.com/membraneframework/membrane_videoroom).
117
12-
@type rtc_engine_report() :: %{
13-
optional({:room_id, binary()}) => %{
14-
optional({:peer_id, binary()}) => %{
15-
optional({:track_id, binary()}) => %{
16-
:"inbound-rtp.encoding" => :OPUS | :VP8 | :H264,
17-
:"inbound-rtp.ssrc" => integer(),
18-
:"inbound-rtp.bytes_received" => integer(),
19-
:"inbound-rtp.keyframe_request_sent" => integer(),
20-
:"inbound-rtp.packets" => integer(),
21-
:"inbound-rtp.frames" => integer(),
22-
:"inbound-rtp.keyframes" => integer(),
23-
:"track.metadata" => any()
24-
},
25-
optional({:track_id, binary()}) => %{
26-
:"outbound-rtp.variant" => Track.variant(),
27-
:"outbound-rtp.variant-reason" => TrackReceiver.variant_switch_reason()
28-
},
29-
:"ice.binding_requests_received" => integer(),
30-
:"ice.binding_responses_sent" => integer(),
31-
:"ice.bytes_received" => integer(),
32-
:"ice.bytes_sent" => integer(),
33-
:"ice.packets_received" => integer(),
34-
:"ice.packets_sent" => integer(),
35-
:"peer.metadata" => any()
36-
}
37-
}
38-
}
8+
See also `Metrics` guide for more details and example report that you can obtain with
9+
`Membrane.TelemetryMetrics.Reporter`.
10+
"""
3911

4012
@spec metrics() :: [Telemetry.Metrics.t()]
4113
def metrics() do
4214
Enum.concat([
4315
rtc_engine_metrics(),
4416
Membrane.RTP.Metrics.metrics(),
45-
Membrane.ICE.Metrics.metrics()
17+
Membrane.ICE.Metrics.metrics(),
18+
Membrane.WebRTC.Metrics.metrics()
4619
])
4720
end
4821

mix.exs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Membrane.RTC.Engine.MixProject do
22
use Mix.Project
33

4-
@version "0.12.1"
4+
@version "0.13.0"
55
@github_url "https://github.com/jellyfish-dev/membrane_rtc_engine"
66

77
def project do
@@ -62,8 +62,11 @@ defmodule Membrane.RTC.Engine.MixProject do
6262
defp deps do
6363
[
6464
{:membrane_core, "~> 0.11.2"},
65-
{:membrane_webrtc_plugin, "~> 0.14.5"},
65+
{:membrane_webrtc_plugin, "~> 0.14.6"},
6666
{:membrane_rtp_plugin, "~> 0.22.0"},
67+
# as we explicitly call Membrane.ICE.Metrics.metrics/0,
68+
# we have to explicitly put it in deps
69+
{:membrane_ice_plugin, "~> 0.15.0"},
6770
{:membrane_rtp_format, "~> 0.6.0"},
6871
{:membrane_tee_plugin, "~> 0.10.0"},
6972
{:membrane_opentelemetry, "~> 0.1.0"},

0 commit comments

Comments
 (0)