summaryrefslogtreecommitdiffstats
path: root/audio/filter/af.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-23 13:05:32 +0100
committerwm4 <wm4@nowhere>2013-04-13 04:21:27 +0200
commitc866583e1e31e6f648f2346fb9c5394d8d080587 (patch)
tree7cabc2948b1e8b6c12a13de77e6017265b00750e /audio/filter/af.h
parent5a958921a738f2cd928f8339872b74a3c299ff0e (diff)
downloadmpv-c866583e1e31e6f648f2346fb9c5394d8d080587.tar.bz2
mpv-c866583e1e31e6f648f2346fb9c5394d8d080587.tar.xz
af: use af_lavrresample for format conversions, if possible
Refactor to remove the duplicated format filter insertion code. Allow other format converting filters to be inserted on format mismatches. af_info.test_conversion checks whether conversion between two formats would work with the given filter; do this to avoid having to insert multiple conversion filters at once and such things. (Although this isn't ideal: what if we want to avoid af_format for some conversions? What if we want to split af_format in endian-swapping filters etc.?) Prefer af_lavrresample for conversions that it supports natively, otherwise let af_format handle the full conversion.
Diffstat (limited to 'audio/filter/af.h')
-rw-r--r--audio/filter/af.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/audio/filter/af.h b/audio/filter/af.h
index e4a329abea..50719c4d1b 100644
--- a/audio/filter/af.h
+++ b/audio/filter/af.h
@@ -60,6 +60,7 @@ struct af_info {
const char *comment;
const int flags;
int (*open)(struct af_instance *vf);
+ bool (*test_conversion)(int src_format, int dst_format);
};
// Linked list of audio filters