test

mail@pastecode.io avatar
unknown
elixir
a month ago
460 B
2
Indexable
Never
defmodule MyPipeline do
  use Membrane.Pipeline

  @impl true
  def handle_init(_ctx, _opt) do
    spec = [
      child(:source, Membrane.CameraCapture)
      |> child(:converter, %Membrane.FFmpeg.SWScale.PixelFormatConverter{format: :I420})
      |> child(:sink, %MySink{filename: "/tmp/frame", quality: 100})
    ]

    {[spec: spec], %{}}
  end

  def start_link(options) do
    Membrane.Pipeline.start_link(__MODULE__, options, name: MyPipeline)
  end
end
Leave a Comment