From ff6cf4b9400abd89dd23845ab8e52ed70e8b19cf Mon Sep 17 00:00:00 2001 From: Karol Konkol Date: Fri, 17 May 2024 16:04:18 +0200 Subject: [PATCH 1/6] Forward rtcp sender packet event --- lib/membrane/rtcp/receiver.ex | 2 +- mix.exs | 3 +-- mix.lock | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/membrane/rtcp/receiver.ex b/lib/membrane/rtcp/receiver.ex index 5eb95b3a..b72cfdf2 100644 --- a/lib/membrane/rtcp/receiver.ex +++ b/lib/membrane/rtcp/receiver.ex @@ -86,7 +86,7 @@ defmodule Membrane.RTCP.Receiver do arrival_ts: event.arrival_timestamp } - {[], %{state | sr_info: sr_info}} + {[event: {:output, event}], %{state | sr_info: sr_info}} end @impl true diff --git a/mix.exs b/mix.exs index ebe52aca..5420aa48 100644 --- a/mix.exs +++ b/mix.exs @@ -40,8 +40,7 @@ defmodule Membrane.RTP.Plugin.MixProject do {:membrane_rtp_format, "~> 0.8.0"}, {:membrane_funnel_plugin, "~> 0.9.0"}, {:membrane_telemetry_metrics, "~> 0.1.0"}, - {:membrane_rtsp, - github: "membraneframework/membrane_rtsp", branch: "expand-length-verification"}, + {:membrane_rtsp, "~> 0.7.0"}, {:ex_libsrtp, "~> 0.6.0 or ~> 0.7.0", optional: true}, {:qex, "~> 0.5.1"}, {:bunch, "~> 1.5"}, diff --git a/mix.lock b/mix.lock index 84cd4f84..ca5f1e39 100644 --- a/mix.lock +++ b/mix.lock @@ -40,7 +40,7 @@ "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_h264_plugin": {:hex, :membrane_rtp_h264_plugin, "0.19.0", "112bfedc14fb83bdb549ef1a03da23908feedeb165fd3e4512a549f1af532ae7", [: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", "76fd159e7406cadbef15124cba30eca3fffcf71a7420964f26e23d4cffd9b29d"}, "membrane_rtp_mpegaudio_plugin": {:hex, :membrane_rtp_mpegaudio_plugin, "0.14.0", "eda543add9e035c8c0a99aaf7400f424922737efe934856b02b48e61679edba5", [:mix], [{:membrane_core, "~> 1.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_mpegaudio_format, "~> 0.3.0", [hex: :membrane_mpegaudio_format, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.8.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "ec19247c7907771d38914aafbb7df74bdc2744c8b2ae29b34106b9bbcc5ede10"}, - "membrane_rtsp": {:git, "https://github.com/membraneframework/membrane_rtsp.git", "fb7526292de77826fde814de8d81a8ee03441069", [branch: "expand-length-verification"]}, + "membrane_rtsp": {:hex, :membrane_rtsp, "0.7.0", "92b145cd7c18e897c6e3e3f2e8c5b95bd98d9eec41f45755875eadd222c42933", [:mix], [{:bunch, "~> 1.6", [hex: :bunch, repo: "hexpm", optional: false]}, {:ex_sdp, "~> 0.15.0", [hex: :ex_sdp, repo: "hexpm", optional: false]}, {:mockery, "~> 2.3", [hex: :mockery, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.4.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "debf4fa612ea6b084bce1926745c660e404bf647ed975cf22f01925084080cbe"}, "membrane_telemetry_metrics": {:hex, :membrane_telemetry_metrics, "0.1.0", "cb93d28356b436b0597736c3e4153738d82d2a14ff547f831df7e9051e54fc06", [:mix], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6.1", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "aba28dc8311f70ced95d984509be930fac55857d2d18bffcf768815e627be3f0"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, From 37e3eda61a4ca2b91f9d58d8dc181be66087f8a9 Mon Sep 17 00:00:00 2001 From: Karol Konkol Date: Mon, 20 May 2024 17:29:06 +0200 Subject: [PATCH 2/6] Update RTCP section in SessionBin docs --- lib/membrane/rtp/session_bin.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/membrane/rtp/session_bin.ex b/lib/membrane/rtp/session_bin.ex index 3b8974db..7f116d01 100644 --- a/lib/membrane/rtp/session_bin.ex +++ b/lib/membrane/rtp/session_bin.ex @@ -59,6 +59,8 @@ defmodule Membrane.RTP.SessionBin do receiver report packets will be sent back through `rtcp_receiver_output` with the same id as `rtp_input` for the RTP stream. RTCP for outbound stream is not yet supported. # But will be :) + + RTCP sender reports are dispatched as `Membrane.RTCP.SenderReportPacket` events on session bin `:output` pads """ use Membrane.Bin From edd7b262b2bab57b8e41502457d89cd47f1b3430 Mon Sep 17 00:00:00 2001 From: Karol Konkol Date: Mon, 20 May 2024 17:53:17 +0200 Subject: [PATCH 3/6] Release 0.28.0 --- README.md | 2 +- mix.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0551f731..fed6360a 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The package can be installed by adding `membrane_rtp_plugin` to your list of dep ```elixir def deps do [ - {:membrane_rtp_plugin, "~> 0.27.1"}, + {:membrane_rtp_plugin, "~> 0.28.0"}, {:ex_libsrtp, ">= 0.0.0"} # required only if SRTP/SRTCP support is needed ] end diff --git a/mix.exs b/mix.exs index 5420aa48..fdf74a46 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Membrane.RTP.Plugin.MixProject do use Mix.Project - @version "0.27.1" + @version "0.28.0" @github_url "https://github.com/membraneframework/membrane_rtp_plugin" def project do From fbfa5f808c24b0a101993db16855068a854e4bc4 Mon Sep 17 00:00:00 2001 From: Karol Konkol Date: Tue, 21 May 2024 17:18:49 +0200 Subject: [PATCH 4/6] Requested changes --- lib/membrane/rtp/session_bin.ex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/membrane/rtp/session_bin.ex b/lib/membrane/rtp/session_bin.ex index 7f116d01..5fc5a80e 100644 --- a/lib/membrane/rtp/session_bin.ex +++ b/lib/membrane/rtp/session_bin.ex @@ -58,9 +58,11 @@ defmodule Membrane.RTP.SessionBin do RTCP packets for inbound stream can be provided either in-band or via a separate `rtp_input` pad instance. Corresponding receiver report packets will be sent back through `rtcp_receiver_output` with the same id as `rtp_input` for the RTP stream. - RTCP for outbound stream is not yet supported. # But will be :) + RTCP sender reports from inbound streams are parsed and then dispatched as `Membrane.RTCP.SenderReportPacket` events on session bin `:output` pads. + On each `Pad.ref(:output, ssrc)`, only RTCP sender reports with the corresponding SSRC will be sent. + These reports can be used, for instance, to synchronize different rtp streams. - RTCP sender reports are dispatched as `Membrane.RTCP.SenderReportPacket` events on session bin `:output` pads + RTCP for outbound stream is not yet supported. # But will be :) """ use Membrane.Bin From 3a97566b00f02c52c73d80f6abd9e4c9a66b468a Mon Sep 17 00:00:00 2001 From: Karol Konkol Date: Wed, 22 May 2024 17:22:34 +0200 Subject: [PATCH 5/6] Update SessionBin docs --- lib/membrane/rtp/session_bin.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/membrane/rtp/session_bin.ex b/lib/membrane/rtp/session_bin.ex index 5fc5a80e..bfb7fa44 100644 --- a/lib/membrane/rtp/session_bin.ex +++ b/lib/membrane/rtp/session_bin.ex @@ -62,7 +62,8 @@ defmodule Membrane.RTP.SessionBin do On each `Pad.ref(:output, ssrc)`, only RTCP sender reports with the corresponding SSRC will be sent. These reports can be used, for instance, to synchronize different rtp streams. - RTCP for outbound stream is not yet supported. # But will be :) + RTCP packets for the outbound stream are available `rtcp_sender_output` pad. + RTCP packets will only be produced if rtcp_receiver_report_interval option is set to a value other than nil. """ use Membrane.Bin From b2d4cd2c87b8087ccc07e9268da5d3c5fd2ed7d4 Mon Sep 17 00:00:00 2001 From: Karol Konkol <56369082+Karolk99@users.noreply.github.com> Date: Thu, 23 May 2024 11:53:58 +0200 Subject: [PATCH 6/6] Update lib/membrane/rtp/session_bin.ex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michał Śledź --- lib/membrane/rtp/session_bin.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/membrane/rtp/session_bin.ex b/lib/membrane/rtp/session_bin.ex index bfb7fa44..618fcdd0 100644 --- a/lib/membrane/rtp/session_bin.ex +++ b/lib/membrane/rtp/session_bin.ex @@ -62,8 +62,8 @@ defmodule Membrane.RTP.SessionBin do On each `Pad.ref(:output, ssrc)`, only RTCP sender reports with the corresponding SSRC will be sent. These reports can be used, for instance, to synchronize different rtp streams. - RTCP packets for the outbound stream are available `rtcp_sender_output` pad. - RTCP packets will only be produced if rtcp_receiver_report_interval option is set to a value other than nil. + RTCP packets for the outbound stream are available on `rtcp_sender_output` pad. + RTCP packets will only be produced if rtcp_sender_report_interval option is set to a value other than nil. """ use Membrane.Bin