The core of the Membrane Framework, advanced multimedia processing framework
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.4...v0.11.5
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.2...v0.12.3
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.1...v0.12.2
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
Release v0.12.0
has been retired, use v0.12.1 instead of it.
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.2...v0.11.3
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
Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.0...v0.11.1