Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix specs for default pipeline functions #585

Merged
merged 6 commits into from
Aug 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/membrane/pipeline.ex
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,9 @@ defmodule Membrane.Pipeline do
A proxy for `#{inspect(unquote(__MODULE__))}.start_link/3`
"""
@spec start_link(
pipeline_options :: unquote(__MODULE__).pipeline_options(),
process_options :: GenServer.options()
) :: GenServer.on_start()
unquote(__MODULE__).pipeline_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)
end
Expand All @@ -452,9 +452,9 @@ defmodule Membrane.Pipeline do
A proxy for `#{inspect(unquote(__MODULE__))}.start/3`
"""
@spec start(
pipeline_options :: unquote(__MODULE__).pipeline_options(),
process_options :: GenServer.options()
) :: GenServer.on_start()
unquote(__MODULE__).pipeline_options(),
unquote(__MODULE__).config()
) :: unquote(__MODULE__).on_start()
def start(pipeline_options \\ nil, process_options \\ []) do
unquote(__MODULE__).start(__MODULE__, pipeline_options, process_options)
end
Expand All @@ -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
Expand Down