From 7edfddee25d043de6a10182c247b44a927de87bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Ro=C5=BCnawski?= Date: Tue, 28 May 2024 17:12:04 +0200 Subject: [PATCH] Update engine --- Dockerfile | 1 + config/config.exs | 4 ++-- lib/fishjam_web/peer_socket.ex | 11 +++++++---- mix.exs | 6 +++++- mix.lock | 2 +- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6e494ad..ece2048d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,7 @@ ENV MIX_ENV=prod # * any changes in rel directory should only trigger # making a new release COPY mix.exs mix.lock ./ +RUN git config --global http.postBuffer 524288000 && git config --global http.maxRequestBuffer 524288000 && git config --global core.compression 0 RUN mix deps.get --only $MIX_ENV COPY config/config.exs config/${MIX_ENV}.exs config/ diff --git a/config/config.exs b/config/config.exs index 1db072c3..1fc4f2c0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -29,8 +29,8 @@ config :phoenix, :logger, false config :logger, compile_time_purge_matching: [ - [application: :membrane_rtc_engine, level_lower_than: :warning], - [application: :membrane_rtc_engine_webrtc, level_lower_than: :warning], + [application: :membrane_rtc_engine, level_lower_than: :debug], + [application: :membrane_rtc_engine_webrtc, level_lower_than: :debug], [application: :membrane_rtc_engine_hls, level_lower_than: :warning], [application: :membrane_rtc_engine_rtsp, level_lower_than: :warning], [application: :membrane_rtc_engine_file, level_lower_than: :warning], diff --git a/lib/fishjam_web/peer_socket.ex b/lib/fishjam_web/peer_socket.ex index b00077a3..51104658 100644 --- a/lib/fishjam_web/peer_socket.ex +++ b/lib/fishjam_web/peer_socket.ex @@ -93,7 +93,7 @@ defmodule FishjamWeb.PeerSocket do @impl true def handle_in({msg, [opcode: :text]}, state) do Logger.warning(""" - Received unexpected text message #{msg} from #{inspect(state.peer_id)}, \ + Received unexpected text message #{inspect(msg)} from #{inspect(state.peer_id)}, \ room: #{inspect(state.room_id)} """) @@ -129,7 +129,10 @@ defmodule FishjamWeb.PeerSocket do @impl true def handle_info({:stop_connection, {:peer_crashed, crash_reason}}, state) when crash_reason != nil do - Logger.warning("Peer socket stopped because peer crashed with reason: #{crash_reason}") + Logger.warning( + "Peer socket stopped because peer crashed with reason: #{inspect(crash_reason)}" + ) + {:stop, :closed, {1011, crash_reason}, state} end @@ -147,7 +150,7 @@ defmodule FishjamWeb.PeerSocket do @impl true def terminate(reason, _state) do - Logger.info("Peer socket terminates with reason #{reason}") + Logger.info("Peer socket terminates with reason #{inspect(reason)}") :ok end @@ -157,5 +160,5 @@ defmodule FishjamWeb.PeerSocket do defp reason_to_string(:room_not_found), do: "room not found" defp reason_to_string(:peer_not_found), do: "peer not found" defp reason_to_string(:peer_already_connected), do: "peer already connected" - defp reason_to_string(other), do: "#{other}" + defp reason_to_string(other), do: "#{inspect(other)}" end diff --git a/mix.exs b/mix.exs index d9212bb1..dedd7d6a 100644 --- a/mix.exs +++ b/mix.exs @@ -70,7 +70,11 @@ defmodule Fishjam.MixProject do {:membrane_rtc_engine, github: "fishjam-dev/membrane_rtc_engine", sparse: "engine", override: true}, {:membrane_rtc_engine_webrtc, - github: "fishjam-dev/membrane_rtc_engine", sparse: "webrtc", override: true}, + github: "fishjam-dev/membrane_rtc_engine", + branch: "RTC-549-track-metadata-crash", + sparse: "webrtc", + override: true}, + # {:membrane_rtc_engine_webrtc, path: "~/fj/membrane_rtc_engine/webrtc", override: true}, {:membrane_rtc_engine_hls, "~> 0.7.0"}, {:membrane_rtc_engine_recording, "~> 0.1.0"}, {:membrane_rtc_engine_rtsp, diff --git a/mix.lock b/mix.lock index 0681f48e..58479d4d 100644 --- a/mix.lock +++ b/mix.lock @@ -73,7 +73,7 @@ "membrane_rtc_engine_recording": {:hex, :membrane_rtc_engine_recording, "0.1.0", "49f01747a92755ee9a37925873ac4a54a36e6d7946685ae6260bd714bb9874b0", [:mix], [{:elixir_uuid, "~> 1.2", [hex: :elixir_uuid, repo: "hexpm", optional: false]}, {:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:ex_aws_s3, "~> 2.0", [hex: :ex_aws_s3, repo: "hexpm", optional: false]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: false]}, {:membrane_core, "~> 1.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_file_plugin, "~> 0.16.0", [hex: :membrane_file_plugin, repo: "hexpm", optional: false]}, {:membrane_rtc_engine, "~> 0.22.0", [hex: :membrane_rtc_engine, repo: "hexpm", optional: false]}, {:membrane_rtc_engine_webrtc, "~> 0.8.0", [hex: :membrane_rtc_engine_webrtc, repo: "hexpm", optional: false]}, {:membrane_stream_plugin, "~> 0.4.0", [hex: :membrane_stream_plugin, repo: "hexpm", optional: false]}, {:membrane_tee_plugin, "~> 0.12.0", [hex: :membrane_tee_plugin, repo: "hexpm", optional: false]}, {:sweet_xml, "~> 0.6", [hex: :sweet_xml, repo: "hexpm", optional: false]}], "hexpm", "1ba142c25757c1727f5d8f3588b40349c0b1cd227011cc1411a50bdb2fd79cb1"}, "membrane_rtc_engine_rtsp": {:git, "https://github.com/fishjam-dev/membrane_rtc_engine.git", "1732bdda81af4bbb7d4a239b904b9f073388dcd0", [sparse: "rtsp"]}, "membrane_rtc_engine_sip": {:git, "https://github.com/fishjam-dev/membrane_rtc_engine.git", "1732bdda81af4bbb7d4a239b904b9f073388dcd0", [sparse: "sip"]}, - "membrane_rtc_engine_webrtc": {:git, "https://github.com/fishjam-dev/membrane_rtc_engine.git", "1732bdda81af4bbb7d4a239b904b9f073388dcd0", [sparse: "webrtc"]}, + "membrane_rtc_engine_webrtc": {:git, "https://github.com/fishjam-dev/membrane_rtc_engine.git", "2c872c053444d885d87b7ef51507f23dc845cdac", [branch: "RTC-549-track-metadata-crash", sparse: "webrtc"]}, "membrane_rtp_format": {:hex, :membrane_rtp_format, "0.8.0", "828924bbd27efcf85b2015ae781e824c4a9928f0a7dc132abc66817b2c6edfc4", [:mix], [{:membrane_core, "~> 1.0", [hex: :membrane_core, repo: "hexpm", optional: false]}], "hexpm", "bc75d2a649dfaef6df563212fbb9f9f62eebc871393692f9dae8d289bd4f94bb"}, "membrane_rtp_g711_plugin": {:hex, :membrane_rtp_g711_plugin, "0.2.0", "ce8dcd5c7dedec60f02778dec06a94fbcdc2be1c527d1ec99abebd904e39a8b3", [:mix], [{:membrane_core, "~> 1.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_g711_format, "~> 0.1.0", [hex: :membrane_g711_format, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.8.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "a852ff1e2619d832a0a6ffd3829853a44367c02398b67eca9bfa00b649ae005e"}, "membrane_rtp_h264_plugin": {:hex, :membrane_rtp_h264_plugin, "0.19.1", "8c61b3d2968e54e1b459a42f070ea71f597056eba4059df780eaa8da8aee6035", [:mix], [{:bunch, "~> 1.5", [hex: :bunch, repo: "hexpm", optional: false]}, {:membrane_core, "~> 1.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_h264_format, "~> 0.6.0", [hex: :membrane_h264_format, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.8.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "fb2bb5d4ed18f38523851cb449a2c78ed533e58028dc058342b8cfd659f812d5"},