summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_stk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_out/video_out_stk.c')
-rw-r--r--src/video_out/video_out_stk.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/video_out/video_out_stk.c b/src/video_out/video_out_stk.c
index dfc4ae385..647760fd2 100644
--- a/src/video_out/video_out_stk.c
+++ b/src/video_out/video_out_stk.c
@@ -22,7 +22,7 @@
*
* based on video_out_sdl from
* Miguel Freitas
- *
+ *
* based on mpeg2dec code from
* Ryan C. Gordon <icculus@lokigames.com> and
* Dominik Schnitzer <aeneas@linuxvideo.org>
@@ -82,9 +82,9 @@ typedef struct stk_driver_s {
vo_driver_t vo_driver;
/* stk private data */
- config_values_t* config;
- surface_t* surface;
- xine_panel_t* xine_panel;
+ config_values_t* config;
+ surface_t* surface;
+ xine_panel_t* xine_panel;
uint8_t bpp; /* do we need this ? */
pthread_mutex_t mutex;
uint32_t capabilities;
@@ -133,7 +133,7 @@ static vo_frame_t *stk_alloc_frame(vo_driver_t *this_gen) {
stk_frame_t* frame;
//printf("video_out_stk: alloc_frame()\n");
- frame = (stk_frame_t *) xine_xmalloc(sizeof(stk_frame_t));
+ frame = calloc(1, sizeof(stk_frame_t));
if (!frame)
return NULL;
@@ -171,25 +171,25 @@ static void stk_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_ge
//printf("video_out_stk: update_frame_format()\n");
if ((frame->width != width) || (frame->height != height) || (frame->format != format)) {
- lprintf("update_frame_format - %d=%d, %d=%d, %d=%d\n",
+ lprintf("update_frame_format - %d=%d, %d=%d, %d=%d\n",
frame->width, width, frame->height, height, frame->format, format);
- lprintf("vo_frame data - width, height, format: %d, %d, %d\n",
+ lprintf("vo_frame data - width, height, format: %d, %d, %d\n",
frame->vo_frame.width, frame->vo_frame.height, frame->vo_frame.format);
-
+
/* (re-) allocate image */
if (frame->overlay) {
- stk_overlay_free(frame->overlay);
+ stk_overlay_free(frame->overlay);
frame->overlay = NULL;
}
if (format == XINE_IMGFMT_YV12) {
lprintf ("format YV12\n");
- frame->overlay = stk_surface_create_overlay(this->surface, width, height,
+ frame->overlay = stk_surface_create_overlay(this->surface, width, height,
STK_FORMAT_YV12);
} else if (format == XINE_IMGFMT_YUY2) {
lprintf("format YUY2\n");
- frame->overlay = stk_surface_create_overlay(this->surface, width, height,
+ frame->overlay = stk_surface_create_overlay(this->surface, width, height,
STK_FORMAT_YUY2);
}
@@ -197,7 +197,7 @@ static void stk_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_ge
return;
/* From the SDL driver:
- * This needs to be done becuase I have found that
+ * This needs to be done becuase I have found that
* pixels isn't setup until this is called.
*/
stk_overlay_lock(frame->overlay);
@@ -224,7 +224,7 @@ static void stk_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_
stk_driver_t* this = (stk_driver_t*)this_gen;
stk_frame_t* frame = (stk_frame_t*)frame_gen;
//printf("video_out_stk: overlay_blend()\n");
-
+
this->alphablend_extra_data.offset_x = frame_gen->overlay_offset_x;
this->alphablend_extra_data.offset_y = frame_gen->overlay_offset_y;
@@ -238,7 +238,7 @@ static void stk_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_
}
static void stk_check_events (stk_driver_t* this) {
- /* SDL checks for a resize, our video panels aren't resizeable... */
+ /* SDL checks for a resize, our video panels aren't resizeable... */
//printf("video_out_stk: check_events()\n");
}
@@ -247,7 +247,7 @@ static int stk_redraw_needed (vo_driver_t* this_gen) {
stk_driver_t* this = (stk_driver_t*)this_gen;
int ret = 0;
static int last_gui_width, last_gui_height;
-
+
//printf("video_out_stk: redraw_needed()\n");
if( last_gui_width != this->sc.gui_width ||
@@ -273,7 +273,7 @@ static void stk_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) {
stk_frame_t* frame = (stk_frame_t*)frame_gen;
//printf("video_out_stk: display_frame()\n");
-
+
pthread_mutex_lock(&this->mutex);
if ( (frame->width != this->sc.delivered_width)
@@ -308,7 +308,7 @@ static void stk_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) {
static int stk_get_property (vo_driver_t* this_gen, int property) {
stk_driver_t* this = (stk_driver_t *)this_gen;
-
+
//printf("video_out_stk: get_property()\n");
if (property == VO_PROP_ASPECT_RATIO)
@@ -321,7 +321,7 @@ static int stk_set_property (vo_driver_t* this_gen, int property, int value) {
stk_driver_t* this = (stk_driver_t*)this_gen;
//printf("video_out_stk: set_property()\n");
-
+
if ( property == VO_PROP_ASPECT_RATIO) {
if (value>=XINE_VO_ASPECT_NUM_RATIOS)
value = XINE_VO_ASPECT_AUTO;
@@ -341,7 +341,7 @@ static void stk_get_property_min_max (vo_driver_t *this_gen, int property, int *
//printf("video_out_stk: get_property_min_max()\n");
}
-static int stk_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data) {
+static int stk_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data) {
stk_driver_t *this = (stk_driver_t*)this_gen;
switch (data_type)
@@ -349,9 +349,9 @@ static int stk_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *da
case XINE_GUI_SEND_COMPLETION_EVENT:
break;
- case XINE_GUI_SEND_EXPOSE_EVENT:
+ case XINE_GUI_SEND_EXPOSE_EVENT:
break;
-
+
case XINE_GUI_SEND_DRAWABLE_CHANGED:
this->xine_panel = (xine_panel_t*)data;
this->surface = stk_xine_panel_surface(this->xine_panel);
@@ -365,18 +365,18 @@ static int stk_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *da
case XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO:
break;
}
-
+
return 0;
}
static void stk_dispose (vo_driver_t * this_gen) {
stk_driver_t* this = (stk_driver_t*)this_gen;
-
+
//printf("video_out_stk: dispose()\n");
-
- /* FIXME: any libstk deleting must be done in the app or library
+
+ /* FIXME: any libstk deleting must be done in the app or library
* since we didn't create the surface */
-
+
_x_alphablend_free(&this->alphablend_extra_data);
free(this);
@@ -386,10 +386,10 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis
stk_class_t * class = (stk_class_t *) class_gen;
/* allocate the video output driver class */
stk_driver_t* this;
-
+
//printf("video_out_stk: open_plugin()\n");
-
- this = (stk_driver_t *) xine_xmalloc (sizeof (stk_driver_t));
+
+ this = calloc(1, sizeof (stk_driver_t));
if (!this)
return NULL;
@@ -432,7 +432,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis
/* FIXME: move this to the stk SDL driver code */
xine_setenv("SDL_VIDEO_YUV_HWACCEL", "1", 1);
xine_setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "1", 1);
-
+
xprintf (this->xine, XINE_VERBOSITY_DEBUG,
"video_out_stk: warning, xine's STK driver is EXPERIMENTAL\n");
return &this->vo_driver;
@@ -460,16 +460,16 @@ static void dispose_class (video_driver_class_t *this_gen) {
static void *init_class (xine_t *xine, void *visual_gen) {
stk_class_t* this;
-
+
//printf("video_out_stk: init_class()\n");
- this = (stk_class_t *) xine_xmalloc(sizeof(stk_class_t));
+ this = calloc(1, sizeof(stk_class_t));
this->driver_class.open_plugin = open_plugin;
this->driver_class.get_identifier = get_identifier;
this->driver_class.get_description = get_description;
this->driver_class.dispose = dispose_class;
-
+
this->config = xine->config;
this->xine = xine;