summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-12-12 14:53:37 +0100
committerJan Ekström <jeebjp@gmail.com>2017-12-12 22:02:56 +0200
commit26cdd52801db325bba5aaedc1b3544d086049fd6 (patch)
treea40fbfdfd905e7ca558d4e600027040096e8eed5 /video
parent6c8e7daebb64da59325c4fca10dd3274702ff4f4 (diff)
downloadmpv-26cdd52801db325bba5aaedc1b3544d086049fd6.tar.bz2
mpv-26cdd52801db325bba5aaedc1b3544d086049fd6.tar.xz
vf_buffer: remove this filter
It has been deprecated for a while and is 100% useless. It was forgotten in the recent filter purge. Get rid of it.
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf.c2
-rw-r--r--video/filter/vf_buffer.c85
2 files changed, 0 insertions, 87 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c
index cd49ebdf52..48a6e9a3a6 100644
--- a/video/filter/vf.c
+++ b/video/filter/vf.c
@@ -48,7 +48,6 @@ extern const vf_info_t vf_info_vaapi;
extern const vf_info_t vf_info_vapoursynth;
extern const vf_info_t vf_info_vapoursynth_lazy;
extern const vf_info_t vf_info_vdpaupp;
-extern const vf_info_t vf_info_buffer;
extern const vf_info_t vf_info_d3d11vpp;
// list of available filters:
@@ -58,7 +57,6 @@ static const vf_info_t *const filter_list[] = {
&vf_info_convert,
&vf_info_lavfi,
&vf_info_lavfi_bridge,
- &vf_info_buffer,
#if HAVE_VAPOURSYNTH_CORE && HAVE_VAPOURSYNTH
&vf_info_vapoursynth,
#endif
diff --git a/video/filter/vf_buffer.c b/video/filter/vf_buffer.c
deleted file mode 100644
index f08dfec12d..0000000000
--- a/video/filter/vf_buffer.c
+++ /dev/null
@@ -1,85 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-
-#include "mpv_talloc.h"
-
-#include "options/m_option.h"
-
-#include "video/img_format.h"
-#include "video/mp_image.h"
-
-#include "vf.h"
-
-#define MAX_Q 100
-
-struct vf_priv_s {
- struct mp_image *queued[MAX_Q];
- int num_queued;
- int cfg_num;
-};
-
-static void flush(struct vf_instance *vf)
-{
- for (int n = 0; n < vf->priv->num_queued; n++)
- mp_image_unrefp(&vf->priv->queued[n]);
- vf->priv->num_queued = 0;
-}
-
-static int filter_ext(struct vf_instance *vf, struct mp_image *mpi)
-{
- struct vf_priv_s *p = vf->priv;
- if (mpi) {
- if (p->num_queued == p->cfg_num) {
- vf_add_output_frame(vf, p->queued[p->num_queued - 1]);
- p->num_queued--;
- }
- p->num_queued++;
- for (int n = p->num_queued - 1; n > 0; n--)
- p->queued[n] = p->queued[n - 1];
- p->queued[0] = mpi;
- } else {
- // EOF
- while (p->num_queued) {
- vf_add_output_frame(vf, p->queued[p->num_queued - 1]);
- p->num_queued--;
- }
- }
- return 0;
-}
-
-static int control(vf_instance_t *vf, int request, void *data)
-{
- if (request == VFCTRL_SEEK_RESET) {
- flush(vf);
- return CONTROL_OK;
- }
- return CONTROL_UNKNOWN;
-}
-
-static void uninit(vf_instance_t *vf)
-{
- flush(vf);
-}
-
-static int vf_open(vf_instance_t *vf)
-{
- MP_WARN(vf, "This filter is deprecated. No replacement.\n");
- vf->filter_ext = filter_ext;
- vf->control = control;
- vf->uninit = uninit;
- return 1;
-}
-
-#define OPT_BASE_STRUCT struct vf_priv_s
-const vf_info_t vf_info_buffer = {
- .description = "buffer a number of frames",
- .name = "buffer",
- .open = vf_open,
- .priv_size = sizeof(struct vf_priv_s),
- .options = (const struct m_option[]){
- OPT_INTRANGE("num", cfg_num, 0, 1, MAX_Q, OPTDEF_INT(2)),
- {0}
- },
-};