-
Notifications
You must be signed in to change notification settings - Fork 6
Boombox async backmerge into new architecture #86
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
Conversation
Co-authored-by: Łukasz Kita <[email protected]>
Co-authored-by: Łukasz Kita <[email protected]>
…/boombox into boombox-async-presetup
…ombox-async-backmerge
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.
Great job, I've left some minor comments
lib/boombox/internal_bin.ex
Outdated
@impl true | ||
def handle_child_setup_completed(:udp_source, _ctx, state) do | ||
{[notify_parent: :external_resource_ready], state} | ||
end | ||
|
||
def handle_child_setup_completed(:rtsp_source, _ctx, state) do | ||
{[notify_parent: :external_resource_ready], state} | ||
end | ||
|
||
def handle_child_setup_completed(_child, _ctx, state) do | ||
{[], state} | ||
end |
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.
in majority of the plugins there is a convention to write @impl true
before each callback match
lib/boombox/internal_bin.ex
Outdated
@impl true | ||
def handle_child_setup_completed(:udp_source, _ctx, state) do | ||
{[notify_parent: :external_resource_ready], state} | ||
end | ||
|
||
def handle_child_setup_completed(:rtsp_source, _ctx, state) do | ||
{[notify_parent: :external_resource_ready], state} | ||
end |
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.
Let's merge these two cases into one
Boombox.async/2
function for asynchronous execution, and modifies tests to use it.Boombox.run/2
(and related internals), changing argument handling and process flow.await_source_ready/0
,await_sink_ready/0
,await_external_resource_ready/0
).