flow_control: :auto
.handle_spec_started/3
callback and Membrane.Testing.Pipeline.message_child/3
in favor of Membrane.Testing.Pipeline.notify_child/3
.Ratio
to ~> 3.0 or ~> 4.0
.~> 3.0 or ~> 4.0
by @FelonEkonom in https://github.com/membraneframework/membrane_core/pull/780
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v1.0.1...v1.1.0-rc0
Published by FelonEkonom 8 months ago
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v1.0.0...v1.0.1
Published by FelonEkonom about 1 year ago
Finally, we have released v1.0.0 of Membrane Core! 🎉🎉🎉 Comparing to v0.12.9, this releases contains many changes in API and framework private modules. We wrote a migration guide helping you adjust your code to Membrane Core v1.0.0. Let's take a look, at what changes are introduced with this release:
Release v1.0.0 contains a lot of changes in Membrane private modules responsible for managing the backpressure mechanism. The two biggest changes are:
:push
effective flow control in elements containing pads with flow_control: :auto
- it allows avoiding work related to the calculation of the value of auto-demand in input pads with flow_contro: :auto
, when a pipeline topology allows us to skip it without damage of backpressure mechanism. This change also fixes the problem with toilet overflow
error occurring far from the element, which works too slowly.demand
using :atomics
, instead of message passing - this change is a big performance and memory optimisation and allowed us to make auto-demands more precise in the amount of demanded data.This release brings compatibility with kino_membrane, the tool for visualization and introspection of Membrane pipelines in Livebook.
end of stream
, even if there was no start of stream
beforeSince now, we can send end of stream
on pads, even if we haven't sent start of stream
there yet. Moreover, before unlinking an input pad, every element will always execute handle_end_of_stream
for this pad, no matter, if it received start of stream
earlier, or not. This will happen before calling handle_pad_removed/3
in the case of dynamic pads and on entering terminating
state, in the case of static pads.
handle_process_list/4
and handle_write_list/4
callbacksSince v1.0.0
, you have to handle every single buffer separately in handle_buffer/4
callback, instead of handling whole list of buffers in this in handle_process_list/4
or handle_write_list/4
.
handle_process
and handle_write
are replaced with handle_buffer
for better consistency:mode
and :demand_mode
options in pad definition are replaced with :flow_control
, which may be :push
, :auto
or :manual
and defaults to :auto
whenever available.Membrane.RemoteControlled.Pipeline
to Membrane.RCPipeline
by @mat-hek in https://github.com/membraneframework/membrane_core/pull/505
:remove_link
action by @FelonEkonom in https://github.com/membraneframework/membrane_core/pull/487
Membrane.ResourceGuard.cleanup/1
by @FelonEkonom in https://github.com/membraneframework/membrane_core/pull/477
Membrane.Testing.Pipeline.get_child_pid/2
@FelonEkonom in https://github.com/membraneframework/membrane_core/pull/497
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.9...v1.0.0
Published by FelonEkonom about 1 year ago
terminate: :normal
action by @varsill in https://github.com/membraneframework/membrane_core/pull/538
in_progress_memory
metric in performance benchmark by @varsill in https://github.com/membraneframework/membrane_core/pull/579
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v1.0.0-rc0...v1.0.0-rc1
Published by FelonEkonom about 1 year ago
:pause_auto_demand
and :resume_auto_demand
actions. #586
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.8...v0.12.9
Published by FelonEkonom about 1 year ago
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.7...v0.12.8
Published by FelonEkonom over 1 year ago
in_progress_memory
metric in performance benchmark by @varsill in https://github.com/membraneframework/membrane_core/pull/579
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.6...v0.12.7
Published by FelonEkonom over 1 year ago
Changes:
membrane_kino_dashboard
. #571
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.5...v0.12.6
Published by FelonEkonom over 1 year ago
Changes:
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.4...v0.12.5
Published by FelonEkonom over 1 year ago
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.3...v0.12.4
Published by FelonEkonom over 1 year ago
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.4...v0.11.5
Published by FelonEkonom over 1 year ago
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.2...v0.12.3
Published by FelonEkonom over 1 year ago
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.1...v0.12.2
Published by FelonEkonom over 1 year ago
This release includes most of the changes in membrane_core
private modules, that will be introduced in v1.0.0-rc1
. The main purpose of publishing this release, was to have a release with changes from v1.0.0-rc1
, but with as little API changes as possible. To facilitate migration, we prepared the updating guide that should help adjust your code to the changes.
In v0.12
parent can handle a scenario when a child removes it's own pad, by implementing new callback, handle_child_pad_removed/4
.
@impl true
def handle_child_pad_removed(:rtp, Pad.ref(:rtp_output, ssrc), _ctx, state) do
...
end
v0.12
introduces a lot of changes, in the way, how automatic demands work under the hood. Moreover, :auto
demand unit is now supported in sinks and endpoints input pads.
Until now, toilet were always set up between :push
output pad and :pull
input pad. In v0.12
places, where we should set up a toilet are dynamically resolved and their number has decreased.
:remove_link
action in pipelines and bins.:playback
action. Introduce :setup
action. #496
Membrane.Testing.Pipeline.get_child_pid/2
. #497
:pull
mode, handling different demand_units
, can be now linked.:pull
mode should have their demand_unit
specified. If case it's not available, it's assumed that the pad handles demands in both :bytes
and :buffers
units.Membrane.Buffer.t()
, passed as :output
parameter for Membrane.Testing.Source
won't get rewrapped in Membrane.Buffer.t()
struct.Membrane.Debug.Filter
and Membrane.Debug.Sink
. #552
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.3...v0.12.1
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.3...v0.11.4
Published by FelonEkonom over 1 year ago
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.2...v0.11.3
Published by mat-hek almost 2 years ago
Here comes the first release candidate for Membrane Core 1.0! 🎉 This release contains the final API polishing before making it stable and brings a couple of new features. The migration guide, which will help you seamlessly upgrade from 0.11, is available here. We also started the process of migrating all the plugins. Now, let's have a look at the most important changes brought by this release:
Let's consider an example when there are a couple of streams and you need to spawn some elements to process each of them, and then put them all into a common sink:
def handle_info({:new_stream, stream_id}, _ctx, state) do
spec =
child({:source, stream_id}, MySource)
|> child({:parser, stream_id}, MyParser)
|> child({:depayloader, stream_id}, MyDepayloader)
|> get_child(:sink)
{[spec: spec], state}
end
Now it's more concise with children groups:
def handle_info({:new_stream, stream_id}, _ctx, state) do
spec =
child(:source, MySource)
|> child(:parser, MyParser)
|> child(:depayloader, MyDepayloader)
|> get_child(:sink)
spec = {spec, group: {:stream, stream_id}}
{[spec: spec], state}
end
And even more concise with anonymous children - from now on, you only have to name a child when you refer to it:
def handle_info({:new_stream, stream_id}, _ctx, state) do
spec = {
child(MySource) |> child(MyParser) |> child(MyDepayloader) |> get_child(:sink),
group: {:stream, stream_id}
}
{[spec: spec], state}
end
Moreover, you can remove the whole group by its name when the stream is no longer available:
def handle_info({:stream_finished, stream_id}, _ctx, state) do
{[remove_children: {:stream, stream_id}], state}
end
Check the docs for details.
Sometimes setting up a component requires a lot of work, possibly done asynchronously. Now, you can prevent a component setup from finishing before such asynchronous work is done, without blocking in handle_setup
. It's as simple as marking it as incomplete:
def handle_setup(_ctx, state) do
request_some_async_work(...)
{[setup: :incomplete], state}
end
When the work is finished, just let Membrane know it can proceed:
def handle_info(:done_setup, _ctx, state) do
{[setup: :complete], state}
end
This mechanism works for all components, including pipelines. Therefore, pipelines now automatically switch to playing after they are set up, which is usually desired. If you don't want this to happen, just complete the setup whenever everything is ready. Here are the docs.
From now on, you can specify demand units on both inputs and outputs. If the demand unit on the output doesn't match the one on the linked input, Membrane will take care of recalculating it for you. Thanks to that, all Membrane elements are now compatible and can be linked together, regardless of the demands unit they support! This applies to auto demands as well. Therefore, there's no need to provide demand units in bins anymore.
handle_process
and handle_write
are replaced with handle_buffer
for better consistency:mode
and :demand_mode
options in pad definition are replaced with :flow_control
, which may be :push
, :auto
or :manual
and defaults to :auto
whenever available (currently in filters, soon in sinks as well)playback
action with deferring setup by @FelonEkonom in https://github.com/membraneframework/membrane_core/pull/496
Membrane.RemoteControlled.Pipeline
to Membrane.RCPipeline
by @mat-hek in https://github.com/membraneframework/membrane_core/pull/505
:remove_link
action by @FelonEkonom in https://github.com/membraneframework/membrane_core/pull/487
Membrane.ResourceGuard.cleanup/1
by @FelonEkonom in https://github.com/membraneframework/membrane_core/pull/477
Membrane.Testing.Pipeline.get_child_pid/2
@FelonEkonom in https://github.com/membraneframework/membrane_core/pull/497
timer_interval_t
to Element.Action.t
by @balins in https://github.com/membraneframework/membrane_core/pull/502
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.0...v1.0.0-rc0
Published by mat-hek almost 2 years ago
Published by FelonEkonom almost 2 years ago
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.0...v0.11.1