module-filter-chain.c 62.7 KB
 Wim Taymans committed May 10, 2021 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 /* PipeWire * * Copyright © 2021 Wim Taymans * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include "config.h"  Wim Taymans committed Aug 11, 2021 36 #include "module-filter-chain/plugin.h"  Wim Taymans committed May 10, 2021 37 38  #include  Peter Hutterer committed May 18, 2021 39 #include  Wim Taymans committed May 10, 2021 40 41 #include #include  Wim Taymans committed Mar 01, 2022 42 #include  Wim Taymans committed May 10, 2021 43 44 #include  Evgeniy Khramtsov committed May 11, 2021 45 #include  Wim Taymans committed May 10, 2021 46 47 #include #include  48 #include  Wim Taymans committed May 10, 2021 49   Wim Taymans committed May 10, 2021 50 #define NAME "filter-chain"  Wim Taymans committed May 10, 2021 51   Peter Hutterer committed Sep 28, 2021 52 53 54 PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME); #define PW_LOG_TOPIC_DEFAULT mod_topic  Peter Hutterer committed Jun 25, 2021 55 56 57 /** * \page page_module_filter_chain PipeWire Module: Filter-Chain *  Wim Taymans committed Apr 22, 2022 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109  * The filter-chain allows you to create an arbitrary processing graph * from LADSPA, LV2 and builtin filters. This filter can be made into a * virtual sink/source or between any 2 nodes in the graph. * * The filter chain is built with 2 streams, a capture stream providing * the input to the filter chain and a playback stream sending out the * filtered stream to the next nodes in the graph. * * Because both ends of the filter-chain are built with streams, the session * manager can manage the configuration and connection with the sinks and * sources automatically. * * ## Module Options * * - node.description: a human readable name for the filter chain * - filter.graph = []: a description of the filter graph to run, see below * - capture.props = {}: properties to be passed to the input stream * - playback.props = {}: properties to be passed to the output stream * * ## Filter graph description * * The general structure of the graph description is as follows: * *\code{.unparsed} * filter.graph = { * nodes = [ * { * type = * name = * plugin = * label =