diff options
Diffstat (limited to 'src/libxinevdec/idcinvideo.c')
-rw-r--r-- | src/libxinevdec/idcinvideo.c | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/src/libxinevdec/idcinvideo.c b/src/libxinevdec/idcinvideo.c index 5273a1160..af763b015 100644 --- a/src/libxinevdec/idcinvideo.c +++ b/src/libxinevdec/idcinvideo.c @@ -21,7 +21,7 @@ * the Id CIN format, visit: * http://www.csse.monash.edu.au/~timf/ * - * $Id: idcinvideo.c,v 1.4 2002/09/05 20:44:41 mroi Exp $ + * $Id: idcinvideo.c,v 1.5 2002/09/05 22:19:02 mroi Exp $ */ #include <stdio.h> @@ -195,11 +195,6 @@ void huff_build_tree(int prev) { * xine video plugin functions *************************************************************************/ -static int idcinvideo_can_handle (video_decoder_t *this_gen, int buf_type) { - - return (buf_type == BUF_VIDEO_IDCIN); -} - /* * This function is responsible is called to initialize the video decoder * for use. Initialization usually involves setting up the fields in your @@ -382,23 +377,12 @@ static void idcinvideo_dispose (video_decoder_t *this_gen) { /* * This function should be the plugin's only advertised function to the * outside world. It allows xine to query the plugin module for the addresses - * to the necessary functions in the video decoder object. The video - * decoder object also has a priority field which allows different decoder - * 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. + * to the necessary functions in the video decoder object. */ -static void *init_video_decoder_plugin (int iface_version, xine_t *xine) { +static void *init_video_decoder_plugin (xine_t *xine, void *data) { idcinvideo_decoder_t *this ; - if (iface_version != 10) { - printf( "idcinvideo: plugin doesn't support plugin API version %d.\n" - "idcinvideo: this means there's a version mismatch between xine and this " - "idcinvideo: decoder plugin.\nInstalling current plugins should help.\n", - iface_version); - return NULL; - } - this = (idcinvideo_decoder_t *) malloc (sizeof (idcinvideo_decoder_t)); memset(this, 0, sizeof (idcinvideo_decoder_t)); @@ -409,7 +393,20 @@ static void *init_video_decoder_plugin (int iface_version, xine_t *xine) { this->video_decoder.close = idcinvideo_close; this->video_decoder.get_identifier = idcinvideo_get_id; this->video_decoder.dispose = idcinvideo_dispose; - this->video_decoder.priority = 1; return (video_decoder_t *) this; } + +/* plugin catalog information */ +static uint32_t supported_types[] = { BUF_VIDEO_IDCIN, 0 }; + +static decoder_info_t video_decoder_info = { + supported_types, /* supported types */ + 1 /* priority */ +}; + +plugin_info_t xine_plugin_info[] = { + /* type, API, "name", version, special_info, init_function */ + { PLUGIN_VIDEO_DECODER, 10, "Id CIN Video", XINE_VERSION_CODE, &video_decoder_info, &init_video_decoder_plugin }, + { PLUGIN_NONE, 0, "", 0, NULL, NULL } +}; |