Membrane Core Versions Save

The core of the Membrane Framework, advanced multimedia processing framework

v0.11.5

10 months ago

What's changed

  • Fix compilation error occuring with Elixir 1.15. #570

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.4...v0.11.5

v0.12.3

10 months ago

What's Changed

  • Fix bug in fields naming in callback contexts. #569
  • Update exit reasons of Membrane Components and their supervisors. #567

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.2...v0.12.3

v0.12.2

10 months ago

What's Changed

  • Fix bug in order of handling actions returned from callbacks.

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.1...v0.12.2

v0.12.1

11 months ago

Membrane Core v0.12.1 is now available!

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.

Handling a scenario when a child removes it's pad

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

Improvements in toilets and automatic demands mechanism.

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.

Rest of the changes

  • Introduce :remove_link action in pipelines and bins.
  • Add children groups - a mechanism that allows refering to multiple children with a single identifier.
  • Add an ability to spawn anonymous children.
  • Remove :playback action. Introduce :setup action. #496
  • Add Membrane.Testing.Pipeline.get_child_pid/2. #497
  • Make callback contexts to be maps. #504
  • All Membrane Elements can be compatible till now on - pads working in :pull mode, handling different demand_units, can be now linked.
  • Output pads working in :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.
  • Remove _t suffix from types #509
  • Introduce support for crash groups in Bins. #521
  • Make sure enumerable with all elements being Membrane.Buffer.t(), passed as :output parameter for Membrane.Testing.Source won't get rewrapped in Membrane.Buffer.t() struct.
  • Implement Membrane.Debug.Filter and Membrane.Debug.Sink. #552

New Contributors

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.3...v0.12.1

v0.11.4

11 months ago

v0.12.0

11 months ago

Membrane Core v0.12.0

Release v0.12.0 has been retired, use v0.12.1 instead of it.

v0.11.3

1 year ago

v1.0.0-rc0

1 year 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:

Children groups & anonymous children

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.

Deferring component setup

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.

Demand units on outputs

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.

API improvements

  • 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)
  • Callback contexts are now maps instead of structs and they're documented in a single module per component, so it's more straightforward to figure out what they contain

All changes

Breaking changes

Non-breaking changes

Bug fixes

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.0...v1.0.0-rc0

v0.11.1

1 year ago

What's Changed

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.11.0...v0.11.1