diff options
Diffstat (limited to 'src/libxinevdec/fli.c')
-rw-r--r-- | src/libxinevdec/fli.c | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/src/libxinevdec/fli.c b/src/libxinevdec/fli.c index 3527692c0..cb3f597ab 100644 --- a/src/libxinevdec/fli.c +++ b/src/libxinevdec/fli.c @@ -23,7 +23,7 @@ * avoid when implementing a FLI decoder, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: fli.c,v 1.3 2002/08/28 03:37:17 tmmm Exp $ + * $Id: fli.c,v 1.4 2002/09/04 23:31:11 guenter Exp $ */ #include <stdio.h> @@ -32,9 +32,9 @@ #include <sys/types.h> #include <unistd.h> +#include "xine_internal.h" #include "video_out.h" #include "buffer.h" -#include "xine_internal.h" #include "xineutils.h" #include "bswap.h" @@ -403,11 +403,6 @@ void decode_fli_frame(fli_decoder_t *this) { * xine video plugin functions *************************************************************************/ -static int fli_can_handle (video_decoder_t *this_gen, int buf_type) { - - return (buf_type == BUF_VIDEO_FLI); -} - /* * This function is responsible is called to initialize the video decoder * for use. Initialization usually involves setting up the fields in your @@ -479,7 +474,7 @@ static void fli_decode_data (video_decoder_t *this_gen, img = this->video_out->get_frame (this->video_out, this->width, this->height, - 42, IMGFMT_YUY2, VO_BOTH_FIELDS); + XINE_VO_ASPECT_DONT_TOUCH, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS); img->duration = this->video_step; img->pts = buf->pts; @@ -569,23 +564,13 @@ static void fli_dispose (video_decoder_t *this_gen) { * plugins for the same buffer types to coexist peacefully. The higher the * priority number, the more precedence a decoder has. E.g., 9 beats 1. */ -video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) { +void *init_video_decoder_plugin (xine_t *xine, void *data) { fli_decoder_t *this ; - if (iface_version != 10) { - printf( "fli: plugin doesn't support plugin API version %d.\n" - "fli: this means there's a version mismatch between xine and this " - "fli: decoder plugin.\nInstalling current plugins should help.\n", - iface_version); - return NULL; - } - this = (fli_decoder_t *) malloc (sizeof (fli_decoder_t)); memset(this, 0, sizeof (fli_decoder_t)); - this->video_decoder.interface_version = iface_version; - this->video_decoder.can_handle = fli_can_handle; this->video_decoder.init = fli_init; this->video_decoder.decode_data = fli_decode_data; this->video_decoder.flush = fli_flush; @@ -595,5 +580,26 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) { this->video_decoder.dispose = fli_dispose; this->video_decoder.priority = 1; - return (video_decoder_t *) this; + return this; } + +/* + * exported plugin catalog entry + */ + +static uint32_t video_types[] = { + BUF_VIDEO_FLI, + 0 + }; + +static decoder_info_t dec_info_video = { + video_types, /* supported types */ + 1 /* priority */ +}; + +plugin_info_t xine_plugin_info[] = { + /* type, API, "name", version, special_info, init_function */ + { PLUGIN_VIDEO_DECODER, 10, "fli", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_plugin }, + { PLUGIN_NONE, 0, "", 0, NULL, NULL } +}; + |