rendered paste bodydiff -u /usr/local/src/eHD/xine-hde.orig/hde_xine_ad.c /usr/local/src/eHD/xine-hde/hde_xine_ad.c
--- /usr/local/src/eHD/xine-hde.orig/hde_xine_ad.c 2009-08-03 10:29:30.000000000 +0200
+++ /usr/local/src/eHD/xine-hde/hde_xine_ad.c 2009-08-03 08:41:23.000000000 +0200
@@ -376,7 +376,7 @@
return NULL;
hde_decoder_class_t *class = ( hde_decoder_class_t * ) class_gen;
if(class->instance) return NULL;
- hde_decoder_t *this = ( hde_decoder_t * ) xine_xmalloc ( sizeof ( hde_decoder_t ) );
+ hde_decoder_t *this = ( hde_decoder_t * ) xine_xcalloc ( sizeof ( hde_decoder_t ),1 );
if ( !this ) return NULL;
this->audio_decoder.decode_data = hde_decode_data;
this->audio_decoder.reset = hde_reset;
@@ -413,11 +413,11 @@
if (!hde_io_use_audio())
return NULL;
hde_decoder_class_t *this;
- this = ( hde_decoder_class_t * ) xine_xmalloc ( sizeof ( hde_decoder_class_t ) );
+ this = ( hde_decoder_class_t * ) xine_xcalloc ( sizeof ( hde_decoder_class_t ),1 );
if ( !this ) return NULL;
this->audio_decoder_class.open_plugin = hde_open_plugin;
- this->audio_decoder_class.get_identifier = hde_get_identifier;
- this->audio_decoder_class.get_description = hde_get_description;
+ this->audio_decoder_class.identifier = hde_get_identifier(&this -> audio_decoder_class);
+ this->audio_decoder_class.description = hde_get_description(&this -> audio_decoder_class);
this->audio_decoder_class.dispose = hde_class_dispose;
this->xine = xine;
this->instance = 0;
@@ -546,11 +546,11 @@
if (!hde_io_use_audio())
return NULL;
audio_decoder_class_t *this;
- this = ( audio_decoder_class_t * ) xine_xmalloc ( sizeof ( audio_decoder_class_t ) );
+ this = ( audio_decoder_class_t * ) xine_xcalloc ( sizeof ( audio_decoder_class_t ),1 );
if ( !this ) return NULL;
this->open_plugin = hde_hook_open_plugin;
- this->get_identifier = hde_hook_get_identifier;
- this->get_description = hde_hook_get_description;
+ this->identifier = hde_hook_get_identifier(this);
+ this->description = hde_hook_get_description(this);
this->dispose = hde_hook_class_dispose;
return this;
} // hde_ad_hook_init
diff -u /usr/local/src/eHD/xine-hde.orig/hde_xine_audio.c /usr/local/src/eHD/xine-hde/hde_xine_audio.c
--- /usr/local/src/eHD/xine-hde.orig/hde_xine_audio.c 2009-08-03 10:29:30.000000000 +0200
+++ /usr/local/src/eHD/xine-hde/hde_xine_audio.c 2009-08-03 10:14:56.000000000 +0200
@@ -198,7 +198,7 @@
llprintf ( LOG_FUNC, "hde_ao_open_plugin\n" );
hde_driver_class_t *class = ( hde_driver_class_t * ) class_gen;
if(class->instance) return NULL;
- hde_driver_t *this = ( hde_driver_t * ) xine_xmalloc ( sizeof ( hde_driver_t ) );
+ hde_driver_t *this = ( hde_driver_t * ) xine_xcalloc ( sizeof ( hde_driver_t ),1 );
if ( !this ) return NULL;
this->ao_driver.get_capabilities = hde_get_capabilities;
this->ao_driver.get_property = hde_get_property;
@@ -243,12 +243,12 @@
void *hde_audio_init(xine_t *xine, void *visual_gen) {
llprintf ( LOG_FUNC, "hde_audio_init\n" );
hde_driver_class_t *this;
- this = ( hde_driver_class_t * ) xine_xmalloc ( sizeof ( hde_driver_class_t ) );
+ this = ( hde_driver_class_t * ) xine_xcalloc ( sizeof ( hde_driver_class_t ),1 );
if ( !this ) return NULL;
// this->devnum = xine->config->register_num ( xine->config, CONF_KEY, 0, CONF_NAME, CONF_HELP, 10, NULL, NULL );
this->audio_driver_class.open_plugin = hde_ao_open_plugin;
- this->audio_driver_class.get_identifier = hde_ao_get_identifier;
- this->audio_driver_class.get_description = hde_ao_get_description;
+ this->audio_driver_class.identifier = hde_ao_get_identifier(&this -> audio_driver_class);
+ this->audio_driver_class.description = hde_ao_get_description(&this -> audio_driver_class);
this->audio_driver_class.dispose = hde_ao_class_dispose;
this->xine = xine;
this->instance = 0;
diff -u /usr/local/src/eHD/xine-hde.orig/hde_xine_scr.c /usr/local/src/eHD/xine-hde/hde_xine_scr.c
--- /usr/local/src/eHD/xine-hde.orig/hde_xine_scr.c 2009-08-03 10:29:30.000000000 +0200
+++ /usr/local/src/eHD/xine-hde/hde_xine_scr.c 2009-08-03 10:14:56.000000000 +0200
@@ -100,7 +100,7 @@
hde_scr_t *hde_scr_init(xine_t *xine) {
llprintf ( LOG_FUNC, "hde_scr_init\n" );
- hde_scr_t *this = ( hde_scr_t * ) xine_xmalloc ( sizeof ( hde_scr_t ) );
+ hde_scr_t *this = ( hde_scr_t * ) xine_xcalloc ( sizeof ( hde_scr_t ),1 );
if ( !this ) return NULL;
this->scr_plugin.interface_version = 3; // see xine-engine/metronom.c
this->scr_plugin.get_priority = hde_get_priority;
diff -u /usr/local/src/eHD/xine-hde.orig/hde_xine_vd.c /usr/local/src/eHD/xine-hde/hde_xine_vd.c
--- /usr/local/src/eHD/xine-hde.orig/hde_xine_vd.c 2009-08-03 10:29:30.000000000 +0200
+++ /usr/local/src/eHD/xine-hde/hde_xine_vd.c 2009-08-03 08:41:23.000000000 +0200
@@ -443,7 +443,7 @@
hde_decoder_t *this;
hde_decoder_class_t *class = ( hde_decoder_class_t * ) class_gen;
if ( class->instance ) return NULL;
- this = ( hde_decoder_t * ) xine_xmalloc ( sizeof ( hde_decoder_t ) );
+ this = ( hde_decoder_t * ) xine_xcalloc ( sizeof ( hde_decoder_t ),1 );
if ( !this ) return NULL;
this->video_decoder.decode_data = hde_decode_data;
this->video_decoder.reset = hde_reset;
@@ -483,11 +483,11 @@
if ( !hde_io_use_video())
return NULL;
hde_decoder_class_t *this;
- this = ( hde_decoder_class_t * ) xine_xmalloc ( sizeof ( hde_decoder_class_t ) );
+ this = ( hde_decoder_class_t * ) xine_xcalloc ( sizeof ( hde_decoder_class_t ),1 );
if ( !this ) return NULL;
this->video_decoder_class.open_plugin = hde_open_plugin;
- this->video_decoder_class.get_identifier = hde_get_identifier;
- this->video_decoder_class.get_description = hde_get_description;
+ this->video_decoder_class.identifier = hde_get_identifier(&this -> video_decoder_class);
+ this->video_decoder_class.description = hde_get_description(&this -> video_decoder_class);
this->video_decoder_class.dispose = hde_class_dispose;
this->xine = xine;
this->instance = 0;
diff -u /usr/local/src/eHD/xine-hde.orig/hde_xine_video.c /usr/local/src/eHD/xine-hde/hde_xine_video.c
--- /usr/local/src/eHD/xine-hde.orig/hde_xine_video.c 2009-08-03 10:29:30.000000000 +0200
+++ /usr/local/src/eHD/xine-hde/hde_xine_video.c 2009-08-03 10:14:56.000000000 +0200
@@ -119,7 +119,7 @@
llprintf ( LOG_FUNC, "hde_alloc_frame\n" );
hde_frame_t *frame;
//hde_driver_t *this = (hde_driver_t *)this_gen;
- frame = ( hde_frame_t * ) xine_xmalloc ( sizeof ( hde_frame_t ) );
+ frame = ( hde_frame_t * ) xine_xcalloc ( sizeof ( hde_frame_t ),1 );
pthread_mutex_init ( &frame->vo_frame.mutex, NULL );
frame->vo_frame.proc_frame = hde_frame_proc_frame;
frame->vo_frame.proc_slice = hde_frame_proc_slice;
@@ -146,15 +146,15 @@
frame->vo_frame.ratio = ratio;
if(format == XINE_IMGFMT_YUY2) {
frame->vo_frame.pitches[0] = 32 * ((width+15)/16);
- frame->vo_frame.base[0] = xine_xmalloc(frame->vo_frame.pitches[0]*height);
+ frame->vo_frame.base[0] = xine_xcalloc(frame->vo_frame.pitches[0]*height,1);
frame->vo_frame.base[1] = frame->vo_frame.base[2] = 0;
} else if (format == XINE_IMGFMT_YV12) {
frame->vo_frame.pitches[0] = 16 * ((width+15)/16);
frame->vo_frame.pitches[1] = 8 * ((width+15)/16);
frame->vo_frame.pitches[2] = 8 * ((width+15)/16);
- frame->vo_frame.base[0] = xine_xmalloc(frame->vo_frame.pitches[0]*height);
- frame->vo_frame.base[1] = xine_xmalloc(frame->vo_frame.pitches[1]*height);
- frame->vo_frame.base[2] = xine_xmalloc(frame->vo_frame.pitches[2]*height);
+ frame->vo_frame.base[0] = xine_xcalloc(frame->vo_frame.pitches[0]*height,1);
+ frame->vo_frame.base[1] = xine_xcalloc(frame->vo_frame.pitches[1]*height,1);
+ frame->vo_frame.base[2] = xine_xcalloc(frame->vo_frame.pitches[2]*height,1);
} // if
} // if
} // hde_update_frame_format
@@ -269,7 +269,7 @@
hde_driver_t *this;
hde_driver_class_t *class = ( hde_driver_class_t * ) class_gen;
if (class->instance) return NULL;
- this = ( hde_driver_t * ) xine_xmalloc ( sizeof ( hde_driver_t ) );
+ this = ( hde_driver_t * ) xine_xcalloc ( sizeof ( hde_driver_t ),1 );
if ( !this ) return NULL;
this->vo_driver.get_capabilities = hde_get_capabilities;
this->vo_driver.alloc_frame = hde_alloc_frame;
@@ -292,10 +292,9 @@
return &this->vo_driver;
} // hde_vo_open_plugin
-static char *hde_vo_get_identifier ( video_driver_class_t *class_gen ) {
+static char *hde_vo_get_identifier ( int type ) {
llprintf ( LOG_FUNC, "hde_vo_get_identifier\n" );
- hde_driver_class_t *class = ( hde_driver_class_t * ) class_gen;
- switch(class->type) {
+ switch(type) {
case XINE_VISUAL_TYPE_X11 : return HDE_VIDEO_ID_X11;
case XINE_VISUAL_TYPE_AA : return HDE_VIDEO_ID_AA;
case XINE_VISUAL_TYPE_FB : return HDE_VIDEO_ID_FB;
@@ -303,7 +302,7 @@
return HDE_VIDEO_ID;
} // hde_vo_get_identifier
-static char *hde_vo_get_description ( video_driver_class_t *class_gen ) {
+static char *hde_vo_get_description ( void ) {
llprintf ( LOG_FUNC, "hde_vo_get_description\n" );
return HDE_VIDEO_DESCR;
} // hde_vo_get_description
@@ -319,12 +318,12 @@
void *hde_video_init ( xine_t *xine, void *visual_gen, int type) {
llprintf ( LOG_FUNC, "hde_video_init\n" );
hde_driver_class_t *this;
- this = ( hde_driver_class_t * ) xine_xmalloc ( sizeof ( hde_driver_class_t ) );
+ this = ( hde_driver_class_t * ) xine_xcalloc ( sizeof ( hde_driver_class_t ), 1 );
if ( !this ) return NULL;
//this->devnum = xine->config->register_num ( xine->config, CONF_KEY, 0, CONF_NAME, CONF_HELP, 10, NULL, NULL );
this->video_driver_class.open_plugin = hde_vo_open_plugin;
- this->video_driver_class.get_identifier = hde_vo_get_identifier;
- this->video_driver_class.get_description = hde_vo_get_description;
+ this->video_driver_class.identifier = hde_vo_get_identifier(type);
+ this->video_driver_class.description = hde_vo_get_description();
this->video_driver_class.dispose = hde_vo_class_dispose;
this->xine = xine;
this->instance = 0;
diff -u /usr/local/src/eHD/xine-hde.orig/Makefile /usr/local/src/eHD/xine-hde/Makefile
--- /usr/local/src/eHD/xine-hde.orig/Makefile 2009-08-03 10:29:30.000000000 +0200
+++ /usr/local/src/eHD/xine-hde/Makefile 2009-08-03 10:14:56.000000000 +0200
@@ -3,7 +3,7 @@
all: $(PROJ_NAME).so
TEMP_DIR = ../../../temp
-LINUX_DIR = /usr/src/linux-2.6.12-rc2-wis/include
+LINUX_DIR = /usr/src/linux/include
#LINUX_DIR = $(TEMP_DIR)/cdimage/flash/kernel-2.6.11.11/include
#XINE_DIR = $(TEMP_DIR)/docimage/libs/xine/include
XINE_DIR ?= /usr/include/xine