Membrane SDL plugin

Hex.pmAPI DocsCircleCI

This package provides an SDL-based 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.11.0"}
]
end

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: "https://membraneframework.github.io/static/video-samples/test-video.h264"
},
parser: %H264.Parser{framerate: {30, 1}},
decoder: H264.Decoder,
sdl: SDL.Player
]
links = [
link(:hackney)
|> to(:parser)
|> to(:decoder)
|> to(:sdl)
]
{{:ok, spec: %ParentSpec{children: children, links: links}}, %{}}
end
end

Testing

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

Copyright 2019, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0