summaryrefslogtreecommitdiff
path: root/src/libxinevdec
diff options
context:
space:
mode:
Diffstat (limited to 'src/libxinevdec')
-rw-r--r--src/libxinevdec/cinepak.c44
-rw-r--r--src/libxinevdec/cyuv.c44
-rw-r--r--src/libxinevdec/fli.c46
-rw-r--r--src/libxinevdec/idcinvideo.c8
-rw-r--r--src/libxinevdec/msrle.c45
-rw-r--r--src/libxinevdec/msvc.c44
-rw-r--r--src/libxinevdec/qtrpza.c8
-rw-r--r--src/libxinevdec/qtsmc.c8
-rw-r--r--src/libxinevdec/rgb.c44
-rw-r--r--src/libxinevdec/roqvideo.c40
-rw-r--r--src/libxinevdec/svq1.c44
-rw-r--r--src/libxinevdec/wc3video.c8
-rw-r--r--src/libxinevdec/yuv.c49
13 files changed, 237 insertions, 195 deletions
diff --git a/src/libxinevdec/cinepak.c b/src/libxinevdec/cinepak.c
index 089506dc2..58b006659 100644
--- a/src/libxinevdec/cinepak.c
+++ b/src/libxinevdec/cinepak.c
@@ -22,17 +22,17 @@
* based on overview of Cinepak algorithm and example decoder
* by Tim Ferguson: http://www.csse.monash.edu.au/~timf/
*
- * $Id: cinepak.c,v 1.11 2002/07/18 20:08:00 esnel Exp $
+ * $Id: cinepak.c,v 1.12 2002/09/04 23:31:11 guenter Exp $
*/
#include <stdlib.h>
#include <unistd.h>
+#include "xine_internal.h"
#include "video_out.h"
#include "buffer.h"
#include "bswap.h"
#include "xineutils.h"
-#include "xine_internal.h"
#define MAX_STRIPS 32
#define VIDEOBUFSIZE 128 * 1024
@@ -291,10 +291,6 @@ static void cinepak_decode_frame (cvid_decoder_t *this, uint8_t *data, int size)
}
}
-static int cvid_can_handle (video_decoder_t *this_gen, int buf_type) {
- return ((buf_type & 0xFFFF0000) == BUF_VIDEO_CINEPAK);
-}
-
static void cvid_init (video_decoder_t *this_gen, vo_instance_t *video_out) {
cvid_decoder_t *this = (cvid_decoder_t *) this_gen;
@@ -353,8 +349,8 @@ static void cvid_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
img = this->video_out->get_frame (this->video_out,
this->biWidth, this->biHeight,
- XINE_ASPECT_RATIO_SQUARE,
- IMGFMT_YV12, VO_BOTH_FIELDS);
+ XINE_VO_ASPECT_SQUARE,
+ XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -444,23 +440,13 @@ static void cvid_dispose (video_decoder_t *this_gen) {
free (this_gen);
}
-video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
+void *init_video_decoder_plugin (xine_t *xine, void *data) {
cvid_decoder_t *this ;
- if (iface_version != 10) {
- printf(_("cinepak: plugin doesn't support plugin API version %d.\n"
- "cinepak: this means there's a version mismatch between xine and this "
- "cinepak: decoder plugin.\nInstalling current plugins should help.\n"),
- iface_version);
- return NULL;
- }
-
this = (cvid_decoder_t *) malloc (sizeof (cvid_decoder_t));
memset(this, 0, sizeof (cvid_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = cvid_can_handle;
this->video_decoder.init = cvid_init;
this->video_decoder.decode_data = cvid_decode_data;
this->video_decoder.flush = cvid_flush;
@@ -472,3 +458,23 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
return (video_decoder_t *) this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+static uint32_t video_types[] = {
+ BUF_VIDEO_CINEPAK,
+ 0
+ };
+
+static decoder_info_t dec_info_video = {
+ video_types, /* supported types */
+ 5 /* priority */
+};
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_VIDEO_DECODER, 10, "cinepak", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/libxinevdec/cyuv.c b/src/libxinevdec/cyuv.c
index 6bbf39687..79dbdf27f 100644
--- a/src/libxinevdec/cyuv.c
+++ b/src/libxinevdec/cyuv.c
@@ -18,7 +18,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: cyuv.c,v 1.5 2002/07/15 21:42:34 esnel Exp $
+ * $Id: cyuv.c,v 1.6 2002/09/04 23:31:11 guenter Exp $
*/
/* And this is the header that came with the CYUV decoder: */
@@ -50,9 +50,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"
#define VIDEOBUFSIZE 128*1024
@@ -70,10 +70,6 @@ typedef struct cyuv_decoder_s {
int height;
} cyuv_decoder_t;
-static int cyuv_can_handle (video_decoder_t *this_gen, int buf_type) {
- return (buf_type == BUF_VIDEO_CYUV);
-}
-
static void cyuv_init (video_decoder_t *this_gen, vo_instance_t *video_out) {
cyuv_decoder_t *this = (cyuv_decoder_t *) this_gen;
@@ -185,7 +181,7 @@ static void cyuv_decode_data (video_decoder_t *this_gen,
if (buf->decoder_flags & BUF_FLAG_FRAME_END) { /* time to decode a frame */
img = this->video_out->get_frame (this->video_out, this->width,
- this->height, XINE_ASPECT_RATIO_SQUARE, IMGFMT_YUY2,
+ this->height, XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YUY2,
VO_BOTH_FIELDS);
img->pts = buf->pts;
@@ -236,22 +232,12 @@ static void cyuv_dispose (video_decoder_t *this_gen) {
free (this_gen);
}
-video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
+void *init_video_decoder_plugin (xine_t *xine, void *data) {
cyuv_decoder_t *this ;
- if (iface_version != 10) {
- printf( "CYUV: plugin doesn't support plugin API version %d.\n"
- "CYUV: this means there's a version mismatch between xine and this "
- "CYUV: decoder plugin.\nInstalling current plugins should help.\n",
- iface_version);
- return NULL;
- }
-
this = (cyuv_decoder_t *) malloc (sizeof (cyuv_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = cyuv_can_handle;
this->video_decoder.init = cyuv_init;
this->video_decoder.decode_data = cyuv_decode_data;
this->video_decoder.flush = cyuv_flush;
@@ -261,5 +247,25 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this->video_decoder.dispose = cyuv_dispose;
this->video_decoder.priority = 1;
- return (video_decoder_t *) this;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+static uint32_t video_types[] = {
+ BUF_VIDEO_CYUV,
+ 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, "cyuv", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
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 }
+};
+
diff --git a/src/libxinevdec/idcinvideo.c b/src/libxinevdec/idcinvideo.c
index dde1c8562..0147589d1 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.2 2002/08/28 03:37:17 tmmm Exp $
+ * $Id: idcinvideo.c,v 1.3 2002/09/04 23:31:11 guenter Exp $
*/
#include <stdio.h>
@@ -30,9 +30,9 @@
#include <sys/types.h>
#include <unistd.h>
-#include "video_out.h"
#include "buffer.h"
#include "xine_internal.h"
+#include "video_out.h"
#include "xineutils.h"
#include "bswap.h"
@@ -300,7 +300,7 @@ static void idcinvideo_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);
+ 42, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -402,8 +402,6 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this = (idcinvideo_decoder_t *) malloc (sizeof (idcinvideo_decoder_t));
memset(this, 0, sizeof (idcinvideo_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = idcinvideo_can_handle;
this->video_decoder.init = idcinvideo_init;
this->video_decoder.decode_data = idcinvideo_decode_data;
this->video_decoder.flush = idcinvideo_flush;
diff --git a/src/libxinevdec/msrle.c b/src/libxinevdec/msrle.c
index 0d748c580..006c1d57f 100644
--- a/src/libxinevdec/msrle.c
+++ b/src/libxinevdec/msrle.c
@@ -21,7 +21,7 @@
* For more information on the MS RLE format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: msrle.c,v 1.4 2002/08/28 03:37:17 tmmm Exp $
+ * $Id: msrle.c,v 1.5 2002/09/04 23:31:11 guenter Exp $
*/
#include <stdio.h>
@@ -30,9 +30,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"
@@ -165,12 +165,6 @@ void decode_msrle8(msrle_decoder_t *this) {
* xine video plugin functions
*************************************************************************/
-static int msrle_can_handle (video_decoder_t *this_gen, int buf_type) {
-
- return (buf_type == BUF_VIDEO_MSRLE);
-
-}
-
/*
* This function is responsible is called to initialize the video decoder
* for use. Initialization usually involves setting up the fields in your
@@ -259,7 +253,7 @@ static void msrle_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;
@@ -346,23 +340,13 @@ static void msrle_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) {
msrle_decoder_t *this ;
- if (iface_version != 10) {
- printf( "msrle: plugin doesn't support plugin API version %d.\n"
- "msrle: this means there's a version mismatch between xine and this "
- "msrle: decoder plugin.\nInstalling current plugins should help.\n",
- iface_version);
- return NULL;
- }
-
this = (msrle_decoder_t *) malloc (sizeof (msrle_decoder_t));
memset(this, 0, sizeof (msrle_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = msrle_can_handle;
this->video_decoder.init = msrle_init;
this->video_decoder.decode_data = msrle_decode_data;
this->video_decoder.flush = msrle_flush;
@@ -372,6 +356,25 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this->video_decoder.dispose = msrle_dispose;
this->video_decoder.priority = 1;
- return (video_decoder_t *) this;
+ return this;
}
+/*
+ * exported plugin catalog entry
+ */
+
+static uint32_t video_types[] = {
+ BUF_VIDEO_MSRLE,
+ 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, "msrle", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/libxinevdec/msvc.c b/src/libxinevdec/msvc.c
index 983d64f32..fe95de7c5 100644
--- a/src/libxinevdec/msvc.c
+++ b/src/libxinevdec/msvc.c
@@ -22,17 +22,17 @@
* based on overview of Microsoft Video-1 algorithm
* by Mike Melanson: http://www.pcisys.net/~melanson/codecs/video1.txt
*
- * $Id: msvc.c,v 1.8 2002/07/15 21:42:34 esnel Exp $
+ * $Id: msvc.c,v 1.9 2002/09/04 23:31:11 guenter Exp $
*/
#include <stdlib.h>
#include <unistd.h>
+#include "xine_internal.h"
#include "video_out.h"
#include "buffer.h"
#include "bswap.h"
#include "xineutils.h"
-#include "xine_internal.h"
#define VIDEOBUFSIZE 128 * 1024
@@ -189,10 +189,6 @@ static void cram_decode_frame (msvc_decoder_t *this, uint8_t *data, int size) {
}
}
-static int msvc_can_handle (video_decoder_t *this_gen, int buf_type) {
- return ((buf_type & 0xFFFF0000) == BUF_VIDEO_MSVC);
-}
-
static void msvc_init (video_decoder_t *this_gen, vo_instance_t *video_out) {
msvc_decoder_t *this = (msvc_decoder_t *) this_gen;
@@ -271,7 +267,7 @@ static void msvc_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
img = this->video_out->get_frame (this->video_out,
this->biWidth, this->biHeight,
- 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;
@@ -349,23 +345,13 @@ static void msvc_dispose (video_decoder_t *this_gen) {
free (this_gen);
}
-video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
+void *init_video_decoder_plugin (xine_t *xine, void *data) {
msvc_decoder_t *this ;
- if (iface_version != 10) {
- printf( "msvc: plugin doesn't support plugin API version %d.\n"
- "msvc: this means there's a version mismatch between xine and this "
- "msvc: decoder plugin.\nInstalling current plugins should help.\n",
- iface_version);
- return NULL;
- }
-
this = (msvc_decoder_t *) malloc (sizeof (msvc_decoder_t));
memset(this, 0, sizeof (msvc_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = msvc_can_handle;
this->video_decoder.init = msvc_init;
this->video_decoder.decode_data = msvc_decode_data;
this->video_decoder.flush = msvc_flush;
@@ -375,5 +361,25 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this->video_decoder.dispose = msvc_dispose;
this->video_decoder.priority = 5;
- return (video_decoder_t *) this;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+static uint32_t video_types[] = {
+ BUF_VIDEO_MSVC,
+ 0
+ };
+
+static decoder_info_t dec_info_video = {
+ video_types, /* supported types */
+ 5 /* priority */
+};
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_VIDEO_DECODER, 10, "msvc", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/libxinevdec/qtrpza.c b/src/libxinevdec/qtrpza.c
index c79d32e0f..6b6f2dfa1 100644
--- a/src/libxinevdec/qtrpza.c
+++ b/src/libxinevdec/qtrpza.c
@@ -21,7 +21,7 @@
* For more information about the RPZA format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: qtrpza.c,v 1.1 2002/09/01 01:50:39 tmmm Exp $
+ * $Id: qtrpza.c,v 1.2 2002/09/04 23:31:11 guenter Exp $
*/
#include <stdio.h>
@@ -30,9 +30,9 @@
#include <sys/types.h>
#include <unistd.h>
-#include "video_out.h"
#include "buffer.h"
#include "xine_internal.h"
+#include "video_out.h"
#include "xineutils.h"
#include "bswap.h"
@@ -366,7 +366,7 @@ static void qtrpza_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);
+ 42, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -460,8 +460,6 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this = (qtrpza_decoder_t *) malloc (sizeof (qtrpza_decoder_t));
memset(this, 0, sizeof (qtrpza_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = qtrpza_can_handle;
this->video_decoder.init = qtrpza_init;
this->video_decoder.decode_data = qtrpza_decode_data;
this->video_decoder.flush = qtrpza_flush;
diff --git a/src/libxinevdec/qtsmc.c b/src/libxinevdec/qtsmc.c
index ff9518191..75c110fe4 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.1 2002/08/29 06:09:06 tmmm Exp $
+ * $Id: qtsmc.c,v 1.2 2002/09/04 23:31:11 guenter Exp $
*/
#include <stdio.h>
@@ -32,9 +32,9 @@
#include <sys/types.h>
#include <unistd.h>
-#include "video_out.h"
#include "buffer.h"
#include "xine_internal.h"
+#include "video_out.h"
#include "xineutils.h"
#include "bswap.h"
@@ -598,7 +598,7 @@ static void qtsmc_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);
+ 42, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -692,8 +692,6 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this = (qtsmc_decoder_t *) malloc (sizeof (qtsmc_decoder_t));
memset(this, 0, sizeof (qtsmc_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = qtsmc_can_handle;
this->video_decoder.init = qtsmc_init;
this->video_decoder.decode_data = qtsmc_decode_data;
this->video_decoder.flush = qtsmc_flush;
diff --git a/src/libxinevdec/rgb.c b/src/libxinevdec/rgb.c
index 7b01fcbb7..812afdaa3 100644
--- a/src/libxinevdec/rgb.c
+++ b/src/libxinevdec/rgb.c
@@ -21,7 +21,7 @@
* Actually, this decoder just converts a raw RGB image to a YUY2 map
* suitable for display under xine.
*
- * $Id: rgb.c,v 1.4 2002/08/28 03:37:17 tmmm Exp $
+ * $Id: rgb.c,v 1.5 2002/09/04 23:31:11 guenter Exp $
*/
#include <stdio.h>
@@ -30,9 +30,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"
@@ -63,11 +63,6 @@ typedef struct rgb_decoder_s {
} rgb_decoder_t;
-static int rgb_can_handle (video_decoder_t *this_gen, int buf_type) {
-
- return (buf_type == BUF_VIDEO_RGB);
-}
-
static void rgb_init (video_decoder_t *this_gen,
vo_instance_t *video_out) {
rgb_decoder_t *this = (rgb_decoder_t *) this_gen;
@@ -154,7 +149,7 @@ static void rgb_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;
@@ -280,23 +275,13 @@ static void rgb_dispose (video_decoder_t *this_gen) {
free (this_gen);
}
-video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
+void *init_video_decoder_plugin (xine_t *xine, void *data) {
rgb_decoder_t *this ;
- if (iface_version != 10) {
- printf( "rgb: plugin doesn't support plugin API version %d.\n"
- "rgb: this means there's a version mismatch between xine and this "
- "rgb: decoder plugin.\nInstalling current plugins should help.\n",
- iface_version);
- return NULL;
- }
-
this = (rgb_decoder_t *) malloc (sizeof (rgb_decoder_t));
memset(this, 0, sizeof (rgb_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = rgb_can_handle;
this->video_decoder.init = rgb_init;
this->video_decoder.decode_data = rgb_decode_data;
this->video_decoder.flush = rgb_flush;
@@ -306,6 +291,25 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this->video_decoder.dispose = rgb_dispose;
this->video_decoder.priority = 1;
- return (video_decoder_t *) this;
+ return this;
}
+/*
+ * exported plugin catalog entry
+ */
+
+static uint32_t video_types[] = {
+ BUF_VIDEO_RGB,
+ 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, "rgb", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/libxinevdec/roqvideo.c b/src/libxinevdec/roqvideo.c
index bcee1a2b7..95c4d3809 100644
--- a/src/libxinevdec/roqvideo.c
+++ b/src/libxinevdec/roqvideo.c
@@ -18,7 +18,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: roqvideo.c,v 1.6 2002/07/15 21:42:34 esnel Exp $
+ * $Id: roqvideo.c,v 1.7 2002/09/04 23:31:11 guenter Exp $
*/
/* And this is the header that came with the RoQ video decoder: */
@@ -50,9 +50,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"
#define VIDEOBUFSIZE 128*1024
@@ -428,7 +428,7 @@ static void roq_decode_data (video_decoder_t *this_gen,
if (buf->decoder_flags & BUF_FLAG_FRAME_END) { /* time to decode a frame */
img = this->video_out->get_frame (this->video_out, this->width,
- this->height, XINE_ASPECT_RATIO_SQUARE, IMGFMT_YV12,
+ this->height, XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YV12,
VO_BOTH_FIELDS);
img->pts = buf->pts;
@@ -489,22 +489,12 @@ static void roq_dispose (video_decoder_t *this_gen) {
free (this_gen);
}
-video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
+void *init_video_decoder_plugin (xine_t *xine, void *data) {
roq_decoder_t *this ;
- if (iface_version != 10) {
- printf(_("RoQ: plugin doesn't support plugin API version %d.\n"
- "RoQ: this means there's a version mismatch between xine and this "
- "RoQ: decoder plugin.\nInstalling current plugins should help.\n"),
- iface_version);
- return NULL;
- }
-
this = (roq_decoder_t *) malloc (sizeof (roq_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = roq_can_handle;
this->video_decoder.init = roq_init;
this->video_decoder.decode_data = roq_decode_data;
this->video_decoder.flush = roq_flush;
@@ -514,5 +504,25 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this->video_decoder.dispose = roq_dispose;
this->video_decoder.priority = 1;
- return (video_decoder_t *) this;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+static uint32_t video_types[] = {
+ BUF_VIDEO_ROQ,
+ 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, "roq", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/libxinevdec/svq1.c b/src/libxinevdec/svq1.c
index c0353e70b..8e44612ba 100644
--- a/src/libxinevdec/svq1.c
+++ b/src/libxinevdec/svq1.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: svq1.c,v 1.6 2002/07/18 22:58:54 esnel Exp $
+ * $Id: svq1.c,v 1.7 2002/09/04 23:31:11 guenter Exp $
*/
#include <stdio.h>
@@ -25,11 +25,11 @@
#include <string.h>
#include <unistd.h>
+#include "xine_internal.h"
#include "video_out.h"
#include "buffer.h"
#include "bswap.h"
#include "xineutils.h"
-#include "xine_internal.h"
#include "svq1_codebooks.h"
@@ -1366,10 +1366,6 @@ static void svq1_copy_frame (svq1_t *svq1, uint8_t *base[3], int pitches[3]) {
}
}
-static int svq1dec_can_handle (video_decoder_t *this_gen, int buf_type) {
- return ((buf_type & 0xFFFF0000) == BUF_VIDEO_SORENSON_V1);
-}
-
static void svq1dec_init (video_decoder_t *this_gen, vo_instance_t *video_out) {
svq1dec_decoder_t *this = (svq1dec_decoder_t *) this_gen;
@@ -1422,7 +1418,7 @@ static void svq1dec_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
img = this->video_out->get_frame (this->video_out,
this->svq1->width,
this->svq1->height,
- 42, IMGFMT_YV12, VO_BOTH_FIELDS);
+ XINE_VO_ASPECT_DONT_TOUCH, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -1500,22 +1496,12 @@ static void svq1dec_dispose (video_decoder_t *this_gen) {
free (this_gen);
}
-video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
+void *init_video_decoder_plugin (xine_t *xine, void *data) {
svq1dec_decoder_t *this ;
- if (iface_version != 10) {
- printf( "svq1: plugin doesn't support plugin API version %d.\n"
- "svq1: this means there's a version mismatch between xine and this "
- "svq1: decoder plugin.\nInstalling current plugins should help.\n",
- iface_version);
- return NULL;
- }
-
this = (svq1dec_decoder_t *) xine_xmalloc (sizeof (svq1dec_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = svq1dec_can_handle;
this->video_decoder.init = svq1dec_init;
this->video_decoder.decode_data = svq1dec_decode_data;
this->video_decoder.flush = svq1dec_flush;
@@ -1525,5 +1511,25 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this->video_decoder.dispose = svq1dec_dispose;
this->video_decoder.priority = 4;
- return (video_decoder_t *) this;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+static uint32_t video_types[] = {
+ BUF_VIDEO_SORENSON_V1,
+ 0
+ };
+
+static decoder_info_t dec_info_video = {
+ video_types, /* supported types */
+ 4 /* priority */
+};
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_VIDEO_DECODER, 10, "svq1", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/libxinevdec/wc3video.c b/src/libxinevdec/wc3video.c
index 0fe835b7e..43ae0a873 100644
--- a/src/libxinevdec/wc3video.c
+++ b/src/libxinevdec/wc3video.c
@@ -22,7 +22,7 @@
* For more information on the WC3 Movie format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: wc3video.c,v 1.1 2002/09/04 02:52:16 tmmm Exp $
+ * $Id: wc3video.c,v 1.2 2002/09/04 23:31:11 guenter Exp $
*/
#include <stdio.h>
@@ -31,9 +31,9 @@
#include <sys/types.h>
#include <unistd.h>
-#include "video_out.h"
#include "buffer.h"
#include "xine_internal.h"
+#include "video_out.h"
#include "xineutils.h"
#include "bswap.h"
@@ -433,7 +433,7 @@ static void wc3video_decode_data (video_decoder_t *this_gen,
img = this->video_out->get_frame (this->video_out,
WC3_WIDTH, WC3_HEIGHT,
- 42, IMGFMT_YUY2, VO_BOTH_FIELDS);
+ 42, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -545,8 +545,6 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this = (wc3video_decoder_t *) malloc (sizeof (wc3video_decoder_t));
memset(this, 0, sizeof (wc3video_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = wc3video_can_handle;
this->video_decoder.init = wc3video_init;
this->video_decoder.decode_data = wc3video_decode_data;
this->video_decoder.flush = wc3video_flush;
diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c
index 9ee9ad678..618e4d849 100644
--- a/src/libxinevdec/yuv.c
+++ b/src/libxinevdec/yuv.c
@@ -21,7 +21,7 @@
* Actually, this decoder just reorganizes chunks of raw YUV data in such
* a way that xine can display them.
*
- * $Id: yuv.c,v 1.3 2002/08/28 14:03:30 miguelfreitas Exp $
+ * $Id: yuv.c,v 1.4 2002/09/04 23:31:11 guenter Exp $
*/
#include <stdio.h>
@@ -30,9 +30,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"
@@ -60,12 +60,6 @@ typedef struct yuv_decoder_s {
* xine video plugin functions
*************************************************************************/
-static int yuv_can_handle (video_decoder_t *this_gen, int buf_type) {
-
- return (buf_type == BUF_VIDEO_YVU9 ||
- buf_type == BUF_VIDEO_GREY);
-}
-
/*
* This function is responsible is called to initialize the video decoder
* for use. Initialization usually involves setting up the fields in your
@@ -145,7 +139,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
img = this->video_out->get_frame (this->video_out,
this->width, this->height,
- 42, IMGFMT_YV12, VO_BOTH_FIELDS);
+ XINE_VO_ASPECT_DONT_TOUCH, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
xine_fast_memcpy(img->base[0], this->buf, this->width * this->height);
@@ -188,7 +182,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
img = this->video_out->get_frame (this->video_out,
this->width, this->height,
- 42, IMGFMT_YV12, VO_BOTH_FIELDS);
+ 42, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
xine_fast_memcpy(img->base[0], this->buf, this->width * this->height);
memset( img->base[1], 0x80, this->width * this->height / 4 );
@@ -199,7 +193,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
/* just allocate something to avoid compiler warnings */
img = this->video_out->get_frame (this->video_out,
this->width, this->height,
- 42, IMGFMT_YV12, VO_BOTH_FIELDS);
+ XINE_VO_ASPECT_DONT_TOUCH, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
}
@@ -289,23 +283,13 @@ static void yuv_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) {
yuv_decoder_t *this ;
- if (iface_version != 10) {
- printf( "yuv: plugin doesn't support plugin API version %d.\n"
- "yuv: this means there's a version mismatch between xine and this "
- "yuv: decoder plugin.\nInstalling current plugins should help.\n",
- iface_version);
- return NULL;
- }
-
this = (yuv_decoder_t *) malloc (sizeof (yuv_decoder_t));
memset(this, 0, sizeof (yuv_decoder_t));
- this->video_decoder.interface_version = iface_version;
- this->video_decoder.can_handle = yuv_can_handle;
this->video_decoder.init = yuv_init;
this->video_decoder.decode_data = yuv_decode_data;
this->video_decoder.flush = yuv_flush;
@@ -315,6 +299,25 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this->video_decoder.dispose = yuv_dispose;
this->video_decoder.priority = 1;
- return (video_decoder_t *) this;
+ return this;
}
+/*
+ * exported plugin catalog entry
+ */
+
+static uint32_t video_types[] = {
+ BUF_VIDEO_YVU9,
+ 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, "yuv", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};