View Source Upgrading to v1.0.0-rc1

remove-handle_buffers_batch-4-handle_process_list-4-handle_write_list-4-callback

Remove handle_buffers_batch/4/handle_process_list/4/handle_write_list/4 callback

In v1.0.0-rc1 we removed handle_buffers_batch/4 callback. Instead of handling list of buffer in this callback, you have to handle every single buffer separately in handle_buffer/4 callback.

@impl true
- def handle_buffers_batch(pad_ref, buffers_list, ctx, state) do
+ def handle_buffer(pad_ref, buffer, ctx, state) do
  ...
end

Notice, if you are upgrading your code from v0.12.* directly to v1.0.0-rc1, omitting v1.0.0-rc0, there is a chance, that your elements still have callback named handle_process_list/4 or handle_write_list/4, instead of handle_buffers_batch/4.

@impl true
- def handle_process_list(pad_ref, buffers_list, ctx, state) do
+ def handle_buffer(pad_ref, buffer, ctx, state) do
  ...
end
@impl true
- def handle_write_list(pad_ref, buffers_list, ctx, state) do
+ def handle_buffer(pad_ref, buffer, ctx, state) do
  ...
end

Until v1.0.0-rc0, Membrane has generated start/2, start_link/2, and terminate/1 functions in modules using Membrane.Pipeline, if code developer hadn't done it explicitly. Since v1.0.0-rc1, if you want to have these functions implemented in your pipeline module, you have to implement them on your own. Alternatively, you can always call Membrane.Pipeline.start(YourPipelineModule, init_arg, opts), Membrane.Pipeline.start_link(YourPipelineModule, init_arg, opts), and Membrane.Pipeline.terminate(pipeline_pid) from beyond YourPipelineModule without wrapping it into public functions.

rename-structure-option-passed-to-the-membrane-testing-pipeline-into-spec

Rename :structure option passed to the Membrane.Testing.Pipeline into :spec

import Membrane.ChildrenSpec

spec = 
  child(:source, %Membrane.Testing.Source{some_field: some_arg})
  |> child(:sink), %Membrane.Testing.Sink{another_filed: another_arg}

- pipeline = Membrane.Testing.Pipeline.start_link_supervised(structure: spec)
+ pipeline = Membrane.Testing.Pipeline.start_link_supervised(spec: spec)