# Membrane SDL plugin

[![API Docs](](

This package provides an [SDL]( video player.

It is part of [Membrane Multimedia Framework](

## Installation

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

def deps do
	{:membrane_sdl_plugin, "~> 0.14.0"}

The docs can be found at [HexDocs](

## Usage

The pipeline below displays a sample h264 video from the net (with use of [Hackney]( and [H264]( elements):

defmodule My.Pipeline do
  use Membrane.Pipeline

  alias Membrane.Element.{FFmpeg.H264, Hackney}
  alias Membrane.SDL

  @impl true
  def handle_init(_) do
    children = [
      hackney: %Hackney.Source{
        location: ""
      parser: %H264.Parser{framerate: {30, 1}},
      decoder: H264.Decoder,
      sdl: SDL.Player

    links = [
      |> to(:parser)
      |> to(:decoder)
      |> to(:sdl)

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

## Testing

To run manual tests, type `mix test --include manual`

## Copyright and License

Copyright 2019, [Software Mansion](

[![Software Mansion](](

Licensed under the [Apache License, Version 2.0](LICENSE)