Membrane Multimedia Framework: SDL element

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_element_sdl to your list of dependencies in mix.exs:

def deps do
[
{:membrane_element_sdl, "~> 0.2.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
alias Membrane.Element.{FFmpeg.H264, Hackney, SDL}
alias Membrane.Pipeline.Spec
use Membrane.Pipeline
@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 = %{
{:hackney, :output} => {:parser, :input},
{:parser, :output} => {:decoder, :input},
{:decoder, :output} => {:sdl, :input}
}
{{:ok, spec: %Spec{children: children, links: links}}, %{}}
end
end

Copyright 2019, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0