Membrane File plugin

Hex.pmAPI DocsCircleCI

Membrane plugin for reading and writing to files.

It is part of Membrane Multimedia Framework.

Installation

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

def deps do
  [
    {:membrane_file_plugin, "~> 0.9.0"}
  ]
end

Sample usage

Playing below pipeline should copy /etc/passwd to ./test:

defmodule FileExamplePipeline do
  use Membrane.Pipeline

  @doc false
  @impl true
  def handle_init(_) do
    children = [
      file_src: %Membrane.File.Source{location: "/etc/passwd"},
      file_sink: %Membrane.File.Sink{location: "./test"},
    ]
    links = [link(:file_src) |> to(:file_sink)]

    {{:ok, spec: %ParentSpec{children: children, links: links}}, %{}}
  end
end

Copyright and License

Copyright 2018, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0