summaryrefslogtreecommitdiffstats
path: root/libvo/vo_null.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-07 00:24:53 +0200
committerwm4 <wm4@nowhere>2012-08-07 01:09:30 +0200
commit76b98e4c32b4d60e4c3740c3bb96753f9812b982 (patch)
tree6250fc0ce0d50c575392831cf75c0583361f6135 /libvo/vo_null.c
parentc113e6ed7de00dcee53f94871985a33dca9c7c29 (diff)
downloadmpv-76b98e4c32b4d60e4c3740c3bb96753f9812b982.tar.bz2
mpv-76b98e4c32b4d60e4c3740c3bb96753f9812b982.tar.xz
vo_null: reformat and use new VO API
Diffstat (limited to 'libvo/vo_null.c')
-rw-r--r--libvo/vo_null.c90
1 files changed, 42 insertions, 48 deletions
diff --git a/libvo/vo_null.c b/libvo/vo_null.c
index eff81cb260..1f307f7f5b 100644
--- a/libvo/vo_null.c
+++ b/libvo/vo_null.c
@@ -27,83 +27,77 @@
#include "config.h"
#include "mp_msg.h"
#include "video_out.h"
-#include "video_out_internal.h"
+#include "libmpcodecs/vfcap.h"
+#include "libmpcodecs/mp_image.h"
-static const vo_info_t info =
-{
- "Null video output",
- "null",
- "Aaron Holtzman <aholtzma@ess.engr.uvic.ca>",
- ""
-};
-
-const LIBVO_EXTERN(null)
-
-static uint32_t image_width, image_height;
-
-//static uint32_t
-static int draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y)
-//draw_slice(uint8_t *src[], uint32_t slice_num)
-{
- return 0;
-}
-
-static void draw_osd(void)
+static int draw_slice(struct vo *vo, uint8_t *image[], int stride[],
+ int w, int h, int x, int y)
{
+ return 0;
}
-static void
-flip_page(void)
+static void draw_osd(struct vo *vo, struct osd_state *osd)
{
}
-static int
-draw_frame(uint8_t *src[])
+static void flip_page(struct vo *vo)
{
- return 0;
}
-static int
-query_format(uint32_t format)
+static int query_format(struct vo *vo, uint32_t format)
{
if (IMGFMT_IS_HWACCEL(format))
return 0;
return VFCAP_CSP_SUPPORTED;
}
-static int
-config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
+static int config(struct vo *vo, uint32_t width, uint32_t height,
+ uint32_t d_width, uint32_t d_height, uint32_t flags,
+ uint32_t format)
{
- image_width = width;
- image_height = height;
- return 0;
+ return 0;
}
-static void
-uninit(void)
+static void uninit(struct vo *vo)
{
}
-
-static void check_events(void)
+static void check_events(struct vo *vo)
{
}
-static int preinit(const char *arg)
+static int preinit(struct vo *vo, const char *arg)
{
- if(arg)
- {
- mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_NULL] Unknown subdevice: %s.\n",arg);
- return ENOSYS;
+ if (arg) {
+ mp_tmsg(MSGT_VO, MSGL_WARN, "[VO_NULL] Unknown subdevice: %s.\n", arg);
+ return ENOSYS;
}
return 0;
}
-static int control(uint32_t request, void *data)
+static int control(struct vo *vo, uint32_t request, void *data)
{
- switch (request) {
- case VOCTRL_QUERY_FORMAT:
- return query_format(*((uint32_t*)data));
- }
- return VO_NOTIMPL;
+ switch (request) {
+ case VOCTRL_QUERY_FORMAT:
+ return query_format(vo, *((uint32_t *)data));
+ }
+ return VO_NOTIMPL;
}
+
+const struct vo_driver video_out_null = {
+ .is_new = false,
+ .info = &(const vo_info_t) {
+ "Null video output",
+ "null",
+ "Aaron Holtzman <aholtzma@ess.engr.uvic.ca>",
+ ""
+ },
+ .preinit = preinit,
+ .config = config,
+ .control = control,
+ .draw_slice = draw_slice,
+ .draw_osd = draw_osd,
+ .flip_page = flip_page,
+ .check_events = check_events,
+ .uninit = uninit,
+};