-
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
Update Membrane.Time API #494
Conversation
lib/membrane/time.ex
Outdated
@@ -229,16 +229,16 @@ defmodule Membrane.Time do | |||
end | |||
|
|||
@doc """ | |||
Returns timestamp in timebase units. Rounded to the nearest integer. | |||
Divides timestamp by timebase. Rounded to the nearest integer. |
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.
Divides timestamp by timebase. Rounded to the nearest integer. | |
Divides timestamp by a timebase. The result is rounded to the nearest integer. |
lib/membrane/time.ex
Outdated
Returns time in #{unit.plural}. If second argument is not provided | ||
or is equal to `:exact`, result is represented as a rational number. | ||
If second argument is equal to `:round`, result is rounded to the | ||
nearest integer. |
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 would avoid the statement if second argument is not provided
and instead I would stick to saying that "the default value of the second argument is :exact
"
lib/membrane/time.ex
Outdated
Returns time in #{unit.plural}. The default value of the second argument | ||
is `:exact`. If the second argument is equal to `:exact`, the result is | ||
represented as a rational number. Otherwise, if the second argument is | ||
equal to `:round`, the result is rounded to the nearest integer. |
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.
Returns time in #{unit.plural}. The default value of the second argument | |
is `:exact`. If the second argument is equal to `:exact`, the result is | |
represented as a rational number. Otherwise, if the second argument is | |
equal to `:round`, the result is rounded to the nearest integer. | |
Returns time in #{unit.plural}. | |
If the `mode` argument is set to `:exact` (default), the result is | |
represented as a rational number. Otherwise, if the `mode` is | |
`:round`, the result is rounded to the nearest integer. |
lib/membrane/time.ex
Outdated
""" | ||
@spec unquote(as_fun_name)(t) :: integer | Ratio.t() | ||
@spec unquote(as_fun_name)(t, :round | :exact) :: integer | Ratio.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.
@spec unquote(as_fun_name)(t, :round | :exact) :: integer | Ratio.t() | |
@spec unquote(as_fun_name)(t, mode :: :round | :exact) :: integer | Ratio.t() |
## 0.11.0 | ||
* Separate element_name and pad arguments in handle_element_{start, end}_of_stream signature [#219](https://github.com/membraneframework/membrane_core/issues/219) | ||
* Refine communication between parent and its children [#270](https://github.com/membraneframework/membrane_core/issues/270) | ||
* Add `handle_call/3` callback in the pipeline, as well as a `:reply` and `:reply_to` actions. Rename `handle_other/3` callback into `handle_info/3` [#334](https://github.com/membraneframework/membrane_core/issues/334) | ||
* Add `Membrane.FilterAggregator` that allows to run multiple filters sequentially within one process. [#355](https://github.com/membraneframework/membrane_core/pull/355) | ||
* Log info about element's playback state change as debug, not as debug_verbose. [#430](https://github.com/membraneframework/membrane_core/pull/430) | ||
* Rename `Membrane.Time.to_<unit name>/1` into `Membrane.Time.round_to_<unit name>/1` to indicate that the result will be rounded. Make `Membrane.Time.<plural unit name>/1` accept `%Ratio{}` as an argument. Add `Membrane.Time.round_to_timebase/2` function. | ||
* Rename `Membrane.Time.to_<unit name>/1` into `Membrane.Time.round_to_<unit name>/1` to indicate that the result will be rounded. Make `Membrane.Time.<plural unit name>/1` accept `%Ratio{}` as an argument. Add `Membrane.Time.round_to_timebase` function. |
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.
Why are you modifying 0.11.0 changelog? The Membrane.Time.round_to_timebase/2
was in fact added then.
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 have only deleted /2
suffix. I have made this change to fix failing CI tests, eg:
Related Jira ticket: https://membraneframework.atlassian.net/browse/MC-105