summaryrefslogtreecommitdiff
path: root/src/libxinevdec/qtsmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libxinevdec/qtsmc.c')
-rw-r--r--src/libxinevdec/qtsmc.c43
1 files changed, 16 insertions, 27 deletions
diff --git a/src/libxinevdec/qtsmc.c b/src/libxinevdec/qtsmc.c
index 3dff56ee1..f145642e7 100644
--- a/src/libxinevdec/qtsmc.c
+++ b/src/libxinevdec/qtsmc.c
@@ -23,7 +23,7 @@
* For more information on the SMC format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: qtsmc.c,v 1.3 2002/09/05 20:44:42 mroi Exp $
+ * $Id: qtsmc.c,v 1.4 2002/09/05 22:19:03 mroi Exp $
*/
#include <stdio.h>
@@ -495,22 +495,6 @@ void decode_qtsmc(qtsmc_decoder_t *this) {
*************************************************************************/
/*
- * This function is called by xine to determine which buffer types this
- * decoder knows how to handle.
- * Parameters:
- * this_gen: A video decoder object
- * buf_type: The number of the buffer type that xine is querying for;
- * these buffer constants are defined in src/xine-engine/buffer.h.
- * Return:
- * 1 if the decoder is capable of handling buf_type
- * 0 if the decoder is not capable of handling buf_type
- */
-static int qtsmc_can_handle (video_decoder_t *this_gen, int buf_type) {
-
- return (buf_type == BUF_VIDEO_SMC);
-}
-
-/*
* This function is responsible is called to initialize the video decoder
* for use. Initialization usually involves setting up the fields in your
* private video decoder object.
@@ -677,18 +661,10 @@ static void qtsmc_dispose (video_decoder_t *this_gen) {
free (this_gen);
}
-static void *init_video_decoder_plugin (int iface_version, xine_t *xine) {
+static void *init_video_decoder_plugin (xine_t *xine, void *data) {
qtsmc_decoder_t *this ;
- if (iface_version != 10) {
- printf( "qtsmc: plugin doesn't support plugin API version %d.\n"
- "qtsmc: this means there's a version mismatch between xine and this "
- "qtsmc: decoder plugin.\nInstalling current plugins should help.\n",
- iface_version);
- return NULL;
- }
-
this = (qtsmc_decoder_t *) malloc (sizeof (qtsmc_decoder_t));
memset(this, 0, sizeof (qtsmc_decoder_t));
@@ -699,8 +675,21 @@ static void *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this->video_decoder.close = qtsmc_close;
this->video_decoder.get_identifier = qtsmc_get_id;
this->video_decoder.dispose = qtsmc_dispose;
- this->video_decoder.priority = 9;
return (video_decoder_t *) this;
}
+/* plugin catalog information */
+static uint32_t supported_types[] = { BUF_VIDEO_SMC, 0 };
+
+static decoder_info_t video_decoder_info = {
+ supported_types, /* supported types */
+ 9 /* priority */
+};
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_VIDEO_DECODER, 10, "QT SMC", XINE_VERSION_CODE, &video_decoder_info, &init_video_decoder_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
+