From f43e6be30fcd0879cb5d1d43e73254950ef6a68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20Ni=C3=9Fl?= Date: Mon, 8 Oct 2007 00:07:30 +0200 Subject: Revert cheating invalid frame sizes after fixed frame allocation (continued). These cheats where hiding a frame allocation bug in FFmpeg decoder which was previously fixed. (transplanted from c7cc5ff1e184791683ba13bdc54c53b5887e6587) --HG-- extra : transplant_source : %C7%CC_%F1%E1%84y%16%83%BA%13%BD%C5LS%B5%88%7Ee%87 --- src/video_out/video_out_xcbshm.c | 5 ----- src/video_out/video_out_xcbxv.c | 5 ----- src/video_out/video_out_xshm.c | 5 ----- 3 files changed, 15 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c index c9b83bb24..2ac579555 100644 --- a/src/video_out/video_out_xcbshm.c +++ b/src/video_out/video_out_xcbshm.c @@ -131,11 +131,6 @@ typedef struct { */ static void create_ximage(xshm_driver_t *this, xshm_frame_t *frame, int width, int height) { - if (width <= 0) - width = 1; - if (height <= 0) - height = 1; - frame->bytes_per_line = ((this->bpp * width + this->scanline_pad - 1) & (~(this->scanline_pad - 1))) >> 3; diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index eef61e4ea..18ab5c6fb 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -211,11 +211,6 @@ static void create_ximage(xv_driver_t *this, xv_frame_t *frame, int width, int h unsigned int length; - if (width <= 0) - width = 1; - if (height <= 0) - height = 1; - if (this->use_pitch_alignment) { width = (width + 7) & ~0x7; } diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index 932f22e3a..9e901821a 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -172,11 +172,6 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo, int width, int height) { XImage *myimage = NULL; - if (width <= 0) - width = 1; - if (height <= 0) - height = 1; - if (this->use_shm) { /* -- cgit v1.2.3 From 3f6141b03a62e3bc33306d3a0abe763e833a50ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20Ni=C3=9Fl?= Date: Thu, 26 Jul 2007 22:03:33 +0200 Subject: report unsupported frame format and abort (transplanted from 65ffd061414c05cbc368e130d1783a2efdc5b75e) --HG-- extra : transplant_source : e%FF%D0aAL%05%CB%C3h%E10%D1x%3A.%FD%C5%B7%5E --- src/video_out/video_out_xvmc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/video_out') diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index d943c61b4..c4d76c1fe 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -764,6 +764,11 @@ static void xvmc_update_frame_format (vo_driver_t *this_gen, xvmc_frame_t *frame = (xvmc_frame_t *) frame_gen; xine_xvmc_t *xvmc = (xine_xvmc_t *) frame_gen->accel_data; + if (format != XINE_IMGFMT_XVMC) { + xprintf (this->xine, XINE_VERBOSITY_LOG, "xvmc_update_frame_format: frame format %08x not supported\n", format); + _x_abort(); + } + lprintf ("xvmc_update_frame_format\n"); if ((frame->width != width) -- cgit v1.2.3 From 681321431323a5e6d4f8a9cbaa629f2e963f61a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20Ni=C3=9Fl?= Date: Thu, 26 Jul 2007 22:07:20 +0200 Subject: report unsupported frame format when blending overlay (transplanted from ce2ba83d5b347bb670e4aaa17a9fbcf21d87a811) --HG-- extra : transplant_source : %CE%2B%A8%3D%5B4%7B%B6p%E4%AA%A1z%9F%BC%F2%1D%87%A8%11 --- src/video_out/video_out_xvmc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/video_out') diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index c4d76c1fe..a17e4d6a0 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -856,6 +856,8 @@ static void xvmc_overlay_blend (vo_driver_t *this_gen, _x_blend_yuy2(frame->vo_frame.base[0], overlay, frame->width, frame->height, frame->vo_frame.pitches[0], &this->alphablend_extra_data); + else + xprintf (this->xine, XINE_VERBOSITY_LOG, "xvmc_overlay_blend: overlay blending not supported for frame format %08x\n", frame->format); } } -- cgit v1.2.3 From 9f911a4387602eba171b314e3cfe02ce0deabf60 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 24 Dec 2007 18:58:26 +0000 Subject: Consistently use "colour", "colour key", "colour space" in output. Some instances of "key colour" remain; ffmpeg is unmodified. This change has caused two strings with two translations to collide (the strings have become identical since some instances already used "colour"). I have therefore arbitrarily dropped the first of the differing translations, the one for the string at src/video_out/video_out_directfb.c:1365. --- src/video_out/video_out_directfb.c | 12 ++++++------ src/video_out/video_out_fb.c | 2 +- src/video_out/video_out_xcbxv.c | 4 ++-- src/video_out/video_out_xv.c | 4 ++-- src/video_out/video_out_xvmc.c | 4 ++-- src/video_out/video_out_xxmc.c | 8 ++++---- src/video_out/vidix/drivers/mga_vid.c | 4 ++-- src/video_out/vidix/drivers/nvidia_vid.c | 4 ++-- src/video_out/vidix/drivers/savage_vid.c | 6 +++--- src/video_out/yuv2rgb.c | 8 ++++---- 10 files changed, 28 insertions(+), 28 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index 3e30f664d..3aa5bf66a 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -1008,7 +1008,7 @@ static int directfb_set_property (vo_driver_t *this_gen, if (value > 0xffffff) value = 0xffffff; xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_directfb: setting colorkey to 0x%06x.\n", value); + "video_out_directfb: setting colour key to 0x%06x.\n", value); this->colorkey = value; this->layer->SetDstColorKey (this->layer, (value & 0xff0000) >> 16, (value & 0x00ff00) >> 8, @@ -1266,7 +1266,7 @@ static void update_config_cb (void *data, xine_cfg_entry_t *entry) { if (config.options != this->config.options) { if (this->layer->SetConfiguration (this->layer, &config) != DFB_OK) { xprintf (this->xine, XINE_VERBOSITY_LOG, - "video_out_directfb: failed to set colorkeying to %d!\n", + "video_out_directfb: failed to set colour keying to %d!\n", entry->num_value); return; } @@ -1354,15 +1354,15 @@ static void init_config (directfb_driver_t *this) { if (this->caps & DLCAPS_DST_COLORKEY) { this->colorkeying = config->register_bool (config, "video.device.directfb_colorkeying", this->colorkeying, - _("enable video color key"), - _("Enable using a color key to tell the graphics card " + _("enable video colour key"), + _("Enable using a colour key to tell the graphics card " "where to overlay the video image."), 20, update_config_cb, (void *)this); this->colorkey = config->register_range (config, "video.device.directfb_colorkey", this->colorkey, 0, 0xffffff, - _("video color key"), - _("The color key is used to tell the graphics card " + _("video colour key"), + _("The colour key is used to tell the graphics card " "where to overlay the video image. Try different values, " "if you experience windows becoming transparent."), 10, update_config_cb, (void *)this); diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index 78d23cd91..2f7fd2d57 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -755,7 +755,7 @@ static int get_fb_fix_screeninfo(int fd, struct fb_fix_screeninfo *fix, xine_t * fix->type != FB_TYPE_PACKED_PIXELS) { xprintf(xine, XINE_VERBOSITY_LOG, - _("video_out_fb: only packed truecolor/directcolor is supported (%d).\n" + _("video_out_fb: only packed truecolour/directcolour is supported (%d).\n" " Check 'fbset -i' or try 'fbset -depth 16'.\n"), fix->visual); return 0; } diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index cb582baab..5b44ea12d 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -1337,7 +1337,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis else xprintf(class->xine, XINE_VERBOSITY_LOG, _("video_out_xcbxv: using Xv port %d from adaptor %s for hardware " - "colorspace conversion and scaling.\n"), xv_port, + "colour space conversion and scaling.\n"), xv_port, xcb_xv_adaptor_info_name(adaptor_it.data)); this->xv_port = xv_port; @@ -1444,7 +1444,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis adaptor_it.data->base_id, "video.device.xv_autopaint_colorkey", _("autopaint colour key"), - _("Make Xv autopaint its colorkey.")); + _("Make Xv autopaint its colour key.")); } else if(!strcmp(xcb_xv_attribute_info_name(attribute_it.data), "XV_FILTER")) { int xv_filter; diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 07b1e1186..7ff7b64e5 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -1380,7 +1380,7 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * else xprintf(class->xine, XINE_VERBOSITY_LOG, _("video_out_xv: using Xv port %ld from adaptor %s for hardware " - "colorspace conversion and scaling.\n"), xv_port, + "colour space conversion and scaling.\n"), xv_port, adaptor_info[adaptor_num].name); UNLOCK_DISPLAY(this); @@ -1497,7 +1497,7 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * adaptor_info[adaptor_num].base_id, "video.device.xv_autopaint_colorkey", _("autopaint colour key"), - _("Make Xv autopaint its colorkey.")); + _("Make Xv autopaint its colour key.")); } else if(!strcmp(attr[k].name, "XV_FILTER")) { int xv_filter; diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index 8f7b1defc..31d4c053d 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -1451,7 +1451,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi class->adaptor_info[class->adaptor_num].base_id, "XV_AUTOPAINT_COLORKEY", "video.device.xv_autopaint_colorkey", _("autopaint colour key"), - _("Make Xv autopaint its colorkey.")); + _("Make Xv autopaint its colour key.")); } else if(!strcmp(attr[k].name, "XV_DOUBLE_BUFFER")) { int xvmc_double_buffer; @@ -1742,7 +1742,7 @@ static void *init_class (xine_t *xine, void *visual_gen) { else { xprintf (xine, XINE_VERBOSITY_LOG, _("video_out_xvmc: using Xv port %ld from adaptor %s\n" - " for hardware colorspace conversion and scaling\n"), + " for hardware colour space conversion and scaling\n"), xv_port, adaptor_info[adaptor_num].name); if(IDCTaccel&XINE_VO_IDCT_ACCEL) diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index db5b753f5..2b27c3982 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -2424,7 +2424,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi else xprintf(class->xine, XINE_VERBOSITY_LOG, _("video_out_xxmc: using Xv port %ld from adaptor %s for hardware " - "colorspace conversion and scaling.\n"), xv_port, + "colour space conversion and scaling.\n"), xv_port, adaptor_info[adaptor_num].name); XUnlockDisplay(this->display); @@ -2535,7 +2535,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi adaptor_info[adaptor_num].base_id, "XV_AUTOPAINT_COLORKEY", "video.device.xv_autopaint_colorkey", _("autopaint colour key"), - _("Make Xv autopaint its colorkey.")); + _("Make Xv autopaint its colour key.")); } else if(!strcmp(attr[k].name, "XV_FILTER")) { int xv_filter; @@ -2647,8 +2647,8 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi 10, xxmc_update_cpu_save, this); this->reverse_nvidia_palette = config->register_bool (config, "video.device.xvmc_nvidia_color_fix", 0, - _("Fix buggy NVIDIA XvMC subpicture colors"), - _("There's a bug in NVIDIA's XvMC lib that makes red OSD colors\n" + _("Fix buggy NVIDIA XvMC subpicture colours"), + _("There's a bug in NVIDIA's XvMC lib that makes red OSD colours\n" "look blue and vice versa. This option provides a workaround.\n"), 10, xxmc_update_nvidia_fix, this); this->bob = diff --git a/src/video_out/vidix/drivers/mga_vid.c b/src/video_out/vidix/drivers/mga_vid.c index eed2b9e65..edebc0c4f 100644 --- a/src/video_out/vidix/drivers/mga_vid.c +++ b/src/video_out/vidix/drivers/mga_vid.c @@ -425,7 +425,7 @@ static void mga_vid_write_regs(int restore) writeb(PALWTADD, XCOLMSK); writeb(X_DATAREG, colkey_mask[3]); - printf(MGA_MSG" Restored colorkey (ON: %d %02X:%02X:%02X)\n", + printf(MGA_MSG" Restored colour key (ON: %d %02X:%02X:%02X)\n", colkey_on,colkey_color[0],colkey_color[1],colkey_color[2]); } else if (!colkey_saved) { @@ -453,7 +453,7 @@ static void mga_vid_write_regs(int restore) writeb(PALWTADD, XCOLMSK); colkey_mask[3]=(unsigned char)readb(X_DATAREG); - printf(MGA_MSG" Saved colorkey (ON: %d %02X:%02X:%02X)\n", + printf(MGA_MSG" Saved colour key (ON: %d %02X:%02X:%02X)\n", colkey_on,colkey_color[0],colkey_color[1],colkey_color[2]); } diff --git a/src/video_out/vidix/drivers/nvidia_vid.c b/src/video_out/vidix/drivers/nvidia_vid.c index 34fa27cb7..e820d58e8 100644 --- a/src/video_out/vidix/drivers/nvidia_vid.c +++ b/src/video_out/vidix/drivers/nvidia_vid.c @@ -955,12 +955,12 @@ int vixSetGrKeys( const vidix_grkey_t * grkey){ if (grkey->ckey.op == CKEY_FALSE) { info->use_colorkey = 0; - printf("[nvidia_vid] colorkeying disabled\n"); + printf("[nvidia_vid] colour keying disabled\n"); } else { info->use_colorkey = 1; info->vidixcolorkey = ((grkey->ckey.red<<16)|(grkey->ckey.green<<8)|grkey->ckey.blue); - printf("[nvidia_vid] set colorkey 0x%x\n",info->vidixcolorkey); + printf("[nvidia_vid] set colour key 0x%x\n",info->vidixcolourkey); } if(info->d_width && info->d_height)rivatv_overlay_start(info,0); return 0; diff --git a/src/video_out/vidix/drivers/savage_vid.c b/src/video_out/vidix/drivers/savage_vid.c index 2ac76198d..0ad7b0b15 100644 --- a/src/video_out/vidix/drivers/savage_vid.c +++ b/src/video_out/vidix/drivers/savage_vid.c @@ -370,7 +370,7 @@ static void SavageSetColorKeyOld(void) blue = info->vidixcolorkey & 0x000000FF; if( !info->vidixcolorkey ) { - printf("SavageSetColorKey disabling colorkey\n"); + printf("SavageSetColorKey disabling colour key\n"); OUTREG( COL_CHROMA_KEY_CONTROL_REG, 0 ); OUTREG( CHROMA_KEY_UPPER_BOUND_REG, 0 ); OUTREG( BLEND_CONTROL_REG, 0 ); @@ -1134,13 +1134,13 @@ vixSetGrKeys (const vidix_grkey_t * grkey) { info->use_colorkey = 0; info->vidixcolorkey=0; - printf("[savage_vid] colorkeying disabled\n"); + printf("[savage_vid] colour keying disabled\n"); } else { info->use_colorkey = 1; info->vidixcolorkey = ((grkey->ckey.red<<16)|(grkey->ckey.green<<8)|grkey->ckey.blue); - printf("[savage_vid] set colorkey 0x%x\n",info->vidixcolorkey); + printf("[savage_vid] set colour key 0x%x\n",info->vidixcolourkey); } //FIXME: freezes if streams arent enabled SavageSetColorKeyOld(); diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c index 0ca6537a7..c98dd518f 100644 --- a/src/video_out/yuv2rgb.c +++ b/src/video_out/yuv2rgb.c @@ -3220,7 +3220,7 @@ yuv2rgb_factory_t* yuv2rgb_factory_init (int mode, int swapped, #ifdef LOG if (this->yuv2rgb_fun != NULL) - printf ("yuv2rgb: using MMXEXT for colorspace transform\n"); + printf ("yuv2rgb: using MMXEXT for colour space transform\n"); #endif } @@ -3230,7 +3230,7 @@ yuv2rgb_factory_t* yuv2rgb_factory_init (int mode, int swapped, #ifdef LOG if (this->yuv2rgb_fun != NULL) - printf ("yuv2rgb: using MMX for colorspace transform\n"); + printf ("yuv2rgb: using MMX for colour space transform\n"); #endif } #endif @@ -3241,12 +3241,12 @@ yuv2rgb_factory_t* yuv2rgb_factory_init (int mode, int swapped, #ifdef LOG if (this->yuv2rgb_fun != NULL) - printf ("yuv2rgb: using medialib for colorspace transform\n"); + printf ("yuv2rgb: using medialib for colour space transform\n"); #endif } #endif if (this->yuv2rgb_fun == NULL) { - lprintf ("no accelerated colorspace conversion found\n"); + lprintf ("no accelerated colour space conversion found\n"); yuv2rgb_c_init (this); } -- cgit v1.2.3 From abe0ca3270213506a3aaa634af660bb5740fd97c Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 26 Dec 2007 23:30:56 +0000 Subject: =?UTF-8?q?Correct=20a=20color=E2=86=92colour=20change=20to=20a=20?= =?UTF-8?q?struct=20member=20name.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/video_out/vidix/drivers/nvidia_vid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_out') diff --git a/src/video_out/vidix/drivers/nvidia_vid.c b/src/video_out/vidix/drivers/nvidia_vid.c index e820d58e8..b051df326 100644 --- a/src/video_out/vidix/drivers/nvidia_vid.c +++ b/src/video_out/vidix/drivers/nvidia_vid.c @@ -960,7 +960,7 @@ int vixSetGrKeys( const vidix_grkey_t * grkey){ else { info->use_colorkey = 1; info->vidixcolorkey = ((grkey->ckey.red<<16)|(grkey->ckey.green<<8)|grkey->ckey.blue); - printf("[nvidia_vid] set colour key 0x%x\n",info->vidixcolourkey); + printf("[nvidia_vid] set colour key 0x%x\n",info->vidixcolorkey); } if(info->d_width && info->d_height)rivatv_overlay_start(info,0); return 0; -- cgit v1.2.3 From 1cadbbbb3a78933f28c113bb8cfab12b25d92ec8 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 26 Dec 2007 23:46:36 +0000 Subject: =?UTF-8?q?Correct=20another=20color=E2=86=92colour=20change=20to?= =?UTF-8?q?=20a=20struct=20member=20name.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/video_out/vidix/drivers/savage_vid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_out') diff --git a/src/video_out/vidix/drivers/savage_vid.c b/src/video_out/vidix/drivers/savage_vid.c index 0ad7b0b15..17040cc15 100644 --- a/src/video_out/vidix/drivers/savage_vid.c +++ b/src/video_out/vidix/drivers/savage_vid.c @@ -1140,7 +1140,7 @@ vixSetGrKeys (const vidix_grkey_t * grkey) info->use_colorkey = 1; info->vidixcolorkey = ((grkey->ckey.red<<16)|(grkey->ckey.green<<8)|grkey->ckey.blue); - printf("[savage_vid] set colour key 0x%x\n",info->vidixcolourkey); + printf("[savage_vid] set colour key 0x%x\n",info->vidixcolorkey); } //FIXME: freezes if streams arent enabled SavageSetColorKeyOld(); -- cgit v1.2.3 From 84e2f56c6cc81e9bed8ba03b29a8c69aa7d08d89 Mon Sep 17 00:00:00 2001 From: Dubois Nicolas Date: Thu, 27 Dec 2007 14:24:48 +0000 Subject: [Subtitles] SSA-tags patch I watch a lot of movies with subtitles and I need "vobsub subtitles" work in xine, then I decide to write this patch. It may support SSA tags for all text subtiles (ssa, ass, srt, ...) This patch : 1. Remove all SSA tags from stream (they are ugly : {\a6}) 2. Handle some of them (b, i, a, an, pos). The other ones control colours, shadow, animation, ... I can't make them work in an easy way. 3. Correct wrap algorithm which have minors bugs (we can see them only with SSA patch...) Modified files : libsputext/demux_sputext.c just remove unneeded code (which remove some of SSA-tags) libsputext/xine_sputext_decoder.c the main modified file. video_out/video_out_xshm.c video_out/video_out_xv.c xine-engine/video_out.h get video output (position and size). See below. 1. Removing SSA tags is done in ogm_render_line_internal() like for html-like tags. (this was done in the previous version of xine) 2. b(bold) and i(italic) are implemented like html-ones, in ogm_render_line_internal(). The other tags this patch support are : aX : alignment in SSA-code anX : alignment in numpad code pos(X,Y) : position, depend on alignment For those ones, I need in first a full-screen OSD, not a five lines one. Then, I need to remember where the last subtitle was drawn, in order to erase it. At last, I need a translation function to convert subtitle coordinates in screen coordinates. For this last point, I first write a full-screen translation (don't care about blacks borders), but it's not really good: the 'pos' tag is sometime used to point out something in the video. (Moreover, ASS spec say we have to draw subtitle on the video) For doing this, I need the real video output size and position, which are only know by the video output driver! Then I had 4 VO properties (in xine-engine/video_out.h) for video driver could give us those informations. I implement it only in xshm and xv drivers (I can't test other ones). If video driver can't give us those informations, the patch fallback in a full-screen translation. 3. there was 3 problem with the wrap algorithm : 1. It was in double: exactly the same, twice. Look like a merge problem. I remove one and all work fine. 2. It want to cut string in equivalent display length but it cut it in equivalent byte length. In most cases, this is the same, but if we have UTF-8 chars or long SSA-tags (which will not be displayed) the result is strange. 3. If we have a too-long part (in bytes) of the string without spaces (bad subtitle file or long SSA-code), the algorithm don't know what to do. (this case is not handled) I re-write the wrap algorithm to correct those problems. Note that my version is slower than previous one : working with bytes is really faster than computing text-length. Maybe I should had to propose an other patch for this part... --- src/video_out/video_out_xshm.c | 8 ++++++++ src/video_out/video_out_xv.c | 12 ++++++++++++ 2 files changed, 20 insertions(+) (limited to 'src/video_out') diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index bf0d3b7f0..932f22e3a 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -820,6 +820,14 @@ static int xshm_get_property (vo_driver_t *this_gen, int property) { return this->sc.gui_width; case VO_PROP_WINDOW_HEIGHT: return this->sc.gui_height; + case VO_PROP_OUTPUT_WIDTH: + return this->cur_frame->sc.output_width; + case VO_PROP_OUTPUT_HEIGHT: + return this->cur_frame->sc.output_height; + case VO_PROP_OUTPUT_XOFFSET: + return this->cur_frame->sc.output_xoffset; + case VO_PROP_OUTPUT_YOFFSET: + return this->cur_frame->sc.output_yoffset; default: xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_xshm: tried to get unsupported property %d\n", property); diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 7ff7b64e5..3bb0a93dc 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -871,6 +871,18 @@ static int xv_get_property (vo_driver_t *this_gen, int property) { case VO_PROP_WINDOW_HEIGHT: this->props[property].value = this->sc.gui_height; break; + case VO_PROP_OUTPUT_WIDTH: + this->props[property].value = this->sc.output_width; + break; + case VO_PROP_OUTPUT_HEIGHT: + this->props[property].value = this->sc.output_height; + break; + case VO_PROP_OUTPUT_XOFFSET: + this->props[property].value = this->sc.output_xoffset; + break; + case VO_PROP_OUTPUT_YOFFSET: + this->props[property].value = this->sc.output_yoffset; + break; } lprintf("video_out_xv: property #%d = %d\n", property, this->props[property].value); -- cgit v1.2.3 From 1ea97db5f08e85e7a9da249e2061b33b93dc8e79 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 27 Dec 2007 18:24:55 +0000 Subject: Add VO_PROP_OUTPUT_* to some other video output drivers (where trivial). --- src/video_out/video_out_directfb.c | 14 +++++++++++++- src/video_out/video_out_fb.c | 14 +++++++++++++- src/video_out/video_out_sdl.c | 8 ++++++++ src/video_out/video_out_syncfb.c | 12 ++++++++++++ src/video_out/video_out_vidix.c | 12 ++++++++++++ src/video_out/video_out_xcbshm.c | 8 ++++++++ src/video_out/video_out_xcbxv.c | 12 ++++++++++++ src/video_out/video_out_xvmc.c | 12 ++++++++++++ src/video_out/video_out_xxmc.c | 12 ++++++++++++ 9 files changed, 102 insertions(+), 2 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index 3aa5bf66a..9786049b4 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -922,7 +922,19 @@ static int directfb_get_property (vo_driver_t *this_gen, int property) { case VO_PROP_WINDOW_HEIGHT: return this->sc.gui_height; - + + case VO_PROP_OUTPUT_WIDTH: + return this->cur_frame->sc.output_width; + + case VO_PROP_OUTPUT_HEIGHT: + return this->cur_frame->sc.output_height; + + case VO_PROP_OUTPUT_XOFFSET: + return this->cur_frame->sc.output_xoffset; + + case VO_PROP_OUTPUT_YOFFSET: + return this->cur_frame->sc.output_yoffset; + case VO_PROP_MAX_NUM_FRAMES: return (this->type & DLTF_VIDEO) ? 8 : 15; diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index 2f7fd2d57..95060a4d8 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -612,7 +612,19 @@ static int fb_get_property(vo_driver_t *this_gen, int property) case VO_PROP_WINDOW_HEIGHT: return this->sc.gui_height; - + + case VO_PROP_OUTPUT_WIDTH: + return this->cur_frame->sc.output_width; + + case VO_PROP_OUTPUT_HEIGHT: + return this->cur_frame->sc.output_height; + + case VO_PROP_OUTPUT_XOFFSET: + return this->cur_frame->sc.output_xoffset; + + case VO_PROP_OUTPUT_YOFFSET: + return this->cur_frame->sc.output_yoffset; + default: xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_fb: tried to get unsupported property %d\n", property); diff --git a/src/video_out/video_out_sdl.c b/src/video_out/video_out_sdl.c index f4f645e8c..6705b4176 100644 --- a/src/video_out/video_out_sdl.c +++ b/src/video_out/video_out_sdl.c @@ -360,6 +360,14 @@ static int sdl_get_property (vo_driver_t *this_gen, int property) { return this->sc.gui_width; case VO_PROP_WINDOW_HEIGHT: return this->sc.gui_height; + case VO_PROP_OUTPUT_WIDTH: + return this->sc.output_width; + case VO_PROP_OUTPUT_HEIGHT: + return this->sc.output_height; + case VO_PROP_OUTPUT_XOFFSET: + return this->sc.output_xoffset; + case VO_PROP_OUTPUT_YOFFSET: + return this->sc.output_yoffset; case VO_PROP_ASPECT_RATIO: return this->sc.user_ratio; } diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index 86be3422e..b1fadbd58 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.c @@ -670,6 +670,18 @@ static int syncfb_get_property(vo_driver_t* this_gen, int property) case VO_PROP_WINDOW_HEIGHT: this->props[property].value = this->sc.gui_height; break; + case VO_PROP_OUTPUT_WIDTH: + this->props[property].value = this->sc.output_width; + break; + case VO_PROP_OUTPUT_HEIGHT: + this->props[property].value = this->sc.output_height; + break; + case VO_PROP_OUTPUT_XOFFSET: + this->props[property].value = this->sc.output_xoffset; + break; + case VO_PROP_OUTPUT_YOFFSET: + this->props[property].value = this->sc.output_yoffset; + break; } return this->props[property].value; diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c index 21e361d93..9e3f870b1 100644 --- a/src/video_out/video_out_vidix.c +++ b/src/video_out/video_out_vidix.c @@ -700,6 +700,18 @@ static int vidix_get_property (vo_driver_t *this_gen, int property) { case VO_PROP_WINDOW_HEIGHT: this->props[property].value = this->sc.gui_height; break; + case VO_PROP_OUTPUT_WIDTH: + this->props[property].value = this->sc.output_width; + break; + case VO_PROP_OUTPUT_HEIGHT: + this->props[property].value = this->sc.output_height; + break; + case VO_PROP_OUTPUT_XOFFSET: + this->props[property].value = this->sc.output_xoffset; + break; + case VO_PROP_OUTPUT_YOFFSET: + this->props[property].value = this->sc.output_yoffset; + break; } lprintf ("video_out_vidix: property #%d = %d\n", property, diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c index 725889d62..c9b83bb24 100644 --- a/src/video_out/video_out_xcbshm.c +++ b/src/video_out/video_out_xcbshm.c @@ -732,6 +732,14 @@ static int xshm_get_property (vo_driver_t *this_gen, int property) { return this->sc.gui_width; case VO_PROP_WINDOW_HEIGHT: return this->sc.gui_height; + case VO_PROP_OUTPUT_WIDTH: + return this->cur_frame->sc.output_width; + case VO_PROP_OUTPUT_HEIGHT: + return this->cur_frame->sc.output_height; + case VO_PROP_OUTPUT_XOFFSET: + return this->cur_frame->sc.output_xoffset; + case VO_PROP_OUTPUT_YOFFSET: + return this->cur_frame->sc.output_yoffset; default: xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_xcbshm: tried to get unsupported property %d\n", property); diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index 5b44ea12d..eef61e4ea 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -771,6 +771,18 @@ static int xv_get_property (vo_driver_t *this_gen, int property) { case VO_PROP_WINDOW_HEIGHT: this->props[property].value = this->sc.gui_height; break; + case VO_PROP_OUTPUT_WIDTH: + this->props[property].value = this->sc.output_width; + break; + case VO_PROP_OUTPUT_HEIGHT: + this->props[property].value = this->sc.output_height; + break; + case VO_PROP_OUTPUT_XOFFSET: + this->props[property].value = this->sc.output_xoffset; + break; + case VO_PROP_OUTPUT_YOFFSET: + this->props[property].value = this->sc.output_yoffset; + break; } lprintf("video_out_xcbxv: property #%d = %d\n", property, this->props[property].value); diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index 31d4c053d..d943c61b4 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -1002,6 +1002,18 @@ static int xvmc_get_property (vo_driver_t *this_gen, int property) { case VO_PROP_WINDOW_HEIGHT: this->props[property].value = this->sc.gui_height; break; + case VO_PROP_OUTPUT_WIDTH: + this->props[property].value = this->sc.output_width; + break; + case VO_PROP_OUTPUT_HEIGHT: + this->props[property].value = this->sc.output_height; + break; + case VO_PROP_OUTPUT_XOFFSET: + this->props[property].value = this->sc.output_xoffset; + break; + case VO_PROP_OUTPUT_YOFFSET: + this->props[property].value = this->sc.output_yoffset; + break; } return this->props[property].value; diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index 2b27c3982..28679e95d 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -1760,6 +1760,18 @@ static int xxmc_get_property (vo_driver_t *this_gen, int property) { case VO_PROP_WINDOW_HEIGHT: this->props[property].value = this->sc.gui_height; break; + case VO_PROP_OUTPUT_WIDTH: + this->props[property].value = this->sc.output_width; + break; + case VO_PROP_OUTPUT_HEIGHT: + this->props[property].value = this->sc.output_height; + break; + case VO_PROP_OUTPUT_XOFFSET: + this->props[property].value = this->sc.output_xoffset; + break; + case VO_PROP_OUTPUT_YOFFSET: + this->props[property].value = this->sc.output_yoffset; + break; } lprintf("video_out_xxmc: property #%d = %d\n", property, this->props[property].value); -- cgit v1.2.3 From 6dbb05a4cba3cdc811308762058d722f11464683 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 30 Dec 2007 15:55:03 +0000 Subject: =?UTF-8?q?Manual=20port=20of=20the=20color=E2=86=92colour=20chang?= =?UTF-8?q?e=20to=201.2;=20should=20make=20merging=20easier.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/video_out/video_out_directfb.c | 16 ++++++++-------- src/video_out/video_out_fb.c | 2 +- src/video_out/video_out_xcbxv.c | 4 ++-- src/video_out/video_out_xv.c | 4 ++-- src/video_out/video_out_xvmc.c | 4 ++-- src/video_out/video_out_xxmc.c | 8 ++++---- src/video_out/yuv2rgb.c | 8 ++++---- 7 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index 39a7917ba..943eec681 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -155,7 +155,7 @@ typedef struct { #define DEFAULT_COLORKEY 0x202040 #define DIRECTFB_OPTIONS "no-banner,"\ - "bg-color=00000000,"\ + "bg-colour=00000000,"\ "no-vt-switch,"\ "no-vt-switching,"\ "no-sighandler,"\ @@ -504,7 +504,7 @@ static void directfb_subpicture_paint (directfb_driver_t *this, colors[index].a = alpha | (alpha << 4); } - lprintf ("color change to %02x%02x%02x%02x.\n", + lprintf ("colour change to %02x%02x%02x%02x.\n", colors[index].a, colors[index].r, colors[index].g, colors[index].b); this->spic_surface->SetColor (this->spic_surface, @@ -1008,7 +1008,7 @@ static int directfb_set_property (vo_driver_t *this_gen, if (value > 0xffffff) value = 0xffffff; xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_directfb: setting colorkey to 0x%06x.\n", value); + "video_out_directfb: setting colour key to 0x%06x.\n", value); this->colorkey = value; this->layer->SetDstColorKey (this->layer, (value & 0xff0000) >> 16, (value & 0x00ff00) >> 8, @@ -1266,7 +1266,7 @@ static void update_config_cb (void *data, xine_cfg_entry_t *entry) { if (config.options != this->config.options) { if (this->layer->SetConfiguration (this->layer, &config) != DFB_OK) { xprintf (this->xine, XINE_VERBOSITY_LOG, - "video_out_directfb: failed to set colorkeying to %d!\n", + "video_out_directfb: failed to set colour keying to %d!\n", entry->num_value); return; } @@ -1354,15 +1354,15 @@ static void init_config (directfb_driver_t *this) { if (this->caps & DLCAPS_DST_COLORKEY) { this->colorkeying = config->register_bool (config, "video.device.directfb_colorkeying", this->colorkeying, - _("enable video color key"), - _("Enable using a color key to tell the graphics card " + _("enable video colour key"), + _("Enable using a colour key to tell the graphics card " "where to overlay the video image."), 20, update_config_cb, (void *)this); this->colorkey = config->register_range (config, "video.device.directfb_colorkey", this->colorkey, 0, 0xffffff, - _("video color key"), - _("The color key is used to tell the graphics card " + _("video colour key"), + _("The colour key is used to tell the graphics card " "where to overlay the video image. Try different values, " "if you experience windows becoming transparent."), 10, update_config_cb, (void *)this); diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index 4914548a1..1e95e5a71 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -743,7 +743,7 @@ static int get_fb_fix_screeninfo(int fd, struct fb_fix_screeninfo *fix, xine_t * fix->type != FB_TYPE_PACKED_PIXELS) { xprintf(xine, XINE_VERBOSITY_LOG, - _("video_out_fb: only packed truecolor/directcolor is supported (%d).\n" + _("video_out_fb: only packed truecolour/directcolour is supported (%d).\n" " Check 'fbset -i' or try 'fbset -depth 16'.\n"), fix->visual); return 0; } diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index dff973317..f3650a6dd 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -1169,7 +1169,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis else xprintf(class->xine, XINE_VERBOSITY_LOG, _("%s: using Xv port %d from adaptor %s for hardware " - "colorspace conversion and scaling.\n"), LOG_MODULE, xv_port, + "colour space conversion and scaling.\n"), LOG_MODULE, xv_port, xcb_xv_adaptor_info_name(adaptor_it.data)); this->xv_port = xv_port; @@ -1273,7 +1273,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis adaptor_it.data->base_id, "video.device.xv_autopaint_colorkey", _("autopaint colour key"), - _("Make Xv autopaint its colorkey.")); + _("Make Xv autopaint its colour key.")); } else if(!strcmp(xcb_xv_attribute_info_name(attribute_it.data), "XV_FILTER")) { int xv_filter; diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 10e13ab3c..b99f8eae2 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -1212,7 +1212,7 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * else xprintf(class->xine, XINE_VERBOSITY_LOG, _("%s: using Xv port %ld from adaptor %s for hardware " - "colorspace conversion and scaling.\n"), LOG_MODULE, xv_port, + "colour space conversion and scaling.\n"), LOG_MODULE, xv_port, adaptor_info[adaptor_num].name); UNLOCK_DISPLAY(this); @@ -1326,7 +1326,7 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * adaptor_info[adaptor_num].base_id, "video.device.xv_autopaint_colorkey", _("autopaint colour key"), - _("Make Xv autopaint its colorkey.")); + _("Make Xv autopaint its colour key.")); } else if(!strcmp(attr[k].name, "XV_FILTER")) { int xv_filter; diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index 91db684da..8d7b5737d 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -1421,7 +1421,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi class->adaptor_info[class->adaptor_num].base_id, "XV_AUTOPAINT_COLORKEY", "video.device.xv_autopaint_colorkey", _("autopaint colour key"), - _("Make Xv autopaint its colorkey.")); + _("Make Xv autopaint its colour key.")); } else if(!strcmp(attr[k].name, "XV_DOUBLE_BUFFER")) { int xvmc_double_buffer; @@ -1645,7 +1645,7 @@ static void *init_class (xine_t *xine, void *visual_gen) { else { xprintf (xine, XINE_VERBOSITY_LOG, _("video_out_xvmc: using Xv port %ld from adaptor %s\n" - " for hardware colorspace conversion and scaling\n"), + " for hardware colour space conversion and scaling\n"), xv_port, adaptor_info[adaptor_num].name); if(IDCTaccel&XINE_VO_IDCT_ACCEL) diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index c66566233..6e99d765c 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -2457,7 +2457,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi else xprintf(class->xine, XINE_VERBOSITY_LOG, _("%s: using Xv port %ld from adaptor %s for hardware " - "colorspace conversion and scaling.\n"), LOG_MODULE, xv_port, + "colour space conversion and scaling.\n"), LOG_MODULE, xv_port, adaptor_info[adaptor_num].name); XUnlockDisplay(this->display); @@ -2568,7 +2568,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi adaptor_info[adaptor_num].base_id, "XV_AUTOPAINT_COLORKEY", "video.device.xv_autopaint_colorkey", _("autopaint colour key"), - _("Make Xv autopaint its colorkey.")); + _("Make Xv autopaint its colour key.")); } else if(!strcmp(attr[k].name, "XV_FILTER")) { int xv_filter; @@ -2680,8 +2680,8 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi 10, xxmc_update_cpu_save, this); this->reverse_nvidia_palette = config->register_bool (config, "video.device.xvmc_nvidia_color_fix", 0, - _("Fix buggy NVIDIA XvMC subpicture colors"), - _("There's a bug in NVIDIA's XvMC lib that makes red OSD colors\n" + _("Fix buggy NVIDIA XvMC subpicture colours"), + _("There's a bug in NVIDIA's XvMC lib that makes red OSD colours\n" "look blue and vice versa. This option provides a workaround.\n"), 10, xxmc_update_nvidia_fix, this); this->bob = diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c index f1ad4dba8..2a3ba57fd 100644 --- a/src/video_out/yuv2rgb.c +++ b/src/video_out/yuv2rgb.c @@ -3220,7 +3220,7 @@ yuv2rgb_factory_t* yuv2rgb_factory_init (int mode, int swapped, #ifdef LOG if (this->yuv2rgb_fun != NULL) - printf ("yuv2rgb: using MMXEXT for colorspace transform\n"); + printf ("yuv2rgb: using MMXEXT for colour space transform\n"); #endif } @@ -3230,7 +3230,7 @@ yuv2rgb_factory_t* yuv2rgb_factory_init (int mode, int swapped, #ifdef LOG if (this->yuv2rgb_fun != NULL) - printf ("yuv2rgb: using MMX for colorspace transform\n"); + printf ("yuv2rgb: using MMX for colour space transform\n"); #endif } #endif @@ -3241,12 +3241,12 @@ yuv2rgb_factory_t* yuv2rgb_factory_init (int mode, int swapped, #ifdef LOG if (this->yuv2rgb_fun != NULL) - printf ("yuv2rgb: using medialib for colorspace transform\n"); + printf ("yuv2rgb: using medialib for colour space transform\n"); #endif } #endif if (this->yuv2rgb_fun == NULL) { - lprintf ("no accelerated colorspace conversion found\n"); + lprintf ("no accelerated colour space conversion found\n"); yuv2rgb_c_init (this); } -- cgit v1.2.3 From 827f7684690ba127f6477a1d32548dd14d3c79bb Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 31 Dec 2007 13:51:07 +0000 Subject: Build fix: back out the SSA subtitles change from the DirectFB video-out plugin. --- src/video_out/video_out_directfb.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index 9786049b4..e6e333a0c 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -923,18 +923,6 @@ static int directfb_get_property (vo_driver_t *this_gen, int property) { case VO_PROP_WINDOW_HEIGHT: return this->sc.gui_height; - case VO_PROP_OUTPUT_WIDTH: - return this->cur_frame->sc.output_width; - - case VO_PROP_OUTPUT_HEIGHT: - return this->cur_frame->sc.output_height; - - case VO_PROP_OUTPUT_XOFFSET: - return this->cur_frame->sc.output_xoffset; - - case VO_PROP_OUTPUT_YOFFSET: - return this->cur_frame->sc.output_yoffset; - case VO_PROP_MAX_NUM_FRAMES: return (this->type & DLTF_VIDEO) ? 8 : 15; -- cgit v1.2.3 From 284db4a4fc4941b7a3b903d3ab23b04840517fd1 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Tue, 1 Jan 2008 17:31:12 +0000 Subject: Avoid potential install-time mislinkage against libxine.so.2. --- src/video_out/Makefile.am | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index 408eb1e95..c40535d9e 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -103,7 +103,7 @@ xineplug_LTLIBRARIES = $(xshm_module) $(xv_module) $(xvmc_module) \ xineplug_vo_out_none.la xineplug_vo_out_xcbshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c video_out_xcbshm.c $(XCBOSD) -xineplug_vo_out_xcbshm_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(XCB_LIBS) $(XCBSHM_LIBS) $(LTLIBINTL) +xineplug_vo_out_xcbshm_la_LIBADD = $(XINE_LIB) $(MLIB_LIBS) $(PTHREAD_LIBS) $(XCB_LIBS) $(XCBSHM_LIBS) $(LTLIBINTL) xineplug_vo_out_xcbshm_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS) $(XCB_CFLAGS) $(XCBSHM_CFLAGS) xineplug_vo_out_xcbxv_la_SOURCES = deinterlace.c video_out_xcbxv.c $(XCBOSD) @@ -112,20 +112,20 @@ xineplug_vo_out_xcbxv_la_CFLAGS = $(VISIBILITY_FLAG) $(XCB_CFLAGS) $(XCBXV_CFLAG xineplug_vo_out_xshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_xshm.c $(X11OSD) -xineplug_vo_out_xshm_la_LIBADD = $(MLIB_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) +xineplug_vo_out_xshm_la_LIBADD = $(XINE_LIB) $(MLIB_LIBS) $(X_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_xshm_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing xineplug_vo_out_xv_la_SOURCES = $(X11OSD) deinterlace.c video_out_xv.c -xineplug_vo_out_xv_la_LIBADD = $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) +xineplug_vo_out_xv_la_LIBADD = $(XINE_LIB) $(XV_LIBS) $(X_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_xv_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing xineplug_vo_out_xvmc_la_SOURCES = deinterlace.c video_out_xvmc.c -xineplug_vo_out_xvmc_la_LIBADD = $(XVMC_LIBS) $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) +xineplug_vo_out_xvmc_la_LIBADD = $(XINE_LIB) $(XVMC_LIBS) $(XV_LIBS) $(X_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_xvmc_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) xineplug_vo_out_xxmc_la_SOURCES = $(X11OSD) deinterlace.c video_out_xxmc.c\ xvmc_mocomp.c xvmc_vld.c xxmc.h -xineplug_vo_out_xxmc_la_LIBADD = $(XXMC_LIBS) $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) +xineplug_vo_out_xxmc_la_LIBADD = $(XINE_LIB) $(XXMC_LIBS) $(XV_LIBS) $(X_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_xxmc_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing xineplug_vo_out_opengl_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ @@ -135,7 +135,7 @@ xineplug_vo_out_opengl_la_LIBADD = $(MLIB_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \ xineplug_vo_out_opengl_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing xineplug_vo_out_syncfb_la_SOURCES = video_out_syncfb.c -xineplug_vo_out_syncfb_la_LIBADD = $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) +xineplug_vo_out_syncfb_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_syncfb_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_vo_out_pgx64_la_SOURCES = video_out_pgx64.c @@ -147,22 +147,22 @@ xineplug_vo_out_pgx32_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD xineplug_vo_out_pgx32_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(SUNDGA_CFLAGS) xineplug_vo_out_vidix_la_SOURCES = video_out_vidix.c $(X11OSD) -xineplug_vo_out_vidix_la_LIBADD = $(XINE_LIB) $(X_LIBS) \ +xineplug_vo_out_vidix_la_LIBADD = $(XINE_LIB) $(X_LIBS) \ $(top_builddir)/src/video_out/vidix/libvidix.la $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_vidix_la_CFLAGS = $(VISIBILITY_FLAG) $(VIDIX_CFLAGS) $(X_CFLAGS) -fno-strict-aliasing xineplug_vo_out_aa_la_SOURCES = video_out_aa.c -xineplug_vo_out_aa_la_LIBADD = $(AALIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) +xineplug_vo_out_aa_la_LIBADD = $(XINE_LIB) $(AALIB_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_aa_la_CFLAGS = $(VISIBILITY_FLAG) $(AALIB_CFLAGS) xineplug_vo_out_caca_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_caca.c -xineplug_vo_out_caca_la_LIBADD = $(CACA_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) +xineplug_vo_out_caca_la_LIBADD = $(XINE_LIB) $(CACA_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_caca_la_CFLAGS = $(VISIBILITY_FLAG) $(CACA_CFLAGS) xineplug_vo_out_fb_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_fb.c -xineplug_vo_out_fb_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) +xineplug_vo_out_fb_la_LIBADD = $(XINE_LIB) $(MLIB_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_fb_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS) xineplug_vo_out_directfb_la_SOURCES = video_out_directfb_fb.c @@ -174,7 +174,7 @@ xineplug_vo_out_xdirectfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS) $(X_LIBS) $(P xineplug_vo_out_xdirectfb_la_CFLAGS = $(VISIBILITY_FLAG) $(DIRECTFB_CFLAGS) -fno-strict-aliasing xineplug_vo_out_sdl_la_SOURCES = video_out_sdl.c -xineplug_vo_out_sdl_la_LIBADD = $(SDL_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) +xineplug_vo_out_sdl_la_LIBADD = $(XINE_LIB) $(SDL_LIBS) $(X_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_sdl_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(SDL_CFLAGS) xineplug_vo_out_stk_la_SOURCES = video_out_stk.c @@ -183,7 +183,7 @@ xineplug_vo_out_stk_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBSTK_CFLAGS) xineplug_vo_out_directx_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c video_out_directx.c xineplug_vo_out_directx_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS) -xineplug_vo_out_directx_la_LIBADD = $(DIRECTX_VIDEO_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) +xineplug_vo_out_directx_la_LIBADD = $(XINE_LIB) $(DIRECTX_VIDEO_LIBS) $(PTHREAD_LIBS) xineplug_vo_out_directx_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_vo_out_none_la_SOURCES = video_out_none.c -- cgit v1.2.3 From a4de43679f434ab5d7b5cc71e33919f2895aa30b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 18:50:10 +0100 Subject: Return value is a constant string. --- src/video_out/video_out_xcbshm.c | 4 ++-- src/video_out/video_out_xshm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c index 376099e8f..1f649dfd4 100644 --- a/src/video_out/video_out_xcbshm.c +++ b/src/video_out/video_out_xcbshm.c @@ -978,8 +978,8 @@ static int ImlibPaletteLUTGet(xshm_driver_t *this) { return 0; } - -static char *visual_class_name(xcb_visualtype_t *visual) { +/* TODO replace this with a string table. */ +static const char *visual_class_name(xcb_visualtype_t *visual) { switch (visual->_class) { case XCB_VISUAL_CLASS_STATIC_GRAY: diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index cce57f27a..f6f6bafbe 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -1053,7 +1053,7 @@ static int ImlibPaletteLUTGet(xshm_driver_t *this) { } -static char *visual_class_name(Visual *visual) { +static const char *visual_class_name(Visual *visual) { switch (visual->class) { case StaticGray: -- cgit v1.2.3 From 25a5633731f8f2fa0809d51b657c7c46dcccb739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 19:02:25 +0100 Subject: The device name is constant. --- src/video_out/video_out_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_out') diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index d45989e14..5c7ec15aa 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -809,7 +809,7 @@ static void register_callbacks(fb_driver_t *this) static int open_fb_device(config_values_t *config, xine_t *xine) { static const char devkey[] = "video.device.fb_device"; - char *device_name; + const char *device_name; int fd; /* This config entry is security critical, is it really necessary -- cgit v1.2.3 From 4df6e806989eec14c08afac263601c6fd236402e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 19:02:54 +0100 Subject: Make xv_check_capability accept constant strings. --- src/video_out/video_out_xv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 208e8600f..d6419c00b 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -1030,9 +1030,9 @@ static int xv_check_yv12 (Display *display, XvPortID port) { static void xv_check_capability (xv_driver_t *this, int property, XvAttribute attr, int base_id, - char *config_name, - char *config_desc, - char *config_help) { + const char *config_name, + const char *config_desc, + const char *config_help) { int int_default; cfg_entry_t *entry; char *str_prop = attr.name; -- cgit v1.2.3 From 071cd3391da7002f5e33735801a0e96e4bd5e37a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 19:03:55 +0100 Subject: Make scale_line description constant. Changing this to a character array would be nice, but the 45->64 conversion has a long string. --- src/video_out/yuv2rgb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_out') diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c index 2a3ba57fd..4cefe5e98 100644 --- a/src/video_out/yuv2rgb.c +++ b/src/video_out/yuv2rgb.c @@ -1261,7 +1261,7 @@ static scale_line_func_t find_scale_line_func(int step) { int src_step; int dest_step; scale_line_func_t func; - char *desc; + const char *desc; /* FIXME: consider moving this to a char[] to avoid reloc */ } scale_line[] = { { 15, 16, scale_line_15_16, "dvd 4:3(pal)" }, { 45, 64, scale_line_45_64, "dvd 16:9(pal), fullscreen(1024x768)" }, -- cgit v1.2.3 From 760c9b664fb211d720111b2e462092180acae44c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 3 Jan 2008 01:25:57 +0100 Subject: Replace _x_vo_scale_aspect_ratio_name() function with a string table, all the uses already check for the index not to go over ther expected one. --- src/video_out/video_out_directfb.c | 2 +- src/video_out/video_out_fb.c | 2 +- src/video_out/video_out_opengl.c | 2 +- src/video_out/video_out_sdl.c | 2 +- src/video_out/video_out_stk.c | 2 +- src/video_out/video_out_vidix.c | 8 ++++---- src/video_out/video_out_xcbshm.c | 2 +- src/video_out/video_out_xshm.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index 364c0ab30..d85df411a 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -949,7 +949,7 @@ static int directfb_set_property (vo_driver_t *this_gen, value = XINE_VO_ASPECT_NUM_RATIOS-1; xprintf (this->xine, XINE_VERBOSITY_DEBUG, "video_out_directfb: aspect ratio changed to %s.\n", - _x_vo_scale_aspect_ratio_name (value)); + _x_vo_scale_aspect_ratio_name_table[value]); this->sc.user_ratio = value; _x_vo_scale_compute_ideal_size (&this->sc); this->sc.force_redraw = 1; diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index 5c7ec15aa..17224ecad 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -632,7 +632,7 @@ static int fb_set_property(vo_driver_t *this_gen, int property, int value) value = XINE_VO_ASPECT_AUTO; this->sc.user_ratio = value; xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_fb: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); + "video_out_fb: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name_table[value]); break; case VO_PROP_BRIGHTNESS: diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index 466aeda27..21383453e 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -1613,7 +1613,7 @@ static int opengl_set_property (vo_driver_t *this_gen, this->sc.force_redraw = 1; /* trigger re-calc of output size */ xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_opengl: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); + "video_out_opengl: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name_table[value]); break; case VO_PROP_BRIGHTNESS: this->yuv2rgb_brightness = value; diff --git a/src/video_out/video_out_sdl.c b/src/video_out/video_out_sdl.c index de9736845..13a84475d 100644 --- a/src/video_out/video_out_sdl.c +++ b/src/video_out/video_out_sdl.c @@ -384,7 +384,7 @@ static int sdl_set_property (vo_driver_t *this_gen, value = XINE_VO_ASPECT_AUTO; this->sc.user_ratio = value; xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_sdl: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); + "video_out_sdl: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name_table[value]); sdl_compute_ideal_size (this); this->sc.force_redraw = 1; diff --git a/src/video_out/video_out_stk.c b/src/video_out/video_out_stk.c index ba4687b08..e68efb30b 100644 --- a/src/video_out/video_out_stk.c +++ b/src/video_out/video_out_stk.c @@ -327,7 +327,7 @@ static int stk_set_property (vo_driver_t* this_gen, int property, int value) { value = XINE_VO_ASPECT_AUTO; this->sc.user_ratio = value; xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_stk: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); + "video_out_stk: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name_table[value]); stk_compute_ideal_size (this); this->sc.force_redraw = 1; diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c index d0a45a58c..f4b74ad2a 100644 --- a/src/video_out/video_out_vidix.c +++ b/src/video_out/video_out_vidix.c @@ -733,12 +733,12 @@ static int vidix_set_property (vo_driver_t *this_gen, this->props[property].value = value; if ( property == VO_PROP_ASPECT_RATIO) { - lprintf("video_out_vidix: aspect ratio changed to %s\n", - _x_vo_scale_aspect_ratio_name(value)); - - if(value == XINE_VO_ASPECT_NUM_RATIOS) + if(value >= XINE_VO_ASPECT_NUM_RATIOS) value = this->props[property].value = XINE_VO_ASPECT_AUTO; + lprintf("video_out_vidix: aspect ratio changed to %s\n", + _x_vo_scale_aspect_ratio_name_table[value]); + this->sc.user_ratio = value; vidix_compute_ideal_size (this); this->sc.force_redraw = 1; diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c index 1f649dfd4..bb19058f5 100644 --- a/src/video_out/video_out_xcbshm.c +++ b/src/video_out/video_out_xcbshm.c @@ -756,7 +756,7 @@ static int xshm_set_property (vo_driver_t *this_gen, value = XINE_VO_ASPECT_AUTO; this->sc.user_ratio = value; xprintf(this->xine, XINE_VERBOSITY_DEBUG, - LOG_MODULE ": aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); + LOG_MODULE ": aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name_table[value]); } else if (property == VO_PROP_BRIGHTNESS) { diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index f6f6bafbe..ecaf61f06 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -845,7 +845,7 @@ static int xshm_set_property (vo_driver_t *this_gen, value = XINE_VO_ASPECT_AUTO; this->sc.user_ratio = value; xprintf(this->xine, XINE_VERBOSITY_DEBUG, - LOG_MODULE ": aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); + LOG_MODULE ": aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name_table[value]); } else if (property == VO_PROP_BRIGHTNESS) { -- cgit v1.2.3