Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into add-crash-reason-ha…
Browse files Browse the repository at this point in the history
…ndle_crash_group
  • Loading branch information
FelonEkonom committed Feb 13, 2024
2 parents a3b7941 + 12f1e8e commit 88e65f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ Membrane.Pipeline.start_link(MyPipeline, mp3_url)
```

This is an [Elixir](elixir-lang.org) snippet, that streams an mp3 via HTTP and plays it on your speaker. Here's how to run it:
- Install [libmad](https://github.com/markjeee/libmad) and [portaudio](https://github.com/PortAudio/portaudio). Membrane uses these libs to decode the mp3 and to access your speaker, respectively. You can use these commands:
- On Mac OS: `brew install libmad portaudio pkg-config`
- On Debian: `apt install libmad0-dev portaudio19-dev`

- Option 1: Click the button below:

[![Run in Livebook](https://livebook.dev/badge/v1/blue.svg)](https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fmembraneframework%2Fmembrane_core%2Fblob%2Fmaster%2Fexample.livemd)
Expand Down
18 changes: 10 additions & 8 deletions lib/membrane/utility_supervisor.ex
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
defmodule Membrane.UtilitySupervisor do
@moduledoc """
A supervisor that allows to start utility processes under the pipeline's
A supervisor responsible for managing utility processes under the pipeline's
supervision tree.
The supervisor is spawned with each component and can be obtained from
callback contexts.
The supervisor is spawned with each component and can be accessed from callback contexts.
The supervisor never restarts any processes, it just makes sure they
terminate when the component that started them terminates. If restarting
is needed, a dedicated supervisor should be spawned under this supervisor, like
`Membrane.UtilitySupervisor` does not restart processes. Rather, it ensures that these utility processes
terminate gracefully when the component that initiated them terminates.
If a process needs to be able to restart, spawn a dedicated supervisor under this supervisor.
## Example
def handle_setup(ctx, state) do
Membrane.UtilitySupervisor.start_link_child(
Expand All @@ -26,7 +28,7 @@ defmodule Membrane.UtilitySupervisor do
@doc """
Starts a process under the utility supervisor.
Semantics of the `child_spec` argument is the same as in `Supervisor.child_spec/2`.
Semantics of the `child_spec` argument are the same as in `Supervisor.child_spec/2`.
"""
@spec start_child(t, Supervisor.child_spec() | {module(), term()} | module()) ::
Supervisor.on_start_child()
Expand All @@ -37,7 +39,7 @@ defmodule Membrane.UtilitySupervisor do
@doc """
Starts a process under the utility supervisor and links it to the current process.
Semantics of the `child_spec` argument is the same as in `Supervisor.child_spec/2`.
Semantics of the `child_spec` argument are the same as in `Supervisor.child_spec/2`.
"""
@spec start_link_child(t, Supervisor.child_spec() | {module(), term()} | module()) ::
Supervisor.on_start_child()
Expand Down

0 comments on commit 88e65f3

Please sign in to comment.