diff options
author | wm4 <wm4@nowhere> | 2016-02-05 23:19:56 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-02-05 23:19:56 +0100 |
commit | c0de087ba191a4daf3a152e0ab09b5687fab8449 (patch) | |
tree | b00043c5e4055ef777a0afdba6b4a321e87864de /player/lavfi.h | |
parent | 45345d9c41f1491e9809153dc3b3950fba560d89 (diff) |
player: add complex filter graph support
See --lavfi-complex option.
This is still quite rough. There's no support for dynamic configuration
of any kind. There are probably corner cases where playback might freeze
or burn 100% CPU (due to dataflow problems when interaction with
libavfilter).
Future possible plans might include:
- freely switch tracks by providing some sort of default track graph
label
- automatically enabling audio visualization
- automatically mix audio or stack video when multiple tracks are
selected at once (similar to how multiple sub tracks can be selected)
Diffstat (limited to 'player/lavfi.h')
-rw-r--r-- | player/lavfi.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/player/lavfi.h b/player/lavfi.h new file mode 100644 index 0000000000..d39ecb0219 --- /dev/null +++ b/player/lavfi.h @@ -0,0 +1,32 @@ +#ifndef MP_LAVFI +#define MP_LAVFI + +struct mp_log; +struct lavfi; +struct lavfi_pad; +struct mp_image; +struct mp_audio; + +enum lavfi_direction { + LAVFI_IN = 1, + LAVFI_OUT, +}; + +struct lavfi *lavfi_create(struct mp_log *log, char *graph_string); +void lavfi_destroy(struct lavfi *c); +struct lavfi_pad *lavfi_find_pad(struct lavfi *c, char *name); +enum lavfi_direction lavfi_pad_direction(struct lavfi_pad *pad); +enum stream_type lavfi_pad_type(struct lavfi_pad *pad); +void lavfi_set_connected(struct lavfi_pad *pad, bool connected); +bool lavfi_get_connected(struct lavfi_pad *pad); +bool lavfi_process(struct lavfi *c); +bool lavfi_has_failed(struct lavfi *c); +void lavfi_seek_reset(struct lavfi *c); +int lavfi_request_frame_a(struct lavfi_pad *pad, struct mp_audio **out_aframe); +int lavfi_request_frame_v(struct lavfi_pad *pad, struct mp_image **out_vframe); +bool lavfi_needs_input(struct lavfi_pad *pad); +void lavfi_send_status(struct lavfi_pad *pad, int status); +void lavfi_send_frame_a(struct lavfi_pad *pad, struct mp_audio *aframe); +void lavfi_send_frame_v(struct lavfi_pad *pad, struct mp_image *vframe); + +#endif |