summaryrefslogtreecommitdiffstats
path: root/audio/filter/af.h
diff options
context:
space:
mode:
Diffstat (limited to 'audio/filter/af.h')
-rw-r--r--audio/filter/af.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/audio/filter/af.h b/audio/filter/af.h
index 88cbbc0119..ba64379661 100644
--- a/audio/filter/af.h
+++ b/audio/filter/af.h
@@ -27,6 +27,7 @@
#include "audio/chmap.h"
#include "audio/audio.h"
#include "common/msg.h"
+#include "common/common.h"
struct af_instance;
struct mpv_global;
@@ -34,10 +35,6 @@ struct mpv_global;
// Number of channels
#define AF_NCH MP_NUM_CHANNELS
-// Flags used for defining the behavior of an audio filter
-#define AF_FLAGS_REENTRANT 0x00000000
-#define AF_FLAGS_NOT_REENTRANT 0x00000001
-
// Flags for af->filter()
#define AF_FILTER_FLAG_EOF 1
@@ -46,7 +43,6 @@ struct mpv_global;
struct af_info {
const char *info;
const char *name;
- const int flags;
int (*open)(struct af_instance *vf);
int priv_size;
const void *priv_defaults;
@@ -104,13 +100,12 @@ struct af_stream {
};
// Return values
-#define AF_DETACH 2
-#define AF_OK 1
-#define AF_TRUE 1
-#define AF_FALSE 0
-#define AF_UNKNOWN -1
-#define AF_ERROR -2
-#define AF_FATAL -3
+#define AF_DETACH (CONTROL_OK + 1)
+#define AF_OK CONTROL_OK
+#define AF_TRUE CONTROL_TRUE
+#define AF_FALSE CONTROL_FALSE
+#define AF_UNKNOWN CONTROL_UNKNOWN
+#define AF_ERROR CONTROL_ERROR
// Parameters for af_control_*
enum af_control {
@@ -127,6 +122,7 @@ enum af_control {
AF_CONTROL_GET_PAN_BALANCE,
AF_CONTROL_SET_PLAYBACK_SPEED,
AF_CONTROL_SET_PLAYBACK_SPEED_RESAMPLE,
+ AF_CONTROL_GET_METADATA,
};
// Argument for AF_CONTROL_SET_PAN_LEVEL
@@ -145,6 +141,7 @@ int af_remove_by_label(struct af_stream *s, char *label);
struct af_instance *af_find_by_label(struct af_stream *s, char *label);
struct af_instance *af_control_any_rev(struct af_stream *s, int cmd, void *arg);
void af_control_all(struct af_stream *s, int cmd, void *arg);
+int af_control_by_label(struct af_stream *s, int cmd, void *arg, bstr label);
void af_seek_reset(struct af_stream *s);
void af_add_output_frame(struct af_instance *af, struct mp_audio *frame);