-
Notifications
You must be signed in to change notification settings - Fork 39
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
Conversation
e288831
to
977dd83
Compare
870aef0
to
e6c2087
Compare
e6c2087
to
1ac37c9
Compare
@impl true | ||
def handle_init(opts) do | ||
%{controller_pid: controller_pid} = opts | ||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
args = [__MODULE__, %{controller_pid: self()}, process_options] | ||
apply(Pipeline, :start_link, args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args = [__MODULE__, %{controller_pid: self()}, process_options] | |
apply(Pipeline, :start_link, args) | |
Pipeline.start_link(__MODULE__, %{controller_pid: self()}, process_options) |
args = [__MODULE__, %{controller_pid: self()}, process_options] | ||
apply(Pipeline, :start, args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 :: |
There was a problem hiding this comment.
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
?
…. Split await macro into multiple functions
…ide documentation and typespecs
…use await_generic macro
…ngful variable names in the subscription matcher. Add moduledoc for the abstract RemoteControlled.Message module
…aneframework/membrane_core into remote-controlled-pipeline
rename `message_t` typespec into `t` Co-authored-by: Mateusz Front <mateusz.front@swmansion.com>
…air an markdown generator error
… code snippets of the remote controlled pipeline documentation
closes #336