diff options
-rw-r--r-- | xine/post_util.h | 33 | ||||
-rw-r--r-- | xine_post_swscale.c | 8 |
2 files changed, 36 insertions, 5 deletions
diff --git a/xine/post_util.h b/xine/post_util.h index c3607e53..2c1fb34e 100644 --- a/xine/post_util.h +++ b/xine/post_util.h @@ -4,18 +4,27 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: post_util.h,v 1.1 2008-02-19 01:24:19 phintuka Exp $ + * $Id: post_util.h,v 1.2 2008-02-28 06:06:08 phintuka Exp $ * */ +#if POST_PLUGIN_IFACE_VERSION < 9 +# warning POST_PLUGIN_IFACE_VERSION < 9 not supported ! +#endif +#if POST_PLUGIN_IFACE_VERSION > 10 +# warning POST_PLUGIN_IFACE_VERSION > 10 not supported ! +#endif + /* * class util prototypes */ static void *init_plugin(xine_t *xine, void *data); +#if POST_PLUGIN_IFACE_VERSION < 10 static char *get_identifier(post_class_t *class_gen); static char *get_description(post_class_t *class_gen); static void class_dispose(post_class_t *class_gen); +#endid /* required from plugin: */ static post_plugin_t *open_plugin(post_class_t *class_gen, int inputs, @@ -29,6 +38,9 @@ static post_plugin_t *open_plugin(post_class_t *class_gen, int inputs, static int dispatch_draw(vo_frame_t *frame, xine_stream_t *stream); static int intercept_frame_yuy(post_video_port_t *port, vo_frame_t *frame); static int post_draw(vo_frame_t *frame, xine_stream_t *stream); +#ifdef ENABLE_SLICED +static void dispatch_slice(vo_frame_t *vo_img, uint8_t **src); +#endif /* required from plugin: */ static vo_frame_t *got_frame(vo_frame_t *frame); @@ -47,13 +59,20 @@ static void *init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = open_plugin; +#if POST_PLUGIN_IFACE_VERSION < 10 class->get_identifier = get_identifier; class->get_description = get_description; class->dispose = class_dispose; +#else + class->identifier = PLUGIN_ID; + class->description = PLUGIN_DESCR; + class->dispose = default_post_class_dispose; +#endif return class; } +#if POST_PLUGIN_IFACE_VERSION < 10 static char *get_identifier(post_class_t *class_gen) { return PLUGIN_ID; @@ -68,11 +87,23 @@ static void class_dispose(post_class_t *class_gen) { free(class_gen); } +#endif /* * plugin utils */ +#ifdef ENABLE_SLICED +static void dispatch_slice(vo_frame_t *vo_img, uint8_t **src) +{ + if (vo_img->next->proc_slice) { + _x_post_frame_copy_down(vo_img, vo_img->next); + vo_img->next->proc_slice(vo_img->next, src); + _x_post_frame_copy_up(vo_img, vo_img->next); + } +} +#endif + static int dispatch_draw(vo_frame_t *frame, xine_stream_t *stream) { int skip; diff --git a/xine_post_swscale.c b/xine_post_swscale.c index 70392ee4..87f3bd5e 100644 --- a/xine_post_swscale.c +++ b/xine_post_swscale.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_post_swscale.c,v 1.5 2008-02-21 18:51:06 phintuka Exp $ + * $Id: xine_post_swscale.c,v 1.6 2008-02-28 06:06:07 phintuka Exp $ * * Simple (faster) resize for avisynth * Copyright (C) 2002 Tom Barry @@ -1720,8 +1720,8 @@ static post_info_t info = { XINE_POST_TYPE_VIDEO_FILTER }; const plugin_info_t xine_plugin_info[] __attribute__((visibility("default"))) = { - /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 9, "warp", XINE_VERSION_CODE, &info, &warp_init_plugin }, - { PLUGIN_POST, 9, "swscale", XINE_VERSION_CODE, &info, &warp_init_plugin }, + /* type, API, "name", version, special_info, init_function */ + { PLUGIN_POST, POST_PLUGIN_IFACE_VERSION, "warp", XINE_VERSION_CODE, &info, &warp_init_plugin }, + { PLUGIN_POST, POST_PLUGIN_IFACE_VERSION, "swscale", XINE_VERSION_CODE, &info, &warp_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; |