membraneframework / membrane_core

The core of the Membrane Framework, advanced multimedia processing framework
https://membrane.stream
Apache License 2.0
1.22k stars 34 forks source link

Create a plugin for straightforward communication with Elixir code outside of pipelines #830

Open mat-hek opened 1 week ago

mat-hek commented 1 week ago

The plugin should contain elements that would

input = Stream.cycle([1, 2, 3])
output = Membrane.Elixir.Stream.new()

p = Membrane.RCPipeline.start_link!()
Membrane.RCPipeline.exec_actions(spec:
  child(%Membrane.Elixir.Source{input: input})
  |> child(%Membrane.Elixir.Sink{output: output})
)

output
|> Stream.map(& &1 + 1)
|> Enum.take(3)
# => [2, 3, 4]

Possibly it should end up in the core.