Skip to content

Commit

Permalink
Release membrane_sdl_plugin v0.18.0 (#31)
Browse files Browse the repository at this point in the history
* bump to 0.18.0
---------

Co-authored-by: Noarkhh <jakub.pryc@gmail.com>
  • Loading branch information
FelonEkonom and Noarkhh authored Nov 15, 2023
1 parent 7fff0d2 commit f5b1647
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Add the following line to your `deps` in `mix.exs`. Run `mix deps.get`.
```elixir
def deps do
[
{:membrane_sdl_plugin, "~> 0.17.0"}
{:membrane_sdl_plugin, "~> 0.18.0"}
]
end
```
Expand Down
6 changes: 3 additions & 3 deletions lib/membrane_sdl/player.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defmodule Membrane.SDL.Player do
# The measured latency needed to show a frame on a screen.
@latency 20 |> Time.milliseconds()

def_input_pad :input, accepted_format: RawVideo, demand_unit: :buffers
def_input_pad :input, accepted_format: RawVideo, flow_control: :manual, demand_unit: :buffers

@impl true
def handle_init(_options, _ctx) do
Expand Down Expand Up @@ -46,15 +46,15 @@ defmodule Membrane.SDL.Player do

@impl true
def handle_start_of_stream(:input, ctx, state) do
use Ratio
use Numbers, overload_operators: true
{nom, denom} = ctx.pads.input.stream_format.framerate
timer = {:demand_timer, Ratio.new(Time.seconds(denom), nom)}

{[demand: :input, start_timer: timer], %{state | timer_started?: true}}
end

@impl true
def handle_write(:input, %Buffer{payload: payload}, _ctx, state) do
def handle_buffer(:input, %Buffer{payload: payload}, _ctx, state) do
payload = Membrane.Payload.to_binary(payload)
:ok = CNode.call(state.cnode, :display_frame, [payload])
{[], state}
Expand Down
12 changes: 6 additions & 6 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.SDL.Plugin.MixProject do
use Mix.Project

@version "0.17.0"
@version "0.18.0"
@github_url "https://github.com/membraneframework/membrane_sdl_plugin"

def project do
Expand Down Expand Up @@ -55,14 +55,14 @@ defmodule Membrane.SDL.Plugin.MixProject do

defp deps do
[
{:membrane_core, "~> 0.12.9"},
{:membrane_common_c, "~> 0.15.0"},
{:membrane_core, "~> 1.0"},
{:membrane_common_c, "~> 0.16.0"},
{:membrane_raw_video_format, "~> 0.3.0"},
{:bundlex, "~> 1.2"},
# Testing
{:membrane_h264_ffmpeg_plugin, "~> 0.29.0", only: :test},
{:membrane_h264_plugin, "~> 0.7.0", only: :test},
{:membrane_hackney_plugin, "~> 0.10.0", only: :test},
{:membrane_h264_ffmpeg_plugin, "~> 0.31.0", only: :test},
{:membrane_h264_plugin, "~> 0.9.0", only: :test},
{:membrane_hackney_plugin, "~> 0.11.0", only: :test},
# Development
{:ex_doc, "~> 0.28", only: :dev, runtime: false},
{:dialyxir, "~> 1.1", only: :dev, runtime: false},
Expand Down
Loading

0 comments on commit f5b1647

Please sign in to comment.