membrane_core

The core of the Membrane Framework, advanced multimedia processing framework

APACHE-2.0 License

Stars
1.2K
Committers
31
membrane_core - v1.1.0-rc0 Latest Release

Published by FelonEkonom 7 months ago

This release contains:

  • Upgrade in flow control mechanism - queuing buffers, when demand is low in flow_control: :auto.
  • Few bug fixes.
  • Deprecation of handle_spec_started/3 callback and Membrane.Testing.Pipeline.message_child/3 in favor of Membrane.Testing.Pipeline.notify_child/3.
  • Bump dependency to Ratio to ~> 3.0 or ~> 4.0.
  • Docs upgrade.

All changes

New Contributors

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v1.0.1...v1.1.0-rc0

membrane_core - v1.0.1

Published by FelonEkonom 8 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v1.0.0...v1.0.1

membrane_core - v1.0.0

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:

Improvements and optimizations in the demands mechanism

Release v1.0.0 contains a lot of changes in Membrane private modules responsible for managing the backpressure mechanism. The two biggest changes are:

  • Implementation of :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.
  • Passing the value of 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.

Support for kino_membrane

This release brings compatibility with kino_membrane, the tool for visualization and introspection of Membrane pipelines in Livebook.

Sending end of stream, even if there was no start of stream before

Since 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.

Removing handle_process_list/4 and handle_write_list/4 callbacks

Since 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.

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.
  • 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.12.9...v1.0.0

membrane_core - v1.0.0-rc1

Published by FelonEkonom about 1 year ago

What's Changed

New Contributors

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

membrane_core - v0.12.9

Published by FelonEkonom about 1 year ago

What's Changed

  • Add :pause_auto_demand and :resume_auto_demand actions. #586
  • Fix process leak in starting clocks. #594
  • Add child exit reason to the supervisor exit reason. #595

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.8...v0.12.9

membrane_core - v0.12.8

Published by FelonEkonom about 1 year ago

What's Changed

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.7...v0.12.8

membrane_core - v0.12.7

Published by FelonEkonom over 1 year ago

What's Changed

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.6...v0.12.7

membrane_core - v0.12.6

Published by FelonEkonom over 1 year ago

Changes:

  • Implement functionalities needed for integration with membrane_kino_dashboard. #571

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.5...v0.12.6

membrane_core - v0.12.5

Published by FelonEkonom over 1 year ago

Changes:

  • Fix compilation error occurring with Elixir 1.15. #573

Full Changelog: https://github.com/membraneframework/membrane_core/compare/v0.12.4...v0.12.5

membrane_core - v0.12.4

Published by FelonEkonom over 1 year ago

membrane_core - v0.11.5

Published by FelonEkonom over 1 year 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

membrane_core - v0.12.3

Published by FelonEkonom over 1 year 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

membrane_core - v0.12.2

Published by FelonEkonom over 1 year 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

membrane_core - v0.12.1

Published by FelonEkonom over 1 year 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

membrane_core -

Published by FelonEkonom over 1 year ago

membrane_core - v0.12.0

Published by FelonEkonom over 1 year ago

Membrane Core v0.12.0

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

membrane_core - v0.11.3

Published by FelonEkonom over 1 year ago

membrane_core - v1.0.0-rc0

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:

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

membrane_core - v0.11.1

Published by FelonEkonom almost 2 years ago

What's Changed

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

Badges
Extracted from project README
Hex.pm API Docs Run in Livebook Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs Hex.pm Docs
Related Projects