Skip to content

Commit

Permalink
Update demand type to allow for the default demand size syntax (#768)
Browse files Browse the repository at this point in the history
* Update demand type to allow for the default demand size syntax
  • Loading branch information
Noarkhh authored Mar 14, 2024
1 parent f65a678 commit 2ed8f4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/membrane/element/action.ex
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ defmodule Membrane.Element.Action do
guaranteed not to receive more data than demanded.
Demand size can be either a non-negative integer, that overrides existing demand,
or a function that is passed current demand, and is to return the new demand.
or a function that is passed current demand, and is to return the new demand. In case only pad
is specified, the demand size defaults to 1.
Allowed only when playback is playing.
"""
@type demand :: {:demand, {Pad.ref(), demand_size}}
@type demand :: {:demand, {Pad.ref(), demand_size} | Pad.ref()}
@type demand_size :: pos_integer | (pos_integer() -> non_neg_integer())

@typedoc """
Expand Down

0 comments on commit 2ed8f4d

Please sign in to comment.