Package providing URLs for precompiled dependencies used by Membrane plugins.
The package can be installed by adding membrane_precompiled_dependency_provider to your list of dependencies in mix.exs:
def deps do
[
{:membrane_precompiled_dependency_provider, "~> 0.2.1"}
]
endIn most cases the package is intended to provide an URL to be used in your project's bundlex.exs. This text will assume familiarity with Bundlex and it's mechanism of managing precompiled dependencies, so if you're not acquainted with it you can read about it here.
Dependencies that are fully located in a correctly structured repository in membraneframework-precompiled github organization (details here) will be referred to as generic. Otherwise they will be referred to as non-generic.
The simplest example of natives/0 function in bundlex.exs, where we have an :example native that has an :example_dep Generic dependency:
defp natives() do
[
example: [
interface: :nif,
sources: ["example.c"],
os_deps: [
example_dep:
[{
:precompiled,
Membrane.PrecompiledDependencyProvider.get_dependency_url(:example_dep, "1.2.3")
}]
],
preprocessor: Unifex
]
]
Pool of dependencies provided by this package can be expanded with new ones. To add a generic dependency you don't need to modify anything in this package, only ensure that an appropriate repository exists in membraneframework-precompiled github organization or create it according to the instructions on the home page.
When the precompiled builds of a dependency are already hosted somewhere else they can be added as a non-generic dependency.
To achieve this create a clause of get_non_generic_dep_url/2 that pattern-matches on your dependency's name and returns an URL appropriate for the passed target:
defp get_non_generic_dep_url(:example_non_generic_dep, target) do
...
endFor reference see the implementation for :ffmpeg.
Copyright 2023, Software Mansion
Licensed under the Apache License, Version 2.0