#include <vlc_plugin.h>
#include <vlc_vout_display.h>
#include <vlc_picture_pool.h>
-#include <vlc_charset.h>
+#include <vlc_fs.h>
/*****************************************************************************
* Module descriptor
#define YUV_FILE_TEXT N_("device, fifo or filename")
#define YUV_FILE_LONGTEXT N_("device, fifo or filename to write yuv frames too.")
-#define CHROMA_TEXT N_("Chroma used.")
+#define CHROMA_TEXT N_("Chroma used")
#define CHROMA_LONGTEXT N_(\
"Force use of a specific chroma for output. Default is I420.")
};
/* */
-static picture_t *Get (vout_display_t *);
-static void Display(vout_display_t *, picture_t *);
-static int Control(vout_display_t *, int, va_list);
-static void Manage (vout_display_t *);
+static picture_pool_t *Pool (vout_display_t *, unsigned);
+static void Display(vout_display_t *, picture_t *);
+static int Control(vout_display_t *, int, va_list);
+static void Manage (vout_display_t *);
/*****************************************************************************
* vout_display_sys_t: video output descriptor
FILE *f;
bool is_first;
bool is_yuv4mpeg2;
- bool use_dr;
picture_pool_t *pool;
};
return VLC_EGENERIC;
}
}
- sys->use_dr = chroma == vd->fmt.i_chroma;
msg_Dbg(vd, "Using chroma %4.4s", (char *)&chroma);
/* */
free(sys);
return VLC_EGENERIC;
}
- sys->f = utf8_fopen(name, "wb");
+ sys->f = vlc_fopen(name, "wb");
if (!sys->f) {
msg_Err(vd, "Failed to open %s", name);
/* */
vd->fmt = fmt;
vd->info = info;
- vd->get = Get;
+ vd->pool = Pool;
vd->prepare = NULL;
vd->display = Display;
vd->control = Control;
/*****************************************************************************
*
*****************************************************************************/
-static picture_t *Get(vout_display_t *vd)
+static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
{
vout_display_sys_t *sys = vd->sys;
- if (!sys->pool) {
- sys->pool = picture_pool_NewFromFormat(&vd->fmt, sys->use_dr ? VOUT_MAX_PICTURES : 1);
- if (!sys->pool)
- return NULL;
- }
- return picture_pool_Get(sys->pool);
+ if (!sys->pool)
+ sys->pool = picture_pool_NewFromFormat(&vd->fmt, count);
+ return sys->pool;
}
static void Display(vout_display_t *vd, picture_t *picture)