From 1317be49777a71cc14c01821163c933e25951c59 Mon Sep 17 00:00:00 2001 From: "feliks.pobiedzinski@swmansion.com" Date: Fri, 21 Jul 2023 13:46:31 +0200 Subject: [PATCH 1/4] Fix specs for default pipeline functions --- lib/membrane/pipeline.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/membrane/pipeline.ex b/lib/membrane/pipeline.ex index 9a99a3392..6c6db471d 100644 --- a/lib/membrane/pipeline.ex +++ b/lib/membrane/pipeline.ex @@ -438,7 +438,7 @@ defmodule Membrane.Pipeline do @spec start_link( pipeline_options :: unquote(__MODULE__).pipeline_options(), process_options :: GenServer.options() - ) :: GenServer.on_start() + ) :: unquote(__MODULE__).on_start() def start_link(pipeline_options \\ nil, process_options \\ []) do unquote(__MODULE__).start_link(__MODULE__, pipeline_options, process_options) end @@ -454,7 +454,7 @@ defmodule Membrane.Pipeline do @spec start( pipeline_options :: unquote(__MODULE__).pipeline_options(), process_options :: GenServer.options() - ) :: GenServer.on_start() + ) :: unquote(__MODULE__).on_start() def start(pipeline_options \\ nil, process_options \\ []) do unquote(__MODULE__).start(__MODULE__, pipeline_options, process_options) end @@ -464,7 +464,7 @@ defmodule Membrane.Pipeline do @doc """ Changes pipeline's playback to `:stopped` and terminates its process. """ - @spec terminate(pid, Keyword.t()) :: :ok + @spec terminate(pid, Keyword.t()) :: :ok | {:ok, pid()} | {:error, :timeout} defdelegate terminate(pipeline, opts \\ []), to: unquote(__MODULE__) end end From 3486ff5ce652ad79cef0e58c5ca7a21fce4c1118 Mon Sep 17 00:00:00 2001 From: "feliks.pobiedzinski@swmansion.com" Date: Mon, 21 Aug 2023 16:29:47 +0200 Subject: [PATCH 2/4] Implement suggestion from CR --- lib/membrane/pipeline.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/membrane/pipeline.ex b/lib/membrane/pipeline.ex index 6c6db471d..61ce99358 100644 --- a/lib/membrane/pipeline.ex +++ b/lib/membrane/pipeline.ex @@ -436,7 +436,7 @@ defmodule Membrane.Pipeline do A proxy for `#{inspect(unquote(__MODULE__))}.start_link/3` """ @spec start_link( - pipeline_options :: unquote(__MODULE__).pipeline_options(), + unquote(__MODULE__).pipeline_options(), process_options :: GenServer.options() ) :: unquote(__MODULE__).on_start() def start_link(pipeline_options \\ nil, process_options \\ []) do @@ -452,7 +452,7 @@ defmodule Membrane.Pipeline do A proxy for `#{inspect(unquote(__MODULE__))}.start/3` """ @spec start( - pipeline_options :: unquote(__MODULE__).pipeline_options(), + unquote(__MODULE__).pipeline_options(), process_options :: GenServer.options() ) :: unquote(__MODULE__).on_start() def start(pipeline_options \\ nil, process_options \\ []) do From 840afd3f9fd8ae4aebdca418ba65c548a19cfa9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Feliks=20Pobiedzi=C5=84ski?= <38541925+FelonEkonom@users.noreply.github.com> Date: Tue, 22 Aug 2023 17:13:47 +0200 Subject: [PATCH 3/4] Update lib/membrane/pipeline.ex Co-authored-by: Mateusz Front --- lib/membrane/pipeline.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/membrane/pipeline.ex b/lib/membrane/pipeline.ex index 61ce99358..8f2a54467 100644 --- a/lib/membrane/pipeline.ex +++ b/lib/membrane/pipeline.ex @@ -437,7 +437,7 @@ defmodule Membrane.Pipeline do """ @spec start_link( unquote(__MODULE__).pipeline_options(), - process_options :: GenServer.options() + unquote(__MODULE__).config() ) :: unquote(__MODULE__).on_start() def start_link(pipeline_options \\ nil, process_options \\ []) do unquote(__MODULE__).start_link(__MODULE__, pipeline_options, process_options) From e3b3fdd2350cf656c90809df8ee099870c65267a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Feliks=20Pobiedzi=C5=84ski?= <38541925+FelonEkonom@users.noreply.github.com> Date: Tue, 22 Aug 2023 17:14:10 +0200 Subject: [PATCH 4/4] Update lib/membrane/pipeline.ex Co-authored-by: Mateusz Front --- lib/membrane/pipeline.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/membrane/pipeline.ex b/lib/membrane/pipeline.ex index 8f2a54467..d6c1af761 100644 --- a/lib/membrane/pipeline.ex +++ b/lib/membrane/pipeline.ex @@ -453,7 +453,7 @@ defmodule Membrane.Pipeline do """ @spec start( unquote(__MODULE__).pipeline_options(), - process_options :: GenServer.options() + unquote(__MODULE__).config() ) :: unquote(__MODULE__).on_start() def start(pipeline_options \\ nil, process_options \\ []) do unquote(__MODULE__).start(__MODULE__, pipeline_options, process_options)