From 23775976f262d1cb3795d11ac3c2f2855a093a71 Mon Sep 17 00:00:00 2001 From: DominikWolek Date: Mon, 5 Sep 2022 09:51:10 +0200 Subject: [PATCH] Bugbash (#35) * Add description of the usage example * Update circleci config to use membraneframework/elixir orb * Update deps * Remove empty priv dir --- .circleci/config.yml | 123 ++----------------------------------------- README.md | 7 ++- mix.lock | 14 ++--- priv/plts/.gitkeep | 0 4 files changed, 17 insertions(+), 127 deletions(-) delete mode 100644 priv/plts/.gitkeep diff --git a/.circleci/config.yml b/.circleci/config.yml index d1befa8..09fadb3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,124 +1,11 @@ version: 2.1 -commands: - save_deps_cache: - steps: - - save_cache: - key: v1-mix-deps-cache-{{ checksum "mix.lock" }} - paths: ["deps"] - restore_deps_cache: - steps: - - restore_cache: - keys: - - v1-mix-deps-cache-{{ checksum "mix.lock" }} - - v1-mix-deps-cache- - workspace_init: - steps: - - checkout - - restore_deps_cache - - run: mix deps.clean --unused - - run: mix deps.get - - save_deps_cache - save_build_cache: - parameters: - env: - description: Mix environment - type: string - default: dev - steps: - - save_cache: - key: v1-build-cache-{{ arch }}-<< parameters.env >>-{{ checksum "mix.lock" }} - paths: ["_build/<< parameters.env >>"] - restore_build_cache: - parameters: - env: - description: Mix environment - type: string - default: dev - steps: - - restore_cache: - keys: - - v1-build-cache-{{ arch }}-<< parameters.env >>-{{ checksum "mix.lock" }} - - v1-build-cache-{{ arch }}-<< parameters.env >>- - - v1-build-cache-{{ arch }}- - - v1-build-cache- - gen_version_file: - steps: - - run: asdf current erlang > .runtime_version - - run: asdf current elixir >> .runtime_version - save_plt_cache: - steps: - - save_cache: - key: v1-dialyzer-cache-{{ checksum ".runtime_version" }}-{{ checksum "mix.lock" }} - paths: "priv/plts" - restore_plt_cache: - steps: - - restore_cache: - keys: - - v1-dialyzer-cache-{{ checksum ".runtime_version" }}-{{ checksum "mix.lock" }} - - v1-dialyzer-cache-{{ checksum ".runtime_version" }}- - - v1-dialyzer-cache- - -jobs: - build_test: - docker: - - image: membraneframeworklabs/docker_membrane - environment: - MIX_ENV: test - - working_directory: ~/app - - steps: - - workspace_init - - restore_build_cache: - env: test - - run: mix deps.compile - - run: mix compile --force --warnings-as-errors - - save_build_cache: - env: test - - run: mix deps.unlock --check-unused - - test: - docker: - - image: membraneframeworklabs/docker_membrane:latest - environment: - MIX_ENV: test - - working_directory: ~/app - - steps: - - workspace_init - - restore_build_cache: - env: test - - run: mix compile - - run: mix test - - lint: - docker: - - image: membraneframeworklabs/docker_membrane:latest - environment: - MIX_ENV: dev - - working_directory: ~/app - - steps: - - workspace_init - - restore_build_cache: - env: dev - - run: mix compile - - save_build_cache: - env: dev - - run: mix format --check-formatted - - run: mix credo - - run: mix docs && mix docs 2>&1 | (! grep -q "warning:") - - gen_version_file - - restore_plt_cache - - run: mix dialyzer - - save_plt_cache +orbs: + elixir: membraneframework/elixir@1 workflows: version: 2 build: jobs: - - build_test - - test - - lint + - elixir/build_test + - elixir/test + - elixir/lint diff --git a/README.md b/README.md index 230700b..41ade55 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Plugin performing audio conversion, resampling and channel mixing, using SWResample module of [FFmpeg](https://www.ffmpeg.org/) library. -It is a part of [Membrane Multimedia Framework](https://membraneframework.org). +It is a part of [Membrane Multimedia Framework](https://membrane.stream). ## Installation @@ -18,7 +18,10 @@ Add the following line to your `deps` in `mix.exs`. Run `mix deps.get`. You also need to have [FFmpeg](https://www.ffmpeg.org/) library installed. -## Sample usage +## Usage + +The pipeline takes raw audio, converts the sample format from `s24le` to `f32le` and resamples +it to 44.1 kHz rate. ```elixir defmodule Resampling.Pipeline do diff --git a/mix.lock b/mix.lock index 776f005..8077e34 100644 --- a/mix.lock +++ b/mix.lock @@ -3,20 +3,20 @@ "bunch": {:hex, :bunch, "1.3.1", "f8fe80042f9eb474ef2801ae2c9372f9b13d11e7053265dcfc24b9d912e3750b", [:mix], [], "hexpm", "00e21b16ff9bb698b728a01a2fc4b3bf7fc0e87c4bb9c6e4a442324aa8c5e567"}, "bunch_native": {:hex, :bunch_native, "0.5.0", "8ac1536789a597599c10b652e0b526d8833348c19e4739a0759a2bedfd924e63", [:mix], [{:bundlex, "~> 1.0", [hex: :bundlex, repo: "hexpm", optional: false]}], "hexpm", "24190c760e32b23b36edeb2dc4852515c7c5b3b8675b1a864e0715bdd1c8f80d"}, "bundlex": {:hex, :bundlex, "1.0.0", "358c26a6c027359c6935dcd0716b68736b7604599d376c4e1ac17c6618ef6771", [:mix], [{:bunch, "~> 1.0", [hex: :bunch, repo: "hexpm", optional: false]}, {:qex, "~> 0.5", [hex: :qex, repo: "hexpm", optional: false]}, {:secure_random, "~> 0.5", [hex: :secure_random, repo: "hexpm", optional: false]}], "hexpm", "09b4a0c597a31e6e7ce8e103b94f19539bb2279f5966a3d6d46dcd32a5b6fd44"}, - "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, + "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, "coerce": {:hex, :coerce, "1.0.1", "211c27386315dc2894ac11bc1f413a0e38505d808153367bd5c6e75a4003d096", [:mix], [], "hexpm", "b44a691700f7a1a15b4b7e2ff1fa30bebd669929ac8aa43cffe9e2f8bf051cf1"}, - "credo": {:hex, :credo, "1.6.4", "ddd474afb6e8c240313f3a7b0d025cc3213f0d171879429bf8535d7021d9ad78", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "c28f910b61e1ff829bffa056ef7293a8db50e87f2c57a9b5c3f57eee124536b7"}, - "dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.25", "2024618731c55ebfcc5439d756852ec4e85978a39d0d58593763924d9a15916f", [:mix], [], "hexpm", "56749c5e1c59447f7b7a23ddb235e4b3defe276afc220a6227237f3efe83f51e"}, + "credo": {:hex, :credo, "1.6.6", "f51f8d45db1af3b2e2f7bee3e6d3c871737bda4a91bff00c5eec276517d1a19c", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "625520ce0984ee0f9f1f198165cd46fa73c1e59a17ebc520038b8fce056a5bdc"}, + "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.26", "f4291134583f373c7d8755566122908eb9662df4c4b63caa66a0eabe06569b0a", [:mix], [], "hexpm", "48d460899f8a0c52c5470676611c01f64f3337bad0b26ddab43648428d94aabc"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.28.4", "001a0ea6beac2f810f1abc3dbf4b123e9593eaa5f00dd13ded024eae7c523298", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "bf85d003dd34911d89c8ddb8bda1a958af3471a274a4c2150a9c01c78ac3f8ed"}, + "ex_doc": {:hex, :ex_doc, "0.28.5", "3e52a6d2130ce74d096859e477b97080c156d0926701c13870a4e1f752363279", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "d2c4b07133113e9aa3e9ba27efb9088ba900e9e51caa383919676afdf09ab181"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, "jason": {:hex, :jason, "1.3.0", "fa6b82a934feb176263ad2df0dbd91bf633d4a46ebfdffea0c8ae82953714946", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "53fc1f51255390e0ec7e50f9cb41e751c260d065dcba2bf0d08dc51a4002c2ac"}, "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, "makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, "membrane_common_c": {:hex, :membrane_common_c, "0.13.0", "c314623f93209eb2fa092379954c686f6e50ac89baa48360f836d24f4d53f5ee", [:mix], [{:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:shmex, "~> 0.5.0", [hex: :shmex, repo: "hexpm", optional: false]}, {:unifex, "~> 1.0", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "90181fbbe481ccd0a4a76daf0300f8ad1b5b0bf0ebd8b42c133904f8839663ca"}, - "membrane_core": {:hex, :membrane_core, "0.10.1", "b4fb68d9e541888b60ebbf4e22c4913a84f35c955846b7df26154cb7c5ce0f78", [:mix], [{:bunch, "~> 1.3", [hex: :bunch, repo: "hexpm", optional: false]}, {:qex, "~> 0.3", [hex: :qex, repo: "hexpm", optional: false]}, {:ratio, "~> 2.0", [hex: :ratio, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d039f67d00cb1c1608b1e4f03cea8a9b5a88ff0fef3f61f54dc65e515b9dc286"}, + "membrane_core": {:hex, :membrane_core, "0.10.2", "d2d17039f6df746e4a3c47da32f51867fbafe528272cdd9b226d16b1032bc337", [:mix], [{:bunch, "~> 1.3", [hex: :bunch, repo: "hexpm", optional: false]}, {:qex, "~> 0.3", [hex: :qex, repo: "hexpm", optional: false]}, {:ratio, "~> 2.0", [hex: :ratio, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6a4f290f919ada66c772807d64d5830be2962b7c13a2f2bc9ace416a1cd19ee1"}, "membrane_file_plugin": {:hex, :membrane_file_plugin, "0.12.0", "eb940e7a2f2abf30e048bd0b7c2bef9c17c18aa58875b9a833c0bc7e7b1fd709", [:mix], [{:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}], "hexpm", "281b9bf9467beead3f973adce55b9844bc4206bb3f3f60f0db8320a4af4fc5ca"}, "membrane_raw_audio_format": {:hex, :membrane_raw_audio_format, "0.9.0", "c404a6eb38600dd85ad69dcf974b3c82fe0ef07c92e602cd438763dcdaf3462d", [:mix], [{:bimap, "~> 1.1", [hex: :bimap, repo: "hexpm", optional: false]}, {:bunch, "~> 1.0", [hex: :bunch, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}], "hexpm", "7b346bd3be6bcc7ceb9fe28ca6a9dfd8b072e9f6960fe5766ea99582319c05df"}, "mockery": {:hex, :mockery, "2.3.1", "a02fd60b10ac9ed37a7a2ecf6786c1f1dd5c75d2b079a60594b089fba32dc087", [:mix], [], "hexpm", "1d0971d88ebf084e962da3f2cfee16f0ea8e04ff73a7710428500d4500b947fa"}, @@ -27,5 +27,5 @@ "secure_random": {:hex, :secure_random, "0.5.1", "c5532b37c89d175c328f5196a0c2a5680b15ebce3e654da37129a9fe40ebf51b", [:mix], [], "hexpm", "1b9754f15e3940a143baafd19da12293f100044df69ea12db5d72878312ae6ab"}, "shmex": {:hex, :shmex, "0.5.0", "7dc4fb1a8bd851085a652605d690bdd070628717864b442f53d3447326bcd3e8", [:mix], [{:bunch_native, "~> 0.5.0", [hex: :bunch_native, repo: "hexpm", optional: false]}, {:bundlex, "~> 1.0", [hex: :bundlex, repo: "hexpm", optional: false]}], "hexpm", "b67bb1e22734758397c84458dbb746519e28eac210423c267c7248e59fc97bdc"}, "telemetry": {:hex, :telemetry, "1.1.0", "a589817034a27eab11144ad24d5c0f9fab1f58173274b1e9bae7074af9cbee51", [:rebar3], [], "hexpm", "b727b2a1f75614774cff2d7565b64d0dfa5bd52ba517f16543e6fc7efcc0df48"}, - "unifex": {:hex, :unifex, "1.0.0", "a8a2ac6f6f437dd689db8c680df53e28e43c0548cd58ba2af36a1241f66fbc62", [:mix], [{:bunch, "~> 1.0", [hex: :bunch, repo: "hexpm", optional: false]}, {:bundlex, "~> 1.0", [hex: :bundlex, repo: "hexpm", optional: false]}, {:shmex, "~> 0.5.0", [hex: :shmex, repo: "hexpm", optional: false]}], "hexpm", "23b30d5d9d65bb77c25397e476d86818df7b6519bcb0ea816429a70d0729c14d"}, + "unifex": {:hex, :unifex, "1.0.1", "c8ebda892901e2fdb262a0ff95f4157fd5575709965b88a6415e43b527adcc0c", [:mix], [{:bunch, "~> 1.0", [hex: :bunch, repo: "hexpm", optional: false]}, {:bundlex, "~> 1.0", [hex: :bundlex, repo: "hexpm", optional: false]}, {:shmex, "~> 0.5.0", [hex: :shmex, repo: "hexpm", optional: false]}], "hexpm", "4b5217c06f5f8f82215d2edf077e40f7d4d0ee30c456b19f2eb99bfb484c558d"}, } diff --git a/priv/plts/.gitkeep b/priv/plts/.gitkeep deleted file mode 100644 index e69de29..0000000