Skip to content

Commit d4fd7e9

Browse files
authored
Bump ex_webrtc to 0.14. Release all demos (#82)
1 parent 4502fee commit d4fd7e9

File tree

10 files changed

+144
-92
lines changed

10 files changed

+144
-92
lines changed

broadcaster/lib/broadcaster/forwarder.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ defmodule Broadcaster.Forwarder do
88
alias Phoenix.PubSub
99

1010
alias ExWebRTC.PeerConnection
11-
alias ExWebRTC.RTP.H264
1211
alias ExWebRTC.RTP.Munger
12+
alias ExWebRTC.RTP.VP8
1313
alias ExWebRTC.Recorder
1414

1515
alias Broadcaster.PeerSupervisor
@@ -460,7 +460,7 @@ defmodule Broadcaster.Forwarder do
460460
layer = default_layer(input)
461461

462462
{audio_track, video_track} = get_tracks(pc, :sender)
463-
munger = Munger.new(90_000)
463+
munger = Munger.new(:vp8, 90_000)
464464

465465
output = %{
466466
audio: audio_track.id,
@@ -484,7 +484,7 @@ defmodule Broadcaster.Forwarder do
484484
Map.new(state.outputs, fn
485485
{pc, %{input_id: ^input_id, layer: layer, pending_layer: p_layer} = output} ->
486486
output =
487-
if p_layer == rid and p_layer != layer and H264.keyframe?(packet) do
487+
if p_layer == rid and p_layer != layer and VP8.keyframe?(packet) do
488488
munger = Munger.update(output.munger)
489489
%{output | layer: p_layer, munger: munger}
490490
else

broadcaster/mix.exs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Broadcaster.MixProject do
44
def project do
55
[
66
app: :broadcaster,
7-
version: "0.9.0",
7+
version: "0.10.0",
88
elixir: "~> 1.14",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
start_permanent: Mix.env() == :prod,
@@ -58,8 +58,9 @@ defmodule Broadcaster.MixProject do
5858
{:jason, "~> 1.2"},
5959
{:bandit, "~> 1.2"},
6060
{:corsica, "~> 2.1.3"},
61-
{:ex_webrtc, "~> 0.8.0"},
62-
{:ex_webrtc_dashboard, "~> 0.8.0"},
61+
{:ex_webrtc, "~> 0.14.0"},
62+
{:ex_webrtc_dashboard, "~> 0.9.0"},
63+
{:ex_webrtc_recorder, "~> 0.3.0"},
6364
{:earmark, "~> 1.4"},
6465
{:libcluster, "~> 3.4"},
6566
{:syn, "~> 3.3"},

broadcaster/mix.lock

Lines changed: 49 additions & 23 deletions
Large diffs are not rendered by default.

nexus/lib/nexus/room.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ defmodule Nexus.Room do
7878
end
7979

8080
@impl true
81-
def handle_call({:mark_ready, id, _peer_ids}, _from, state) do
81+
def handle_call({:mark_ready, id}, _from, state) do
8282
Logger.debug("Peer #{id} was already marked as ready, ignoring")
8383

8484
{:reply, :ok, state}

nexus/mix.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Nexus.MixProject do
44
def project do
55
[
66
app: :nexus,
7-
version: "0.4.0",
7+
version: "0.5.0",
88
elixir: "~> 1.14",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
start_permanent: Mix.env() == :prod,
@@ -51,8 +51,8 @@ defmodule Nexus.MixProject do
5151
{:jason, "~> 1.2"},
5252
{:dns_cluster, "~> 0.1.1"},
5353
{:bandit, "~> 1.2"},
54-
{:ex_webrtc, "~> 0.8.0"},
55-
{:ex_webrtc_dashboard, "~> 0.8.0"},
54+
{:ex_webrtc, "~> 0.14.0"},
55+
{:ex_webrtc_dashboard, "~> 0.9.0"},
5656

5757
# Dialyzer and credo
5858
{:dialyxir, ">= 0.0.0", only: :dev, runtime: false},

nexus/mix.lock

Lines changed: 22 additions & 22 deletions
Large diffs are not rendered by default.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- ./deps/exla/Makefile 2025-06-23 13:36:52
2+
+++ ./deps/exla/Makefile 2025-06-23 14:09:21
3+
@@ -27,6 +27,7 @@
4+
# Note: this is on :xla 0.5.0 -- things can change with later versions
5+
CFLAGS = -fPIC -I$(ERTS_INCLUDE_DIR) -I$(XLA_INCLUDE_PATH) -Wall -Wno-sign-compare \
6+
-Wno-unused-parameter -Wno-missing-field-initializers -Wno-comment \
7+
+ -Wno-missing-template-arg-list-after-template-kw \
8+
-std=c++17 -w -DLLVM_VERSION_STRING=
9+
10+
NVCCFLAGS = -shared -Xcompiler -fPIC

recognizer/lib/recognizer/room.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ defmodule Recognizer.Room do
5353
task: nil,
5454
video_track: nil,
5555
video_depayloader: video_depayloader,
56-
video_decoder: Xav.Decoder.new(:vp8),
56+
video_decoder: Xav.Decoder.new(:vp8, out_format: :rgb24),
5757
video_buffer: JitterBuffer.new(latency: @jitter_buffer_latency_ms),
5858
audio_track: nil,
5959
session_start_time: System.monotonic_time(:millisecond)

recognizer/mix.exs

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Recognizer.MixProject do
44
def project do
55
[
66
app: :recognizer,
7-
version: "0.6.0",
7+
version: "0.7.0",
88
elixir: "~> 1.14",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
start_permanent: Mix.env() == :prod,
@@ -58,11 +58,11 @@ defmodule Recognizer.MixProject do
5858
{:jason, "~> 1.2"},
5959
{:dns_cluster, "~> 0.1.1"},
6060
{:plug_cowboy, "~> 2.5"},
61-
{:ex_webrtc, "~> 0.8.0"},
62-
{:ex_webrtc_dashboard, "~> 0.8.0"},
63-
{:xav, "~> 0.8.0"},
64-
{:bumblebee, "~> 0.5.3"},
65-
{:exla, "~> 0.7.1"},
61+
{:ex_webrtc, "~> 0.14.0"},
62+
{:ex_webrtc_dashboard, "~> 0.9.0"},
63+
{:xav, "~> 0.11.0"},
64+
{:bumblebee, "~> 0.6.2"},
65+
{:exla, "~> 0.9.2"},
6666

6767
# Dialyzer and credo
6868
{:dialyxir, ">= 0.0.0", only: :dev, runtime: false},
@@ -78,12 +78,13 @@ defmodule Recognizer.MixProject do
7878
# See the documentation for `Mix` for more info on aliases.
7979
defp aliases do
8080
[
81-
setup: ["deps.get", "assets.setup", "assets.build"],
81+
setup: ["deps.get", "deps.patch", "assets.setup", "assets.build"],
8282
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
8383
"assets.build": ["tailwind default", "esbuild default"],
8484
"assets.deploy": ["tailwind default --minify", "esbuild default --minify", "phx.digest"],
8585
"assets.format": &lint_and_format_assets/1,
86-
"assets.check": &check_assets/1
86+
"assets.check": &check_assets/1,
87+
"deps.patch": &patch_deps/1
8788
]
8889
end
8990

@@ -114,4 +115,18 @@ defmodule Recognizer.MixProject do
114115
{_stream, rc} = System.cmd("npm", ["--prefix=assets"] ++ command, into: IO.stream())
115116
{command, rc}
116117
end
118+
119+
# HACK: With clang 17.0.0, compilation of `exla==0.9.2` fails because of the `-Wmissing-template-arg-list-after-template-kw` check.
120+
# This issue isn't present in `exla==0.10.0`, but `bumblebee==0.6.2` depends on `nx ~> 0.9.0`,
121+
# and since `exla==0.10.0` depends on `nx ~> 0.10.0`, we're stuck on `exla==0.9.2` until a new version of `bumblebee` is released.
122+
#
123+
# This patch adds the `-Wno-missing-template-arg-list-after-template-kw` flag in `exla`'s Makefile to suppress the compiler warning.
124+
defp patch_deps(_args) do
125+
{_, _} =
126+
System.cmd("patch", ~w(-p1 -i ./0000-exla-disable-failing-clang-compile-check.patch),
127+
into: IO.stream()
128+
)
129+
130+
:ok
131+
end
117132
end

0 commit comments

Comments
 (0)