From: Darren S. <li...@yo...> - 2009-11-30 21:59:38
|
# [node 71245c945c1ab1d9a525d209a340a6e9688b42a6 part 7] diff --git a/src/video_dec/rgb.c b/src/video_dec/rgb.c --- a/src/video_dec/rgb.c +++ b/src/video_dec/rgb.c @@ -27,7 +27,7 @@ * file can be 32-, 24-, 16-, 8-, 4-, 2-, or 1-bit. Any resolutions <= 8 * can also be greyscale depending on what the QT file specifies. * - * One more catch: Raw RGB from a Microsoft file is upside down. This is + * One more catch: Raw RGB from a Microsoft file is upside down. This is * indicated by a negative height parameter. */ @@ -80,7 +80,7 @@ unsigned char yuv_palette[256 * 4]; yuv_planes_t yuv_planes; - + } rgb_decoder_t; static void rgb_decode_data (video_decoder_t *this_gen, @@ -121,7 +121,7 @@ this->video_step = buf->decoder_info[0]; _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step); } - + if (buf->decoder_flags & BUF_FLAG_STDHEADER) { /* need to initialize */ (this->stream->video_out->open) (this->stream->video_out, this->stream); @@ -194,11 +194,11 @@ palette_index = this->buf[buf_ptr++]; - this->yuv_planes.y[row_ptr + pixel_ptr] = + this->yuv_planes.y[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 0]; - this->yuv_planes.u[row_ptr + pixel_ptr] = + this->yuv_planes.u[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 1]; - this->yuv_planes.v[row_ptr + pixel_ptr] = + this->yuv_planes.v[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 2]; } else if (this->bytes_per_pixel == 2) { @@ -208,11 +208,11 @@ buf_ptr += 2; UNPACK_BGR15(packed_pixel, r, g, b); - this->yuv_planes.y[row_ptr + pixel_ptr] = + this->yuv_planes.y[row_ptr + pixel_ptr] = COMPUTE_Y(r, g, b); - this->yuv_planes.u[row_ptr + pixel_ptr] = + this->yuv_planes.u[row_ptr + pixel_ptr] = COMPUTE_U(r, g, b); - this->yuv_planes.v[row_ptr + pixel_ptr] = + this->yuv_planes.v[row_ptr + pixel_ptr] = COMPUTE_V(r, g, b); } else { @@ -225,11 +225,11 @@ /* the next line takes care of 'A' in the 32-bit case */ buf_ptr += this->bytes_per_pixel - 3; - this->yuv_planes.y[row_ptr + pixel_ptr] = + this->yuv_planes.y[row_ptr + pixel_ptr] = COMPUTE_Y(r, g, b); - this->yuv_planes.u[row_ptr + pixel_ptr] = + this->yuv_planes.u[row_ptr + pixel_ptr] = COMPUTE_U(r, g, b); - this->yuv_planes.v[row_ptr + pixel_ptr] = + this->yuv_planes.v[row_ptr + pixel_ptr] = COMPUTE_V(r, g, b); } @@ -249,18 +249,18 @@ } if (pixel_byte & 0x80) { - this->yuv_planes.y[row_ptr + pixel_ptr] = + this->yuv_planes.y[row_ptr + pixel_ptr] = this->yuv_palette[1 * 4 + 0]; - this->yuv_planes.u[row_ptr + pixel_ptr] = + this->yuv_planes.u[row_ptr + pixel_ptr] = this->yuv_palette[1 * 4 + 1]; - this->yuv_planes.v[row_ptr + pixel_ptr] = + this->yuv_planes.v[row_ptr + pixel_ptr] = this->yuv_palette[1 * 4 + 2]; } else { - this->yuv_planes.y[row_ptr + pixel_ptr] = + this->yuv_planes.y[row_ptr + pixel_ptr] = this->yuv_palette[0 * 4 + 0]; - this->yuv_planes.u[row_ptr + pixel_ptr] = + this->yuv_planes.u[row_ptr + pixel_ptr] = this->yuv_palette[0 * 4 + 1]; - this->yuv_planes.v[row_ptr + pixel_ptr] = + this->yuv_planes.v[row_ptr + pixel_ptr] = this->yuv_palette[0 * 4 + 2]; } pixels_left--; @@ -274,11 +274,11 @@ } palette_index = (pixel_byte & 0xC0) >> 6; - this->yuv_planes.y[row_ptr + pixel_ptr] = + this->yuv_planes.y[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 0]; - this->yuv_planes.u[row_ptr + pixel_ptr] = + this->yuv_planes.u[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 1]; - this->yuv_planes.v[row_ptr + pixel_ptr] = + this->yuv_planes.v[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 2]; pixels_left--; @@ -292,11 +292,11 @@ } palette_index = (pixel_byte & 0xF0) >> 4; - this->yuv_planes.y[row_ptr + pixel_ptr] = + this->yuv_planes.y[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 0]; - this->yuv_planes.u[row_ptr + pixel_ptr] = + this->yuv_planes.u[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 1]; - this->yuv_planes.v[row_ptr + pixel_ptr] = + this->yuv_planes.v[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 2]; pixels_left--; @@ -306,11 +306,11 @@ palette_index = this->buf[buf_ptr++]; - this->yuv_planes.y[row_ptr + pixel_ptr] = + this->yuv_planes.y[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 0]; - this->yuv_planes.u[row_ptr + pixel_ptr] = + this->yuv_planes.u[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 1]; - this->yuv_planes.v[row_ptr + pixel_ptr] = + this->yuv_planes.v[row_ptr + pixel_ptr] = this->yuv_palette[palette_index * 4 + 2]; } else if (this->bytes_per_pixel == 2) { @@ -320,16 +320,16 @@ buf_ptr += 2; UNPACK_RGB15(packed_pixel, r, g, b); - this->yuv_planes.y[row_ptr + pixel_ptr] = + this->yuv_planes.y[row_ptr + pixel_ptr] = COMPUTE_Y(r, g, b); - this->yuv_planes.u[row_ptr + pixel_ptr] = + this->yuv_planes.u[row_ptr + pixel_ptr] = COMPUTE_U(r, g, b); - this->yuv_planes.v[row_ptr + pixel_ptr] = + this->yuv_planes.v[row_ptr + pixel_ptr] = COMPUTE_V(r, g, b); } else { - /* RGB24 or ARGB32; the next line takes care of 'A' in the + /* RGB24 or ARGB32; the next line takes care of 'A' in the * 32-bit case */ buf_ptr += this->bytes_per_pixel - 3; @@ -337,11 +337,11 @@ g = this->buf[buf_ptr++]; b = this->buf[buf_ptr++]; - this->yuv_planes.y[row_ptr + pixel_ptr] = + this->yuv_planes.y[row_ptr + pixel_ptr] = COMPUTE_Y(r, g, b); - this->yuv_planes.u[row_ptr + pixel_ptr] = + this->yuv_planes.u[row_ptr + pixel_ptr] = COMPUTE_U(r, g, b); - this->yuv_planes.v[row_ptr + pixel_ptr] = + this->yuv_planes.v[row_ptr + pixel_ptr] = COMPUTE_V(r, g, b); } @@ -434,7 +434,7 @@ * exported plugin catalog entry */ -static const uint32_t video_types[] = { +static const uint32_t video_types[] = { BUF_VIDEO_RGB, 0 }; @@ -445,7 +445,7 @@ }; const plugin_info_t xine_plugin_info[] EXPORTED = { - /* type, API, "name", version, special_info, init_function */ + /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_DECODER, 19, "rgb", XINE_VERSION_CODE, &dec_info_video, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_dec/yuv.c b/src/video_dec/yuv.c --- a/src/video_dec/yuv.c +++ b/src/video_dec/yuv.c @@ -62,7 +62,7 @@ int width; /* the width of a video frame */ int height; /* the height of a video frame */ double ratio; /* the width to height ratio */ - + int progressive; int top_field_first; @@ -104,10 +104,10 @@ this->ratio = (double)buf->decoder_info[1] / (double)buf->decoder_info[2]; else this->ratio = (double)this->width / (double)this->height; - + this->progressive = buf->decoder_info[3]; this->top_field_first = buf->decoder_info[4]; - + free (this->buf); this->buf = NULL; @@ -123,7 +123,7 @@ case BUF_VIDEO_YUY2: _x_meta_info_set_utf8(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YUY2"); break; - + case BUF_VIDEO_YV12: _x_meta_info_set_utf8(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YV12"); break; @@ -135,13 +135,13 @@ case BUF_VIDEO_GREY: _x_meta_info_set_utf8(this->stream, XINE_META_INFO_VIDEOCODEC, "Greyscale YUV"); break; - + case BUF_VIDEO_I420: _x_meta_info_set_utf8(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw I420"); break; } - + _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->width); _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->height); _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_RATIO, this->ratio*10000); @@ -164,14 +164,14 @@ xine_fast_memcpy (&this->buf[this->size], buf->content, buf->size); this->size += buf->size; - + src = this->buf; } if (buf->decoder_flags & BUF_FLAG_FRAME_END) { if (buf->type == BUF_VIDEO_YUY2) { - + img = this->stream->video_out->get_frame (this->stream->video_out, this->width, this->height, this->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS); @@ -182,14 +182,14 @@ /* dst */ img->base[0], img->pitches[0], /* width x height */ - this->width, this->height); - + this->width, this->height); + } else if (buf->type == BUF_VIDEO_YV12) { img = this->stream->video_out->get_frame (this->stream->video_out, this->width, this->height, this->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS); - + yv12_to_yv12( /* Y */ src, this->width, @@ -204,7 +204,7 @@ this->width, this->height); } else if (buf->type == BUF_VIDEO_I420) { - + img = this->stream->video_out->get_frame (this->stream->video_out, this->width, this->height, this->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS); @@ -231,17 +231,17 @@ yuv9_to_yv12( /* Y */ - src, + src, this->width, - img->base[0], + img->base[0], img->pitches[0], /* U */ - src + (this->width * this->height), + src + (this->width * this->height), this->width / 4, img->base[1], img->pitches[1], /* V */ - src + (this->width * this->height) + + src + (this->width * this->height) + (this->width * this->height / 16), this->width / 4, img->base[2], @@ -356,8 +356,8 @@ * exported plugin catalog entry */ -static const uint32_t video_types[] = { - BUF_VIDEO_YUY2, +static const uint32_t video_types[] = { + BUF_VIDEO_YUY2, BUF_VIDEO_YV12, BUF_VIDEO_YVU9, BUF_VIDEO_GREY, @@ -371,7 +371,7 @@ }; const plugin_info_t xine_plugin_info[] EXPORTED = { - /* type, API, "name", version, special_info, init_function */ + /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_DECODER, 19, "yuv", XINE_VERSION_CODE, &dec_info_video, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -5,7 +5,7 @@ AM_LDFLAGS = $(xineplug_ldflags) AM_OBJCFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -SUBDIRS = +SUBDIRS = if ENABLE_MACOSX_VIDEO SUBDIRS += macosx @@ -188,7 +188,7 @@ xineplug_vo_out_stk_la_LIBADD = $(XINE_LIB) $(LIBSTK_LIBS) $(PTHREAD_LIBS) xineplug_vo_out_stk_la_CFLAGS = $(AM_CFLAGS) $(LIBSTK_CFLAGS) -xineplug_vo_out_directx_la_SOURCES = video_out_directx.c +xineplug_vo_out_directx_la_SOURCES = video_out_directx.c xineplug_vo_out_directx_la_LIBADD = libyuv2rgb.la $(XINE_LIB) $(DIRECTX_VIDEO_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_directx_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS) diff --git a/src/video_out/macosx/video_window.h b/src/video_out/macosx/video_window.h --- a/src/video_out/macosx/video_window.h +++ b/src/video_out/macosx/video_window.h @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * * Written by Daniel Mack <xi...@zo...> - * + * * Most parts of this code were taken from VLC, http://www.videolan.org * Thanks for the good research! */ diff --git a/src/video_out/myglext.h b/src/video_out/myglext.h --- a/src/video_out/myglext.h +++ b/src/video_out/myglext.h @@ -13,21 +13,21 @@ ** this file except in compliance with the License. You may obtain a copy ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** +** ** http://oss.sgi.com/projects/FreeB -** +** ** Note that, as provided in the License, the Software is distributed on an ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** +** ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, ** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. -** +** ** Additional Notice Provisions: This software was created using the ** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has ** not been independently verified as being compliant with the OpenGL(R) diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c --- a/src/video_out/video_out_aa.c +++ b/src/video_out/video_out_aa.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2004 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * xine is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA @@ -91,7 +91,7 @@ static void aa_dispose_frame (vo_frame_t *vo_img) { aa_frame_t *frame = (aa_frame_t *)vo_img; - + av_free (frame->vo_frame.base[0]); av_free (frame->vo_frame.base[1]); av_free (frame->vo_frame.base[2]); @@ -119,19 +119,19 @@ frame->vo_frame.field = aa_frame_field; frame->vo_frame.dispose = aa_dispose_frame; frame->vo_frame.driver = this_gen; - + return (vo_frame_t*) frame; } static void aa_update_frame_format (vo_driver_t *this_gen, vo_frame_t *img, - uint32_t width, uint32_t height, + uint32_t width, uint32_t height, double ratio, int format, int flags) { aa_driver_t *this = (aa_driver_t*) this_gen; aa_frame_t *frame = (aa_frame_t *) img; /* printf ("aa_update_format...\n"); */ - if ((frame->width != width) || (frame->height != height) + if ((frame->width != width) || (frame->height != height) || (frame->format != format)) { av_freep (&frame->vo_frame.base[0]); @@ -194,27 +194,27 @@ if (frame->format == XINE_IMGFMT_YV12) { for (y = 0; y<aa_imgheight (this->context); y++) { for (x = 0; x<aa_imgwidth (this->context); x++) { - + *img++ = src_image[((int)((double) x * x_fact) + frame->width * (int)((double) y * y_fact))]; - + } } } else { for (y = 0; y<aa_imgheight (this->context); y++) { for (x = 0; x<aa_imgwidth (this->context); x++) { - + *img++ = src_image[((int)((double) x * x_fact) * 2 + frame->width * 2 * (int)((double) y * y_fact))]; - + } } } frame->vo_frame.free (&frame->vo_frame); - aa_fastrender(this->context, 0, 0, - aa_imgwidth (this->context), + aa_fastrender(this->context, 0, 0, + aa_imgwidth (this->context), aa_imgheight (this->context)); aa_flush (this->context); @@ -223,7 +223,7 @@ static int aa_get_property (vo_driver_t *this_gen, int property) { aa_driver_t *this = (aa_driver_t*) this_gen; - + if ( property == VO_PROP_ASPECT_RATIO) { return this->user_ratio ; } else { @@ -234,7 +234,7 @@ return 0; } -static int aa_set_property (vo_driver_t *this_gen, +static int aa_set_property (vo_driver_t *this_gen, int property, int value) { aa_driver_t *this = (aa_driver_t*) this_gen; @@ -251,7 +251,7 @@ return value; } -static void aa_get_property_min_max (vo_driver_t *this_gen, +static void aa_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max) { *min = 0; *max = 0; @@ -269,9 +269,9 @@ aa_driver_t *this; this = (aa_driver_t*) calloc(1, sizeof(aa_driver_t)); - + this->context = (aa_context*) visual_gen; - + this->config = class->config; this->xine = class->xine; @@ -290,19 +290,19 @@ this->vo_driver.dispose = aa_dispose; return &this->vo_driver; -} +} static void *init_class (xine_t *xine, void *visual_gen) { /* aa_context *context = (aa_context*) visual_gen; */ aa_class_t *this; - + this = calloc(1, sizeof(aa_class_t)); - + this->driver_class.open_plugin = open_plugin; this->driver_class.identifier = "AA"; this->driver_class.description = N_("xine video output plugin using the ascii-art library"); this->driver_class.dispose = default_video_driver_class_dispose; - + this->config = xine->config; this->xine = xine; @@ -315,7 +315,7 @@ }; const plugin_info_t xine_plugin_info[] EXPORTED = { - /* type, API, "name", version, special_info, init_function */ + /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_OUT, 22, "aa", XINE_VERSION_CODE, &vo_info_aa, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_caca.c b/src/video_out/video_out_caca.c --- a/src/video_out/video_out_caca.c +++ b/src/video_out/video_out_caca.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2003, 2004 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * xine is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA @@ -98,7 +98,7 @@ static void caca_dispose_frame (vo_frame_t *vo_img) { caca_frame_t *frame = (caca_frame_t *)vo_img; - + av_free (frame->vo_frame.base[0]); av_free (frame->vo_frame.base[1]); av_free (frame->vo_frame.base[2]); @@ -136,17 +136,17 @@ /* colorspace converter for this frame */ frame->yuv2rgb = this->yuv2rgb_factory->create_converter (this->yuv2rgb_factory); - + return (vo_frame_t*) frame; } static void caca_update_frame_format (vo_driver_t *this_gen, vo_frame_t *img, - uint32_t width, uint32_t height, + uint32_t width, uint32_t height, double ratio, int format, int flags) { caca_driver_t *this = (caca_driver_t*) this_gen; caca_frame_t *frame = (caca_frame_t *) img; - if ((frame->width != width) || (frame->height != height) + if ((frame->width != width) || (frame->height != height) || (frame->format != format)) { av_freep (&frame->vo_frame.base[0]); @@ -214,7 +214,7 @@ static int caca_get_property (vo_driver_t *this_gen, int property) { caca_driver_t *this = (caca_driver_t*) this_gen; - + if ( property == VO_PROP_ASPECT_RATIO) { return this->user_ratio; } else { @@ -225,7 +225,7 @@ return 0; } -static int caca_set_property (vo_driver_t *this_gen, +static int caca_set_property (vo_driver_t *this_gen, int property, int value) { caca_driver_t *this = (caca_driver_t*) this_gen; @@ -242,7 +242,7 @@ return value; } -static void caca_get_property_min_max (vo_driver_t *this_gen, +static void caca_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max) { *min = 0; *max = 0; @@ -266,7 +266,7 @@ caca_driver_t *this; this = calloc(1, sizeof (caca_driver_t)); - + this->config = class->config; this->xine = class->xine; @@ -297,18 +297,18 @@ caca_refresh_display(this->dp); return &this->vo_driver; -} +} static void *init_class (xine_t *xine, void *visual_gen) { caca_class_t *this; - + this = calloc(1, sizeof(caca_class_t)); - + this->driver_class.open_plugin = open_plugin; this->driver_class.identifier = "CACA"; this->driver_class.description = N_("xine video output plugin using the Color AsCii Art library"); this->driver_class.dispose = default_video_driver_class_dispose; - + this->config = xine->config; this->xine = xine; @@ -321,7 +321,7 @@ }; const plugin_info_t xine_plugin_info[] EXPORTED = { - /* type, API, "name", version, special_info, init_function */ + /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_OUT, 22, "caca", XINE_VERSION_CODE, &vo_info_caca, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -1,13 +1,13 @@ /* * Copyright (C) 2000-2006 the xine project and Claudio Ciccani - * + * * This file is part of xine, a free video player. - * + * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * xine is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -19,7 +19,7 @@ * * * DirectFB based output plugin by Claudio Ciccani <kl...@di...> - * + * * Based on video_out_xv.c and video_out_vidix.c. */ @@ -71,18 +71,18 @@ typedef struct directfb_driver_s { vo_driver_t vo_driver; - + int visual_type; uint32_t capabilities; xine_t *xine; - + directfb_frame_t *cur_frame; /* DirectFB related stuff */ IDirectFB *dfb; IDirectFBDisplayLayer *underlay; - + /* Video Layer */ IDirectFBDisplayLayer *layer; IDirectFBSurface *surface; @@ -93,23 +93,23 @@ DFBColorAdjustment default_cadj; int default_level; int visible; - + /* Subpicture layer */ IDirectFBDisplayLayer *spic_layer; IDirectFBSurface *spic_surface; - + /* for hardware scaling */ IDirectFBSurface *temp; int temp_frame_width; int temp_frame_height; DFBSurfacePixelFormat temp_frame_format; - + /* wheter card supports stretchblit with deinterlacing */ int hw_deinterlace; - + /* wheter to enable deinterlacing */ int deinterlace; - + /* configurable options */ int buffermode; int vsync; @@ -117,7 +117,7 @@ uint32_t colorkey; int flicker_filtering; int field_parity; - + #ifdef DIRECTFB_X11 /* X11 related stuff */ Display *display; @@ -126,18 +126,18 @@ GC gc; int depth; x11osd *xoverlay; - + void *user_data; void (*lock_display) (void *user_data); void (*unlock_display) (void *user_data); #endif int ovl_changed; - + /* screen size */ int screen_width; int screen_height; - + /* size / aspect ratio calculations */ vo_scale_t sc; @@ -162,7 +162,7 @@ "no-deinit-check,"\ "disable-module=linux_input,"\ "disable-module=keyboard" - + #define XDIRECTFB_OPTIONS "no-banner,"\ "no-sighandler,"\ "no-deinit-check" @@ -189,7 +189,7 @@ else \ XLockDisplay (this->display); \ } while (0) - + #define UNLOCK_DISPLAY() \ do { \ [... 1694 lines omitted ...] /* retrieve an interface to the current screen */ ret = this->dfb->GetScreen (this->dfb, DSCID_PRIMARY, &screen); if (ret != DFB_OK) { @@ -1967,7 +1967,7 @@ free (this); return NULL; } - + /* find an overlay layer on the current screen */ ret = screen->EnumDisplayLayers (screen, find_overlay, (void*)&id); screen->Release (screen); @@ -1977,7 +1977,7 @@ free (this); return NULL; } - + if (id != DLID_PRIMARY) { DFBDisplayLayerDescription dsc; /* get overlay access */ @@ -1998,7 +1998,7 @@ this->layer = NULL; } } - + if (!this->layer) { xprintf (this->xine, XINE_VERBOSITY_LOG, _("video_out_directfb: no usable display layer was found!\n")); @@ -2006,10 +2006,10 @@ free (this); return NULL; } - + xprintf (this->xine, XINE_VERBOSITY_LOG, _("video_out_directfb: using display layer #%d.\n"), id); - + this->capabilities = convert_caps (this->caps); /* set default configuration */ this->buffermode = 1; // double @@ -2018,7 +2018,7 @@ this->colorkey = DEFAULT_COLORKEY; this->flicker_filtering = 0; this->field_parity = 0; - + /* get user configuration */ init_config (this); @@ -2029,42 +2029,42 @@ free (this); return NULL; } - + this->display = visual->display; this->screen = visual->screen; this->drawable = visual->d; this->gc = XCreateGC (this->display, this->drawable, 0, NULL); - + XGetWindowAttributes (this->display, this->drawable, &attrs); this->depth = attrs.depth; _x_alphablend_init (&this->alphablend_extra_data, this->xine); - + _x_vo_scale_init (&this->sc, 1, 0, this->xine->config); this->sc.user_ratio = XINE_VO_ASPECT_AUTO; this->sc.gui_width = attrs.width; this->sc.gui_height = attrs.height; this->sc.frame_output_cb = visual->frame_output_cb; this->sc.user_data = visual->user_data; - + if (this->visual_type == XINE_VISUAL_TYPE_X11_2) { this->user_data = visual->user_data; this->lock_display = visual->lock_display; this->unlock_display = visual->unlock_display; - } - + } + if (this->colorkeying) { this->xoverlay = x11osd_create (this->xine, this->display, this->screen, this->drawable, X11OSD_COLORKEY); if (this->xoverlay) { - x11osd_colorkey (this->xoverlay, + x11osd_colorkey (this->xoverlay, directfb_colorkey_to_pixel(this), &this->sc); } } else { this->xoverlay = x11osd_create (this->xine, this->display, this->screen, this->drawable, X11OSD_SHAPED); } - + if (this->xoverlay) this->capabilities |= VO_CAP_UNSCALED_OVERLAY; @@ -2099,13 +2099,13 @@ "video_out_directfb: %s!\n", error); return NULL; } - + if (!visual) { xprintf (xine, XINE_VERBOSITY_DEBUG, "video_out_directfb: x11 visual is required!\n"); return NULL; } - + /* check if we are running under XDirectFB */ if (strcmp (XServerVendor (visual->display), "Denis Oliver Kropp")) return NULL; @@ -2128,7 +2128,7 @@ this = init_class_x11( xine, visual_gen ); if (this) this->visual_type = XINE_VISUAL_TYPE_X11_2; - + return this; } diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c --- a/src/video_out/video_out_directx.c +++ b/src/video_out/video_out_directx.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2005 the xine project - * + * * This file is part of xine, a unix video player. - * + * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * xine is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA @@ -118,7 +118,7 @@ LPDIRECTDRAW ddobj; /* direct draw object */ LPDIRECTDRAWSURFACE primary; /* primary dd surface */ - LPDIRECTDRAWSURFACE secondary; /* secondary dd surface */ + LPDIRECTDRAWSURFACE secondary; /* secondary dd surface */ LPDIRECTDRAWCLIPPER ddclipper; /* dd clipper object */ uint8_t * contents; /* secondary contents */ win32_frame_t *current; /* current frame */ @@ -151,7 +151,7 @@ * * ----------------------------------------- */ -/* Display formatted error message in +/* Display formatted error message in * popup message box.*/ static void Error( HWND hwnd, LPSTR szfmt, ... ) @@ -169,7 +169,7 @@ { if( win32_visual->FullScreen ) { - SetRect( &win32_visual->WndRect, 0, 0, + SetRect( &win32_visual->WndRect, 0, 0, GetSystemMetrics( SM_CXSCREEN ), GetSystemMetrics( SM_CYSCREEN ) ); } @@ -181,12 +181,12 @@ } } -/* Create our direct draw object, primary +/* Create our direct draw object, primary * surface and clipper object. * - * NOTE : The primary surface is more or + * NOTE : The primary surface is more or * less a viewport into the parent desktop - * window and will always have a pixel format + * window and will always have a pixel format * identical to the current display mode. */ static boolean CreatePrimary( win32_driver_t * win32_driver ) @@ -276,7 +276,7 @@ } /* Create our secondary ( off screen ) buffer. - * The optimal secondary buffer is a h/w + * The optimal secondary buffer is a h/w * overlay with the same pixel format as the * xine frame type. However, since this is * not always supported by the host h/w, @@ -327,7 +327,7 @@ /* the requested format is XINE_IMGFMT_YV12 */ ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; - ddsd.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_OVERLAY; + ddsd.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_OVERLAY; ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC; ddsd.ddpfPixelFormat.dwYUVBitCount = 16; @@ -343,7 +343,7 @@ /* the requested format is XINE_IMGFMT_YUY2 */ ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; - ddsd.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_OVERLAY; + ddsd.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_OVERLAY; ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC; ddsd.ddpfPixelFormat.dwYUVBitCount = 16; @@ -360,7 +360,7 @@ /* the requested format is IMGFMT_RGB */ ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; - ddsd.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_OVERLAY; + ddsd.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_OVERLAY; ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB; ddsd.ddpfPixelFormat.dwYUVBitCount = 24; @@ -371,7 +371,7 @@ lprintf("CreateSecondary() - act_format = (RGB) %d\n", IMGFMT_RGB); win32_driver->act_format = IMGFMT_RGB; - } + } #endif /* RGB_SUPPORT */ lprintf("CreateSecondary() - IDirectDraw_CreateSurface()\n"); @@ -423,7 +423,7 @@ IDirectDraw_Release( win32_driver->ddobj ); _x_alphablend_free(&win32_driver->alphablend_extra_data); - + free( win32_driver ); } @@ -447,7 +447,7 @@ Error( 0, "IDirectDrawSurface_GetPixelFormat ( CheckPixelFormat ) : error 0x%lx", result ); return 0; } [... 32 lines omitted ...] @@ -583,7 +583,7 @@ { DWORD dw_color_key; DDPIXELFORMAT ddpf; - DDOVERLAYFX ddofx; + DDOVERLAYFX ddofx; int flags; HRESULT result; @@ -903,7 +903,7 @@ } -static void win32_update_frame_format( vo_driver_t * vo_driver, vo_frame_t * vo_frame, uint32_t width, +static void win32_update_frame_format( vo_driver_t * vo_driver, vo_frame_t * vo_frame, uint32_t width, uint32_t height, double ratio, int format, int flags ) { win32_driver_t *win32_driver = ( win32_driver_t * ) vo_driver; @@ -953,7 +953,7 @@ #endif else { - xprintf (win32_driver->xine, XINE_VERBOSITY_DEBUG, + xprintf (win32_driver->xine, XINE_VERBOSITY_DEBUG, "vo_out_directx : !!! unsupported image format %04x !!!\n", format ); exit (1); } @@ -1015,13 +1015,13 @@ #if NEW_YUV win32_driver->yuv2rgb->configure( win32_driver->yuv2rgb, win32_driver->width, win32_driver->height, - win32_frame->vo_frame.pitches[0], win32_frame->vo_frame.pitches[1], + win32_frame->vo_frame.pitches[0], win32_frame->vo_frame.pitches[1], win32_driver->width, win32_driver->height, win32_driver->width * win32_driver->bytespp); #else yuv2rgb_setup( win32_driver->yuv2rgb, win32_driver->width, win32_driver->height, - win32_frame->vo_frame.pitches[0], win32_frame->vo_frame.pitches[1], + win32_frame->vo_frame.pitches[0], win32_frame->vo_frame.pitches[1], win32_driver->width, win32_driver->height, win32_driver->width * win32_driver->bytespp ); @@ -1041,7 +1041,7 @@ #if NEW_YUV win32_driver->yuv2rgb->configure( win32_driver->yuv2rgb, win32_driver->width, win32_driver->height, - win32_frame->vo_frame.pitches[0], win32_frame->vo_frame.pitches[0] / 2, + win32_frame->vo_frame.pitches[0], win32_frame->vo_frame.pitches[0] / 2, win32_driver->width, win32_driver->height, win32_driver->width * win32_driver->bytespp ); #else @@ -1087,14 +1087,14 @@ src += vo_frame->pitches[0]; dst += win32_driver->ddsd.lPitch; } - + src = frame->base[2]; for (line = 0; line < frame->height/2 ; line++){ xine_fast_memcpy( dst, src, frame->width/2); src += vo_frame->pitches[2]; dst += win32_driver->ddsd.lPitch/2; } - + src = frame->base[1]; for (line = 0; line < frame->height/2 ; line++){ xine_fast_memcpy( dst, src, frame->width/2); @@ -1102,10 +1102,10 @@ dst += win32_driver->ddsd.lPitch/2; } break; - + case XINE_IMGFMT_YUY2: default: - src = frame->base[0]; + src = frame->base[0]; for (line = 0; line < frame->height ; line++){ xine_fast_memcpy( dst, src, frame->width*2); src += vo_frame->pitches[0]; @@ -1184,7 +1184,7 @@ { HRESULT result; HWND newWndHnd = (HWND) data; - + /* set cooperative level */ result = IDirectDraw_SetCooperativeLevel( win32_driver->ddobj, newWndHnd, DDSCL_NORMAL ); if( result != DD_OK ) @@ -1217,15 +1217,15 @@ int ret = 0; /* TC - May need to revisit this! */ -#ifdef TC +#ifdef TC win32_driver_t *win32_driver = (win32_driver_t *) this_gen; if( _x_vo_scale_redraw_needed( &win32_driver->sc ) ) { - win32_gui_data_exchange(this_gen, GUI_WIN32_MOVED_OR_RESIZED, 0); + win32_gui_data_exchange(this_gen, GUI_WIN32_MOVED_OR_RESIZED, 0); ret = 1; } #endif - + return ret; } @@ -1246,7 +1246,7 @@ _x_alphablend_init(&win32_driver->alphablend_extra_data, class->xine); - + win32_driver->xine = class->xine; /* Make sure that the DirectX drivers are available and present! */ @@ -1302,7 +1302,7 @@ directx->xine = xine; directx->config = xine->config; - + return directx; } diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -1,13 +1,13 @@ /* * Copyright (C) 2000-2007 the xine project and Fredrik Noring - * + * * This file is part of xine, a free video player. - * + * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * xine is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -27,7 +27,7 @@ * @author Fredrik Noring <no...@no...>: * Zero copy buffers and clean up. * - * @author Aaron Holtzman <aho...@es...>: + * @author Aaron Holtzman <aho...@es...>: * Based on xine's video_out_xshm.c, based on mpeg2dec code from * * @author Geert Uytterhoeven and Chris Lawrence: @@ -52,8 +52,8 @@ #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> -#include <fcntl.h> - +#include <fcntl.h> + #include "xine.h" #include <xine/video_out.h> @@ -95,13 +95,13 @@ int format; int flags; - + vo_scale_t sc; yuv2rgb_t *yuv2rgb; /* yuv2rgb converter for this frame */ uint8_t *rgb_dst; int yuv_stride; - + int bytes_per_line; uint8_t* video_mem; /* mmapped video memory */ @@ -118,12 +118,12 @@ int fd; int mem_size; uint8_t* video_mem_base; /* mmapped video memory */ - + int depth, bpp, bytes_per_pixel; - + int total_num_native_buffers; int used_num_buffers; - + int yuv2rgb_mode; int yuv2rgb_swap; int yuv2rgb_brightness; @@ -136,11 +136,11 @@ /* size / aspect ratio calculations */ vo_scale_t sc; - + int fb_bytes_per_line; fb_frame_t *cur_frame, *old_frame; - + struct fb_var_screeninfo fb_var; struct fb_fix_screeninfo fb_fix; @@ -165,10 +165,10 @@ static void fb_frame_proc_slice(vo_frame_t *vo_img, uint8_t **src) { fb_frame_t *frame = (fb_frame_t *)vo_img ; - + vo_img->proc_called = 1; - - if( frame->vo_frame.crop_left || frame->vo_frame.crop_top || + + if( frame->vo_frame.crop_left || frame->vo_frame.crop_top || frame->vo_frame.crop_right || frame->vo_frame.crop_bottom ) { /* we don't support crop, so don't even waste cpu cycles. @@ -188,18 +188,18 @@ static void fb_frame_field(vo_frame_t *vo_img, int which_field) { fb_frame_t *frame = (fb_frame_t *)vo_img ; - + switch(which_field) { case VO_TOP_FIELD: frame->rgb_dst = frame->data; break; - + case VO_BOTTOM_FIELD: frame->rgb_dst = frame->data + frame->bytes_per_line ; break; - + case VO_BOTH_FIELDS: frame->rgb_dst = frame->data; break; @@ -232,16 +232,16 @@ memcpy(&frame->sc, &this->sc, sizeof(vo_scale_t)); pthread_mutex_init(&frame->vo_frame.mutex, NULL); - + [... 296 lines omitted ...] case 8: if(!var->blue.offset) - return MODE_8_RGB; - return MODE_8_BGR; + return MODE_8_RGB; + return MODE_8_BGR; } } - + xprintf(this->xine, XINE_VERBOSITY_LOG, _("%s: Your video mode was not recognized, sorry.\n"), LOG_MODULE); return 0; } - + static int setup_yuv2rgb(fb_driver_t *this, config_values_t *config, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix) @@ -890,13 +890,13 @@ this->yuv2rgb_contrast = this->yuv2rgb_saturation = 128; this->yuv2rgb_factory = yuv2rgb_factory_init(this->yuv2rgb_mode, - this->yuv2rgb_swap, + this->yuv2rgb_swap, this->yuv2rgb_cmap); this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory, this->yuv2rgb_brightness, this->yuv2rgb_contrast, this->yuv2rgb_saturation); - + return 1; } @@ -917,7 +917,7 @@ * bpp <= 32 * msb_right = 0 */ - + this->bytes_per_pixel = (this->fb_var.bits_per_pixel + 7)/8; this->bpp = this->bytes_per_pixel * 8; this->depth = this->fb_var.red.length + @@ -926,9 +926,9 @@ this->total_num_native_buffers = var->yres_virtual / var->yres; this->used_num_buffers = 0; - + this->cur_frame = this->old_frame = 0; - + xprintf(this->xine, XINE_VERBOSITY_LOG, _("%s: %d video RAM buffers are available.\n"), LOG_MODULE, this->total_num_native_buffers); @@ -938,7 +938,7 @@ xprintf(this->xine, XINE_VERBOSITY_LOG, _("WARNING: %s: Zero copy buffers are DISABLED because only %d buffers\n" " are available which is less than the recommended %d buffers. Lowering\n" - " the frame buffer resolution might help.\n"), + " the frame buffer resolution might help.\n"), LOG_MODULE, this->total_num_native_buffers, RECOMMENDED_NUM_BUFFERS); } else @@ -966,11 +966,11 @@ fb_driver_t *this; fb_class_t *class; fb_visual_t *visual = NULL; - + if (visual_gen) { visual = (fb_visual_t *) visual_gen; } - + class = (fb_class_t *)class_gen; config = class->config; @@ -980,7 +980,7 @@ return NULL; _x_alphablend_init(&this->alphablend_extra_data, class->xine); - + register_callbacks(this); this->fd = open_fb_device(config, class->xine); @@ -992,7 +992,7 @@ goto error; if (!set_fb_palette (this->fd, &this->fb_var)) goto error; - + this->xine = class->xine; if(this->fb_fix.line_length) @@ -1001,7 +1001,7 @@ this->fb_bytes_per_line = (this->fb_var.xres_virtual * this->fb_var.bits_per_pixel)/8; - + _x_vo_scale_init(&this->sc, 0, 0, config); this->sc.gui_width = this->fb_var.xres; this->sc.gui_height = this->fb_var.yres; @@ -1027,10 +1027,10 @@ this->fb_var.red.length, this->fb_var.red.offset, this->fb_var.green.length, this->fb_var.green.offset, this->fb_var.blue.length, this->fb_var.blue.offset); - + if(!setup_yuv2rgb(this, config, &this->fb_var, &this->fb_fix)) goto error; - + /* mmap whole video memory */ this->mem_size = this->fb_fix.smem_len; this->video_mem_base = mmap(0, this->mem_size, PROT_READ | PROT_WRITE, @@ -1064,7 +1064,7 @@ /* exported plugin catalog entry */ const plugin_info_t xine_plugin_info[] EXPORTED = { - /* type, API, "name", version, special_info, init_function */ + /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_OUT, 22, "fb", XINE_VERSION_CODE, &vo_info_fb, fb_init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_none.c b/src/video_out/video_out_none.c --- a/src/video_out/video_out_none.c +++ b/src/video_out/video_out_none.c @@ -72,7 +72,7 @@ static void none_frame_dispose(vo_frame_t *vo_frame) { none_frame_t *frame = (none_frame_t *)vo_frame; - free_framedata(frame); + free_framedata(frame); free (frame); } @@ -87,7 +87,7 @@ static vo_frame_t *none_alloc_frame(vo_driver_t *vo_driver) { /* none_driver_t *this = (none_driver_t *) vo_driver; */ none_frame_t *frame; - + frame = calloc(1, sizeof(none_frame_t)); if(!frame) return NULL; @@ -97,43 +97,43 @@ frame->vo_frame.base[0] = NULL; frame->vo_frame.base[1] = NULL; frame->vo_frame.base[2] = NULL; - + frame->vo_frame.proc_slice = NULL; frame->vo_frame.proc_frame = NULL; frame->vo_frame.field = none_frame_field; frame->vo_frame.dispose = none_frame_dispose; frame->vo_frame.driver = vo_driver; - + return (vo_frame_t *)frame; } static void none_update_frame_format(vo_driver_t *vo_driver, vo_frame_t *vo_frame, - uint32_t width, uint32_t height, + uint32_t width, uint32_t height, double ratio, int format, int flags) { none_driver_t *this = (none_driver_t *) vo_driver; none_frame_t *frame = (none_frame_t *) vo_frame; if((frame->width != width) || (frame->height != height) || (frame->format != format)) { - + free_framedata(frame); - + frame->width = width; frame->height = height; frame->format = format; - + switch(format) { - case XINE_IMGFMT_YV12: + case XINE_IMGFMT_YV12: { int y_size, uv_size; - + frame->vo_frame.pitches[0] = 8*((width + 7) / 8); frame->vo_frame.pitches[1] = 8*((width + 15) / 16); frame->vo_frame.pitches[2] = 8*((width + 15) / 16); - + y_size = frame->vo_frame.pitches[0] * height; uv_size = frame->vo_frame.pitches[1] * ((height+1)/2); - + frame->vo_frame.base[0] = malloc (y_size + 2*uv_size); frame->vo_frame.base[1] = frame->vo_frame.base[0]+y_size+uv_size; frame->vo_frame.base[2] = frame->vo_frame.base[0]+y_size; @@ -152,14 +152,14 @@ break; } - - if((format == XINE_IMGFMT_YV12 - && (frame->vo_frame.base[0] == NULL - || frame->vo_frame.base[1] == NULL + + if((format == XINE_IMGFMT_YV12 + && (frame->vo_frame.base[0] == NULL + || frame->vo_frame.base[1] == NULL || frame->vo_frame.base[2] == NULL)) || (format == XINE_IMGFMT_YUY2 && frame->vo_frame.base[0] == NULL)) { xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_none: error. (framedata allocation failed: out of memory)\n"); + "video_out_none: error. (framedata allocation failed: out of memory)\n"); free_framedata(frame); } } @@ -170,19 +170,19 @@ static void none_display_frame(vo_driver_t *vo_driver, vo_frame_t *vo_frame) { /* none_driver_t *driver = (none_driver_t *)vo_driver; */ none_frame_t *frame = (none_frame_t *)vo_frame; - + frame->vo_frame.free(&frame->vo_frame); } static int none_get_property(vo_driver_t *vo_driver, int property) { none_driver_t *driver = (none_driver_t *)vo_driver; - + switch(property) { case VO_PROP_ASPECT_RATIO: return driver->ratio; break; - + default: break; } @@ -192,7 +192,7 @@ static int none_set_property(vo_driver_t *vo_driver, int property, int value) { none_driver_t *driver = (none_driver_t *)vo_driver; - + switch(property) { case VO_PROP_ASPECT_RATIO: @@ -208,7 +208,7 @@ return value; } -static void none_get_property_min_max(vo_driver_t *vo_driver, +static void none_get_property_min_max(vo_driver_t *vo_driver, int property, int *min, int *max) { *min = 0; *max = 0; @@ -242,13 +242,13 @@ static vo_driver_t *open_plugin(video_driver_class_t *driver_class, const void *visual) { none_class_t *class = (none_class_t *) driver_class; none_driver_t *driver; - + driver = calloc(1, sizeof(none_driver_t)); - + driver->config = class->config; driver->xine = class->xine; driver->ratio = XINE_VO_ASPECT_AUTO; - + driver->vo_driver.get_capabilities = none_get_capabilities; driver->vo_driver.alloc_frame = none_alloc_frame ; driver->vo_driver.update_frame_format = none_update_frame_format; @@ -262,16 +262,16 @@ driver->vo_driver.gui_data_exchange = none_gui_data_exchange; driver->vo_driver.dispose = none_dispose; driver->vo_driver.redraw_needed = none_redraw_needed; - + return &driver->vo_driver; -} +} /* * Class related functions. */ static void *init_class (xine_t *xine, void *visual) { none_class_t *this; - + this = calloc(1, sizeof(none_class_t)); this->driver_class.open_plugin = open_plugin; @@ -291,7 +291,7 @@ }; const plugin_info_t xine_plugin_info[] EXPORTED = { - /* type, API, "name", version, special_info, init_function */ + /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_OUT, 22, "none", XINE_VERSION_CODE, &vo_info_none, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -1,13 +1,13 @@ /* * Copyright (C) 2000-2003 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * xine is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -147,7 +147,7 @@ double ratio; uint8_t *rgb, *rgb_dst; - + yuv2rgb_t *yuv2rgb; /* yuv2rgb converter set up for this frame */ } opengl_frame_t; @@ -203,7 +203,7 @@ PFNMYGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB; PFNMYGLGENTEXTURESEXTPROC glGenTexturesEXT; PFNMYGLBINDTEXTUREEXTPROC glBindTextureEXT; - + int yuv2rgb_brightness; int yuv2rgb_contrast; int yuv2rgb_saturation; @@ -238,7 +238,7 @@ int (*setup)(opengl_driver_t *); /* Flag: needs output converted to rgb (is able to do YUV otherwise) */ int needsrgb; - /* Default action: what to do if there's no new image + /* Default action: what to do if there's no new image * typically either RENDER_NONE or RENDER_DRAW (for animated render's) */ enum render_e defaction; /* Fallback: change to following render backend if this one doesn't work */ @@ -332,7 +332,7 @@ float off; float tx, ty; struct timeval curtime; - + glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); /* Calc timing + texture coords */ @@ -346,10 +346,10 @@ glMatrixMode (GL_MODELVIEW); glLoadIdentity (); glTranslatef (0, 0, -10); - glRotatef (off * CYCLE_FACTOR1, 1, 0, 0); - glRotatef (off, 0, 0, 1); - glRotatef (off * CYCLE_FACTOR2, 0, 1, 0); - + glRotatef (off * CYCLE_FACTOR1, 1, 0, 0); + glRotatef (off, 0, 0, 1); + glRotatef (off * CYCLE_FACTOR2, 0, 1, 0); + /* Note that this is not aspect ratio corrected */ glBegin (GL_QUADS); for (i = 0; i < CYL_TESSELATION; i++) { @@ -368,7 +368,7 @@ } /* Animated spinning environment mapped torus */ -#define DIST_FACTOR 16.568542 /* 2 * (sqrt(2)-1) * 20 */ +#define DIST_FACTOR 16.568542 /* 2 * (sqrt(2)-1) * 20 */ static void render_env_tor (opengl_driver_t *this, opengl_frame_t *frame) { float off; float x1, y1, x2, y2, tx, ty; @@ -402,7 +402,7 @@ glLoadIdentity (); glDepthFunc (GL_ALWAYS); glDepthMask (GL_FALSE); - + glBegin (GL_QUADS); glColor3f (1, 1, 1); glTexCoord2f (tx, 0); glVertex3f (x2, y2, -20); @@ -410,7 +410,7 @@ glTexCoord2f (0, ty); glVertex3f (x1, y1, -20); glTexCoord2f (tx, ty); glVertex3f (x2, y1, -20); glEnd (); - + glPopMatrix (); glDepthFunc (GL_LEQUAL); glDepthMask (GL_TRUE); @@ -447,7 +447,7 @@ tex_w <<= 1; while (tex_h < new_h) tex_h <<= 1; - + if (tex_w != this->tex_width || tex_h != this->tex_height) { char *tmp = calloc (tex_w * tex_h, 4); /* 4 enough until RGBA */ if (this->glBindTextureEXT) @@ -463,7 +463,7 @@ this->tex_width = tex_w; this->tex_height = tex_h; lprintf ("* new texsize: %dx%d\n", tex_w, tex_h); - } + } this->last_width = new_w; this->last_height = new_h; return 1; @@ -486,7 +486,7 @@ tex_w <<= 1; while (tex_h < new_h) tex_h <<= 1; - + if (tex_w != this->tex_width || tex_h != this->tex_height) { char *tmp = calloc (tex_w * tex_h, 4); /* 4 enough until RGBA */ if (this->glBindTextureEXT) @@ -526,7 +526,7 @@ this->tex_width = tex_w; this->tex_height = tex_h; [... 236 lines omitted ...] "video_out_opengl: tried to set unsupported property %d\n", property); } @@ -1664,7 +1664,7 @@ } } -static int opengl_gui_data_exchange (vo_driver_t *this_gen, +static int opengl_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data) { opengl_driver_t *this = (opengl_driver_t *) this_gen; @@ -1679,7 +1679,7 @@ /* lprintf ("expose event\n"); */ if (this->frame[0]) { XExposeEvent * xev = (XExposeEvent *) data; - + if (xev && xev->count == 0) { pthread_mutex_lock (&this->render_action_mutex); if (this->render_action <= RENDER_CLEAN) { @@ -1716,9 +1716,9 @@ &this->render_action_mutex); pthread_mutex_unlock (&this->render_action_mutex); break; - + case XINE_GUI_SEND_DRAWABLE_CHANGED: - + pthread_mutex_lock (&this->render_action_mutex); this->render_action = RENDER_RELEASE; pthread_cond_signal (&this->render_action_cond); @@ -1746,7 +1746,7 @@ if (this->frame[0]) { x11_rectangle_t *rect = data; int x1, y1, x2, y2; - + _x_vo_scale_translate_gui2video(&this->sc, rect->x, rect->y, &x1, &y1); @@ -1775,7 +1775,7 @@ this->render_action = RENDER_EXIT; pthread_cond_signal (&this->render_action_cond); pthread_mutex_unlock (&this->render_action_mutex); - pthread_join (this->render_thread, NULL); + pthread_join (this->render_thread, NULL); pthread_mutex_destroy (&this->render_action_mutex); pthread_cond_destroy (&this->render_action_cond); pthread_cond_destroy (&this->render_return_cond); @@ -1793,7 +1793,7 @@ } _x_alphablend_free(&this->alphablend_extra_data); - + free (this); } @@ -1820,7 +1820,7 @@ opengl_driver_t *this; char **render_fun_names; int i; - + this = (opengl_driver_t *) calloc(1, sizeof(opengl_driver_t)); if (!this) @@ -1834,9 +1834,9 @@ this->sc.dest_size_cb = visual->dest_size_cb; this->sc.user_data = visual->user_data; this->sc.user_ratio = XINE_VO_ASPECT_AUTO; - + _x_alphablend_init (&this->alphablend_extra_data, class->xine); - + this->drawable = visual->d; this->gui_width = this->gui_height = -1; this->last_width = this->last_height = -1; @@ -1846,7 +1846,7 @@ this->ovl_changed = 0; this->xine = class->xine; this->config = config; - + this->vo_driver.get_capabilities = opengl_get_capabilities; this->vo_driver.alloc_frame = opengl_alloc_frame; this->vo_driver.update_frame_format = opengl_update_frame_format; @@ -1864,8 +1864,8 @@ this->yuv2rgb_brightness = 0; this->yuv2rgb_contrast = 128; this->yuv2rgb_saturation = 128; - - this->yuv2rgb_factory = yuv2rgb_factory_init (YUV_FORMAT, YUV_SWAP_MODE, + + this->yuv2rgb_factory = yuv2rgb_factory_init (YUV_FORMAT, YUV_SWAP_MODE, NULL); this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory, this->yuv2rgb_brightness, @@ -1917,7 +1917,7 @@ "it also reduces flickering a lot.\n" "It should not have any performance impact."), 20, NULL, NULL); - + pthread_mutex_init (&this->render_action_mutex, NULL); pthread_cond_init (&this->render_action_cond, NULL); pthread_cond_init (&this->render_return_cond, NULL); @@ -1947,7 +1947,7 @@ xprintf (this->xine, XINE_VERBOSITY_LOG, "video_out_opengl: default visual not OpenGL capable\n" " plugin will only work with clients supporting XINE_GUI_SEND_SELECT_VISUAL.\n"); - + return &this->vo_driver; } @@ -2036,7 +2036,7 @@ */ const plugin_info_t xine_plugin_info[] EXPORTED = { - /* type, API, "name", version, special_info, init_function */ + /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_OUT, 22, "opengl", XINE_VERSION_CODE, &vo_info_opengl, opengl_init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_pgx32.c b/src/video_out/video_out_pgx32.c --- a/src/video_out/video_out_pgx32.c +++ b/src/video_out/video_out_pgx32.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2004 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * xine is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * 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., 51... [truncated message content] |