Skip to content

membraneframework/membrane_funnel_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Membrane Funnel plugin

Hex.pm API Docs CircleCI

Membrane plugin for merging multiple input streams into a single output.

It can be used for collecting data from multiple inputs and sending it through one output.

It is part of Membrane Multimedia Framework.

Installation

The package can be installed by adding membrane_funnel_plugin to your list of dependencies in mix.exs:

def deps do
  [
	{:membrane_funnel_plugin, "~> 0.9.1"}
  ]
end

Usage

Playing this pipeline should merge two files a.txt and b.txt into file c.txt

defmodule FunnelDemo do
  use Membrane.Pipeline

  def handle_init(_) do
    children = [
      a_source: %Membrane.File.Source{location: "a.txt"},
      b_source: %Membrane.File.Source{location: "b.txt"},
      funnel: Membrane.Funnel,
      sink: %Membrane.File.Sink{location: "c.txt"}
    ]

    links = [
      link(:a_source) |> to(:funnel),
      link(:b_source) |> to(:funnel),
      link(:funnel) |> to(:sink)
    ]

    spec = %ParentSpec{children: children, links: links}
    {{:ok, spec: spec, playback: :playing}, %{}}
  end
end

Copyright and License

Copyright 2020, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0

About

Membrane plugin for merging multiple input streams into a single output

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages