diff options
-rw-r--r-- | device.c | 9 | ||||
-rw-r--r-- | device.h | 3 | ||||
-rw-r--r-- | frontend.c | 15 | ||||
-rw-r--r-- | frontend.h | 3 | ||||
-rw-r--r-- | osd.c | 6 | ||||
-rw-r--r-- | setup_menu.c | 6 | ||||
-rw-r--r-- | xine_input_vdr.c | 22 | ||||
-rw-r--r-- | xine_osd_command.h | 8 |
8 files changed, 19 insertions, 53 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.c,v 1.56 2008-04-12 19:37:41 phintuka Exp $ + * $Id: device.c,v 1.57 2008-04-14 19:58:50 phintuka Exp $ * */ @@ -414,13 +414,6 @@ void cXinelibDevice::MainThreadHook(void) // Configuration // -void cXinelibDevice::ConfigureOSD(void) -{ - TRACEF("cXinelibDevice::ConfigureOSD"); - - ForEach(m_clients, &cXinelibThread::ConfigureOSD); -} - void cXinelibDevice::ConfigurePostprocessing(const char *deinterlace_method, int audio_delay, int audio_compression, @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.h,v 1.33 2008-04-12 19:37:41 phintuka Exp $ + * $Id: device.h,v 1.34 2008-04-14 19:58:50 phintuka Exp $ * */ @@ -211,7 +211,6 @@ class cXinelibDevice : public cDevice cXinelibThread *m_local; public: - void ConfigureOSD(void); void ConfigurePostprocessing(const char *deinterlace_method, int audio_delay, int audio_compression, @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.c,v 1.58 2008-04-14 13:19:45 phintuka Exp $ + * $Id: frontend.c,v 1.59 2008-04-14 19:58:54 phintuka Exp $ * */ @@ -781,7 +781,6 @@ bool cXinelibThread::PlayFile(const char *FileName, int Position, void cXinelibThread::Configure(void) { - ConfigureOSD(); ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, xc.audio_compression, xc.audio_equalizer, xc.audio_surround, xc.speaker_type); @@ -807,18 +806,6 @@ void cXinelibThread::Configure(void) xc.scr_tunning ? xc.scr_hz : 90000)); } -int cXinelibThread::ConfigureOSD(void) -{ - char buf[256]; - strcpy(buf, "OSDSCALING "); - if(xc.unscaled_osd) - strcat(buf, " UnscaledAlways"); - if(xc.unscaled_osd_lowresvideo) - strcat(buf, " UnscaledLowRes"); - - return Xine_Control(buf); -} - int cXinelibThread::ConfigurePostprocessing(const char *deinterlace_method, int audio_delay, int audio_compression, @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.h,v 1.21 2008-04-12 19:37:41 phintuka Exp $ + * $Id: frontend.h,v 1.22 2008-04-14 19:58:50 phintuka Exp $ * */ @@ -115,7 +115,6 @@ class cXinelibThread : public cThread, public cListObject // public: - virtual int ConfigureOSD(void); virtual int ConfigurePostprocessing(const char *deinterlace_method, int audio_delay, int audio_compression, @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: osd.c,v 1.22 2008-04-12 20:56:02 phintuka Exp $ + * $Id: osd.c,v 1.23 2008-04-14 19:58:54 phintuka Exp $ * */ @@ -224,6 +224,10 @@ void cXinelibOsd::CmdRle(int Wnd, int X0, int Y0, memcpy(&osdcmd.dirty_area, DirtyArea, sizeof(osd_rect_t)); if(m_Refresh) osdcmd.flags |= OSDFLAG_REFRESH; + if(xc.unscaled_osd) + osdcmd.flags |= OSDFLAG_UNSCALED; + else if(xc.unscaled_osd_lowresvideo) + osdcmd.flags |= OSDFLAG_UNSCALED_LOWRES; prepare_palette(&clut[0], Palette, Colors, /*Top*/(Prev() == NULL), true); osdcmd.colors = Colors; diff --git a/setup_menu.c b/setup_menu.c index 215a58fe..9187d852 100644 --- a/setup_menu.c +++ b/setup_menu.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: setup_menu.c,v 1.54 2008-04-14 14:13:15 phintuka Exp $ + * $Id: setup_menu.c,v 1.55 2008-04-14 19:58:50 phintuka Exp $ * */ @@ -875,8 +875,6 @@ cMenuSetupOSD::~cMenuSetupOSD() { xc.alpha_correction = orig_alpha_correction; xc.alpha_correction_abs = orig_alpha_correction_abs; - - cXinelibDevice::Instance().ConfigureOSD(); } void cMenuSetupOSD::Set(void) @@ -966,8 +964,6 @@ eOSState cMenuSetupOSD::ProcessKey(eKeys Key) xc.alpha_correction = newconfig.alpha_correction; else if(item == ctrl_alpha_abs) xc.alpha_correction_abs = newconfig.alpha_correction_abs; - else if(item == ctrl_unscaled) - cXinelibDevice::Instance().ConfigureOSD(); if(!newconfig.unscaled_osd && !ctrl_lowres) Set(); diff --git a/xine_input_vdr.c b/xine_input_vdr.c index 6ce2d667..b83bdeb3 100644 --- a/xine_input_vdr.c +++ b/xine_input_vdr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_input_vdr.c,v 1.136 2008-04-14 13:19:45 phintuka Exp $ + * $Id: xine_input_vdr.c,v 1.137 2008-04-14 19:58:54 phintuka Exp $ * */ @@ -312,8 +312,6 @@ typedef struct vdr_input_plugin_s { int vdr_osd_width, vdr_osd_height; int video_width, video_height; int video_changed; - int unscaled_osd; - int unscaled_osd_lowresvideo; int osdhandle[MAX_OSD_OBJECT]; int64_t last_changed_vpts[MAX_OSD_OBJECT]; osd_command_t osddata[MAX_OSD_OBJECT]; @@ -2116,7 +2114,7 @@ static int exec_osd_command(vdr_input_plugin_t *this, osd_command_t *cmd) if(!(this->stream->video_out->get_capabilities(this->stream->video_out) & VO_CAP_UNSCALED_OVERLAY)) unscaled_supported = 0; - else if(this->unscaled_osd) + else if(cmd->flags & OSDFLAG_UNSCALED) use_unscaled = 1; /* store osd for later rescaling (done if video size changes) */ @@ -2159,7 +2157,7 @@ static int exec_osd_command(vdr_input_plugin_t *this, osd_command_t *cmd) / this->vdr_osd_height)>>8; LOGOSD("Size out of margins, rescaling rle image"); if(width_diff < 0 || height_diff < 0) - if(unscaled_supported && this->unscaled_osd_lowresvideo) + if(unscaled_supported && (cmd->flags & OSDFLAG_UNSCALED_LOWRES)) use_unscaled = 1; if(!use_unscaled && cmd->scaling > 0) { @@ -3163,15 +3161,6 @@ LOGMSG(" pip stream created"); return CONTROL_PARAM_ERROR; } -static int handle_control_osdscaling(vdr_input_plugin_t *this, const char *cmd) -{ - pthread_mutex_lock(&this->osd_lock); - this->unscaled_osd = strstr(cmd, "UnscaledAlways") ? 1 : 0; - this->unscaled_osd_lowresvideo = strstr(cmd, "UnscaledLowRes") ? 1 : 0; - pthread_mutex_unlock(&this->osd_lock); - return CONTROL_OK; -} - static int handle_control_osdcmd(vdr_input_plugin_t *this) { osd_command_t osdcmd; @@ -3490,10 +3479,7 @@ static int vdr_plugin_parse_control(input_plugin_t *this_gen, const char *cmd) if(NULL != (pt = strstr(cmd, "\r\n"))) *((char*)pt) = 0; /* auts */ - if(!strncasecmp(cmd, "OSDSCALING", 10)) { - err = handle_control_osdscaling(this, cmd); - - } else if(!strncasecmp(cmd, "OSDCMD", 6)) { + if(!strncasecmp(cmd, "OSDCMD", 6)) { err = handle_control_osdcmd(this); } else if(!strncasecmp(cmd, "VIDEO_PROPERTIES ", 17)) { diff --git a/xine_osd_command.h b/xine_osd_command.h index 1bd6795a..5d24bd8b 100644 --- a/xine_osd_command.h +++ b/xine_osd_command.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_osd_command.h,v 1.11 2008-04-04 20:35:11 phintuka Exp $ + * $Id: xine_osd_command.h,v 1.12 2008-04-14 19:58:50 phintuka Exp $ * */ @@ -33,8 +33,10 @@ typedef enum { OSD_Commit = 7 /* All OSD areas have been updated, commit changes to display */ } osd_command_id_t; -#define OSDFLAG_YUV_CLUT 0x01 -#define OSDFLAG_REFRESH 0x02 /* OSD data refresh for new config, clients, etc. - no changes in bitmap */ +#define OSDFLAG_YUV_CLUT 0x01 /* palette is in YUV format */ +#define OSDFLAG_REFRESH 0x02 /* OSD data refresh for new config, clients, etc. - no changes in bitmap */ +#define OSDFLAG_UNSCALED 0x04 /* xine-lib unscaled (hardware) blending */ +#define OSDFLAG_UNSCALED_LOWRES 0x08 /* unscaled blending when video resolution < .95 * 720x576 */ typedef struct xine_clut_s { union { |