From 2bcfe1e077fe043751d3f7c73c82be761629419f Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 3 Apr 2008 06:25:41 +0300 Subject: Add new video driver API Create new video driver API that has a per-instance context structure and does not rely on keeping status in global or static variables. Existing drivers are not yet converted to this API; instead there is a wrapper which translates calls to them. In the new API, an old API call vo_functions->xyz(args) is generally replaced by vo_xyz(vo_instance, args). The changes to keep the vesa, dxr2 and xover drivers compiling have not been tested. --- mencoder.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'mencoder.c') diff --git a/mencoder.c b/mencoder.c index 6530d1f449..c5e0d682fa 100644 --- a/mencoder.c +++ b/mencoder.c @@ -209,11 +209,16 @@ char *info_sourceform=NULL; char *info_comment=NULL; // Needed by libmpcodecs vf_vo.c -int config_video_out(const vo_functions_t *vo, uint32_t width, uint32_t height, - uint32_t d_width, uint32_t d_height, uint32_t flags, - char *title, uint32_t format) { - return 1; -} +int vo_config(struct vo *vo, uint32_t width, uint32_t height, + uint32_t d_width, uint32_t d_height, uint32_t flags, + char *title, uint32_t format) { abort(); } +int vo_control(struct vo *vo, uint32_t request, void *data) { abort(); } +int vo_draw_frame(struct vo *vo, uint8_t *src[]) { abort(); } +int vo_draw_slice(struct vo *vo, uint8_t *src[], int stride[], int w, int h, int x, int y) { abort(); } +void vo_draw_osd(struct vo *vo) { abort(); } +void vo_flip_page(struct vo *vo) { abort(); } +void vo_check_events(struct vo *vo) { abort(); } + // Needed by libmpdemux. int mp_input_check_interrupt(int time) { usec_sleep(time); -- cgit v1.2.3