Membrane File plugin View Source

Hex.pm API Docs CircleCI

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.7.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 2018, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0