summaryrefslogtreecommitdiff
path: root/src/libw32dll/w32codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libw32dll/w32codec.c')
-rw-r--r--src/libw32dll/w32codec.c66
1 files changed, 19 insertions, 47 deletions
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c
index 99509372e..fb7d3a482 100644
--- a/src/libw32dll/w32codec.c
+++ b/src/libw32dll/w32codec.c
@@ -15,14 +15,11 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- * $Id: w32codec.c,v 1.155 2006/07/10 22:08:43 dgp85 Exp $
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
* routines for using w32 codecs
* DirectShow support by Miguel Freitas (Nov/2001)
* DMO support (Dez/2002)
- *
*/
#include <stdlib.h>
@@ -53,11 +50,11 @@
#define LOG
*/
-#include "xine_internal.h"
-#include "video_out.h"
-#include "audio_out.h"
-#include "buffer.h"
-#include "xineutils.h"
+#include <xine/xine_internal.h>
+#include <xine/video_out.h>
+#include <xine/audio_out.h>
+#include <xine/buffer.h>
+#include <xine/xineutils.h>
#include "common.c"
@@ -657,7 +654,7 @@ static void w32v_init_codec (w32v_decoder_t *this, int buf_type) {
this->bufsize = VIDEOBUFSIZE;
this->buf = malloc(this->bufsize);
- this->stream->video_out->open (this->stream->video_out, this->stream);
+ (this->stream->video_out->open) (this->stream->video_out, this->stream);
this->outfmt = outfmt;
this->decoder_ok = 1;
@@ -752,7 +749,7 @@ static void w32v_init_ds_dmo_codec (w32v_decoder_t *this, int buf_type) {
this->bufsize = VIDEOBUFSIZE;
this->buf = malloc(this->bufsize);
- this->stream->video_out->open (this->stream->video_out, this->stream);
+ (this->stream->video_out->open) (this->stream->video_out, this->stream);
this->outfmt = outfmt;
this->decoder_ok = 1;
@@ -1181,7 +1178,7 @@ static int w32a_init_audio (w32a_decoder_t *this,
if (this->output_open)
this->stream->audio_out->close (this->stream->audio_out, this->stream);
- this->output_open = this->stream->audio_out->open( this->stream->audio_out, this->stream,
+ this->output_open = (this->stream->audio_out->open) ( this->stream->audio_out, this->stream,
16, in_fmt->nSamplesPerSec,
_x_ao_channels2mode(in_fmt->nChannels));
if (!this->output_open) {
@@ -1571,18 +1568,6 @@ static video_decoder_t *open_video_decoder_plugin (video_decoder_class_t *class_
* video decoder class
*/
-static char *get_video_identifier (video_decoder_class_t *this) {
- return "w32v";
-}
-
-static char *get_video_description (video_decoder_class_t *this) {
- return "win32 binary video codec plugin";
-}
-
-static void dispose_video_class (video_decoder_class_t *this) {
- free (this);
-}
-
static void init_routine(void) {
pthread_mutex_init (&win32_codec_mutex, NULL);
w32v_init_rgb_ycc();
@@ -1599,9 +1584,9 @@ static void *init_video_decoder_class (xine_t *xine, void *data) {
this = (w32v_class_t *) xine_xmalloc (sizeof (w32v_class_t));
this->decoder_class.open_plugin = open_video_decoder_plugin;
- this->decoder_class.get_identifier = get_video_identifier;
- this->decoder_class.get_description = get_video_description;
- this->decoder_class.dispose = dispose_video_class;
+ this->decoder_class.identifier = "w32v";
+ this->decoder_class.description = N_("win32 binary video codec plugin");
+ this->decoder_class.dispose = default_video_decoder_class_dispose;
pthread_once (&once_control, init_routine);
@@ -1637,19 +1622,6 @@ static audio_decoder_t *open_audio_decoder_plugin (audio_decoder_class_t *class_
/*
* audio decoder plugin class
*/
-
-static char *get_identifier (audio_decoder_class_t *this) {
- return "win32 audio";
-}
-
-static char *get_description (audio_decoder_class_t *this) {
- return "win32 binary audio codec plugin";
-}
-
-static void dispose_class (audio_decoder_class_t *this) {
- free (this);
-}
-
static void *init_audio_decoder_class (xine_t *xine, void *data) {
w32a_class_t *this;
@@ -1661,9 +1633,9 @@ static void *init_audio_decoder_class (xine_t *xine, void *data) {
this = (w32a_class_t *) xine_xmalloc (sizeof (w32a_class_t));
this->decoder_class.open_plugin = open_audio_decoder_plugin;
- this->decoder_class.get_identifier = get_identifier;
- this->decoder_class.get_description = get_description;
- this->decoder_class.dispose = dispose_class;
+ this->decoder_class.identifier = "win32 audio";
+ this->decoder_class.description = N_("win32 binary audio codec plugin");
+ this->decoder_class.dispose = default_audio_decoder_class_dispose;
pthread_once (&once_control, init_routine);
@@ -1675,7 +1647,7 @@ static void *init_audio_decoder_class (xine_t *xine, void *data) {
* exported plugin catalog entry
*/
-static uint32_t video_types[] = {
+static const uint32_t video_types[] = {
BUF_VIDEO_MSMPEG4_V1, BUF_VIDEO_MSMPEG4_V2, BUF_VIDEO_MSMPEG4_V3,
BUF_VIDEO_IV50, BUF_VIDEO_IV41, BUF_VIDEO_IV32, BUF_VIDEO_IV31,
BUF_VIDEO_CINEPAK, /* BUF_VIDEO_ATIVCR1, */
@@ -1691,7 +1663,7 @@ static const decoder_info_t dec_info_video = {
1 /* priority */
};
-static uint32_t audio_types[] = {
+static const uint32_t audio_types[] = {
BUF_AUDIO_WMAV1, BUF_AUDIO_WMAV2, BUF_AUDIO_WMAV3, BUF_AUDIO_MSADPCM,
BUF_AUDIO_MSIMAADPCM, BUF_AUDIO_MSGSM, BUF_AUDIO_IMC, BUF_AUDIO_LH,
BUF_AUDIO_VOXWARE, BUF_AUDIO_ACELPNET, BUF_AUDIO_VIVOG723, BUF_AUDIO_WMAV,
@@ -1706,7 +1678,7 @@ static const decoder_info_t dec_info_audio = {
const plugin_info_t xine_plugin_info[] EXPORTED = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "win32v", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_class },
- { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 15, "win32a", XINE_VERSION_CODE, &dec_info_audio, init_audio_decoder_class },
+ { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "win32v", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_class },
+ { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "win32a", XINE_VERSION_CODE, &dec_info_audio, init_audio_decoder_class },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};