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

Improve callbacks return types #702

Merged
merged 4 commits into from
Jan 10, 2024
Merged

Improve callbacks return types #702

merged 4 commits into from
Jan 10, 2024

Conversation

varsill
Copy link
Contributor

@varsill varsill commented Jan 4, 2024

No description provided.

….handle_init/2`. Fix a missleading information in docs about returning `:latency` action from `Membrane.Element.Base.handle_init`
@varsill varsill marked this pull request as ready for review January 5, 2024 11:37
@varsill varsill requested a review from mat-hek as a code owner January 5, 2024 11:37
@@ -13,9 +13,10 @@ defmodule Membrane.Bin.Action do
@typedoc """
Action that manages the end of the component setup.

By default, component setup ends with the end of `c:Membrane.Bin.handle_setup/2` callback.
By default, component setup ends with the end of callback.
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

| end_of_stream
| terminate
| redemand
Copy link
Member

Choose a reason for hiding this comment

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

this is duplicated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Depending on element type, callback, current playback and other
circumstances there may be different actions available.
"""

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

| redemand

@typedoc """
Type that defines a union of actions that may be returned from some element callbacks.
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
Type that defines a union of actions that may be returned from some element callbacks.
Type that defines a union of actions that may be returned from most of the element callbacks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Type that defines a union of actions that may be returned from some element callbacks.

Depending on element type, callback, current playback and other
circumstances there may be different actions available.
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
circumstances there may be different actions available.
circumstances there may be different actions available.
Check the typespec and documentation of particular callbacks
for details.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 36 to 40
# @typedoc """
# Type that defines all valid return values from most callbacks.
# """
# @type callback_return :: {[Action.t()], Element.state()}

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
# @typedoc """
# Type that defines all valid return values from most callbacks.
# """
# @type callback_return :: {[Action.t()], Element.state()}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@varsill varsill requested a review from mat-hek January 9, 2024 08:56
@varsill varsill merged commit 5c2a831 into master Jan 10, 2024
5 of 6 checks passed
@varsill varsill deleted the fix_callbacks_return_types branch January 10, 2024 08:38
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.

2 participants