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

Remote controlled pipeline #366

Merged
merged 35 commits into from
Apr 4, 2022
Merged

Remote controlled pipeline #366

merged 35 commits into from
Apr 4, 2022

Conversation

andpodob
Copy link
Contributor

@andpodob andpodob commented Dec 22, 2021

closes #336

@andpodob andpodob force-pushed the remote-controlled-pipeline branch 3 times, most recently from e288831 to 977dd83 Compare December 27, 2021 14:23
@andpodob andpodob marked this pull request as ready for review December 27, 2021 14:23
@andpodob andpodob requested a review from mat-hek December 27, 2021 14:23
@andpodob andpodob force-pushed the remote-controlled-pipeline branch 3 times, most recently from 870aef0 to e6c2087 Compare December 28, 2021 10:57
@andpodob andpodob force-pushed the remote-controlled-pipeline branch from e6c2087 to 1ac37c9 Compare December 28, 2021 10:58
@impl true
def handle_init(opts) do
%{controller_pid: controller_pid} = opts

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any logic behind these blank lines or do you just insert them in random places? :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted this line to be right before the returned value :P

Comment on lines 40 to 41
args = [__MODULE__, %{controller_pid: self()}, process_options]
apply(Pipeline, :start_link, args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
args = [__MODULE__, %{controller_pid: self()}, process_options]
apply(Pipeline, :start_link, args)
Pipeline.start_link(__MODULE__, %{controller_pid: self()}, process_options)

Comment on lines 49 to 50
args = [__MODULE__, %{controller_pid: self()}, process_options]
apply(Pipeline, :start, args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
args = [__MODULE__, %{controller_pid: self()}, process_options]
apply(Pipeline, :start, args)
Pipeline.start(__MODULE__, %{controller_pid: self()}, process_options)

It is required to firstly use the `Membrane.RemoteControlled.Pipeline.subscribe/2` before awaiting
any events. `pattern` has to be a match pattern.
"""
defmacro await(pattern) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should accept a pipeline pid as the first argument, as subscribe does


@doc """
Subscribes to a given `subscription_pattern`.
The `subscription_pattern` must be a match pattern.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the docs should mention event_t


alias Membrane.Pipeline

@type event_t ::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a bit ambiguous with the Membrane.Event, maybe just message_t ?

@andpodob andpodob requested a review from mat-hek December 29, 2021 11:49
lib/membrane/remote_controlled/message.ex Outdated Show resolved Hide resolved
lib/membrane/remote_controlled/message.ex Outdated Show resolved Hide resolved
lib/membrane/remote_controlled/pipeline.ex Outdated Show resolved Hide resolved
lib/membrane/remote_controlled/pipeline.ex Outdated Show resolved Hide resolved
lib/membrane/remote_controlled/pipeline.ex Outdated Show resolved Hide resolved
lib/membrane/remote_controlled/pipeline.ex Outdated Show resolved Hide resolved
lib/membrane/remote_controlled/pipeline.ex Show resolved Hide resolved
@varsill varsill requested a review from mat-hek March 24, 2022 12:02
lib/membrane/remote_controlled/message.ex Outdated Show resolved Hide resolved
lib/membrane/remote_controlled/pipeline.ex Outdated Show resolved Hide resolved
lib/membrane/remote_controlled/pipeline.ex Outdated Show resolved Hide resolved
varsill added 2 commits March 25, 2022 08:50
…ngful variable names in the subscription matcher. Add moduledoc for the abstract RemoteControlled.Message module
@varsill varsill requested a review from mat-hek March 25, 2022 07:55
mat-hek
mat-hek previously approved these changes Mar 28, 2022
lib/membrane/remote_controlled/message.ex Outdated Show resolved Hide resolved
rename `message_t` typespec into `t`

Co-authored-by: Mateusz Front <mateusz.front@swmansion.com>
mat-hek
mat-hek previously approved these changes Mar 30, 2022
… code snippets of the remote controlled pipeline documentation
@varsill varsill requested review from mat-hek and removed request for varsill March 31, 2022 07:25
@varsill varsill merged commit 90dbcbc into master Apr 4, 2022
@varsill varsill deleted the remote-controlled-pipeline branch April 4, 2022 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust and rename Membrane.Testing.Pipeline to make it usable not only in tests
3 participants