Skip to content

membraneframework/membrane_scissors_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Membrane Scissors plugin

Hex.pm API Docs CircleCI

Element for cutting off parts of the stream.

Usage

The following setup will preserve one buffer per 10 milliseconds (assuming each buffer lasts caps.duration):

%Membrane.Scissors{
  intervals: Stream.iterate(0, & &1 + Membrane.Time.Milliseconds(10)) |> Stream.map(&{&1, 1}),
  interval_duration_unit: :buffers,
  buffer_duration: fn _buffer, caps -> caps.duration end
}

Note that particular codecs may allow the stream to be cut at specific points only or forbid cutting at all.

Installation

Add the following line to your deps in mix.exs. Run mix deps.get.

	{:membrane_scissors_plugin, "~> 0.8.0"}

Copyright and License

Copyright 2020, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0