diff options
author | phintuka <phintuka> | 2008-04-03 08:08:27 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-04-03 08:08:27 +0000 |
commit | 5f5c035a5d25052402d3f92e3d6d0bc1c35b9266 (patch) | |
tree | 8ac28ea340c1ebdb81d7a75783675ceb3d928349 | |
parent | 5e131df0e89a4c77d46e7bbebc84ce6c38e809fd (diff) | |
download | xineliboutput-5f5c035a5d25052402d3f92e3d6d0bc1c35b9266.tar.gz xineliboutput-5f5c035a5d25052402d3f92e3d6d0bc1c35b9266.tar.bz2 |
Moved common configuration code to base class
-rw-r--r-- | frontend.c | 26 | ||||
-rw-r--r-- | frontend.h | 4 | ||||
-rw-r--r-- | frontend_local.c | 24 | ||||
-rw-r--r-- | frontend_svr.c | 24 |
4 files changed, 33 insertions, 45 deletions
@@ -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.52 2008-03-16 21:40:55 phintuka Exp $ + * $Id: frontend.c,v 1.53 2008-04-03 08:08:27 phintuka Exp $ * */ @@ -775,6 +775,30 @@ bool cXinelibThread::PlayFile(const char *FileName, int Position, // Configuration // +void cXinelibThread::Configure(void) +{ + ConfigureOSD(xc.prescale_osd, xc.unscaled_osd); + ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, + xc.audio_compression, xc.audio_equalizer, + xc.audio_surround, xc.speaker_type); + ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.contrast, xc.overscan, xc.vo_aspect_ratio); + ConfigurePostprocessing("upmix", xc.audio_upmix ? true : false, NULL); + ConfigurePostprocessing("autocrop", xc.autocrop ? true : false, + xc.AutocropOptions()); + ConfigurePostprocessing("swscale", xc.swscale ? true : false, + xc.SwScaleOptions()); + ConfigurePostprocessing("pp", xc.ffmpeg_pp ? true : false, + xc.FfmpegPpOptions()); + ConfigurePostprocessing("unsharp",xc.unsharp ? true : false, + xc.UnsharpOptions()); + ConfigurePostprocessing("denoise3d",xc.denoise3d ? true : false, + xc.Denoise3dOptions()); + +#ifdef ENABLE_TEST_POSTPLUGINS + ConfigurePostprocessing("headphone", xc.headphone ? true : false, NULL); +#endif +} + int cXinelibThread::ConfigureOSD(bool prescale_osd, bool unscaled_osd) { char buf[256]; @@ -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.19 2008-03-16 21:40:55 phintuka Exp $ + * $Id: frontend.h,v 1.20 2008-04-03 08:08:27 phintuka Exp $ * */ @@ -70,6 +70,8 @@ class cXinelibThread : public cThread, public cListObject virtual int Xine_Control(const char *cmd) = 0; virtual int Xine_Control_Sync(const char *cmd) { return Xine_Control(cmd); } + void Configure(void); + // // Data transfer // diff --git a/frontend_local.c b/frontend_local.c index f13ef069..780520a4 100644 --- a/frontend_local.c +++ b/frontend_local.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_local.c,v 1.30 2008-03-28 22:17:17 phintuka Exp $ + * $Id: frontend_local.c,v 1.31 2008-04-03 08:08:27 phintuka Exp $ * */ @@ -396,27 +396,7 @@ void cXinelibLocal::Action(void) // configure frontend and xine m_bNoVideo = false; - ConfigureOSD(xc.prescale_osd, xc.unscaled_osd); - ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, - xc.audio_compression, xc.audio_equalizer, - xc.audio_surround, xc.speaker_type); - ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.contrast, xc.overscan, xc.vo_aspect_ratio); - ConfigurePostprocessing("upmix", xc.audio_upmix ? true : false, NULL); - ConfigurePostprocessing("autocrop", xc.autocrop ? true : false, - xc.AutocropOptions()); - ConfigurePostprocessing("swscale", xc.swscale ? true : false, - xc.SwScaleOptions()); - ConfigurePostprocessing("pp", xc.ffmpeg_pp ? true : false, - xc.FfmpegPpOptions()); - ConfigurePostprocessing("unsharp",xc.unsharp ? true : false, - xc.UnsharpOptions()); - ConfigurePostprocessing("denoise3d",xc.denoise3d ? true : false, - xc.Denoise3dOptions()); - - -#ifdef ENABLE_TEST_POSTPLUGINS - ConfigurePostprocessing("headphone", xc.headphone ? true : false, NULL); -#endif + Configure(); LOGDBG("cXinelibLocal::Action - fe config OK"); LogoDisplay(); diff --git a/frontend_svr.c b/frontend_svr.c index a4355b2a..6d078a87 100644 --- a/frontend_svr.c +++ b/frontend_svr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.c,v 1.53 2008-03-16 23:47:25 phintuka Exp $ + * $Id: frontend_svr.c,v 1.54 2008-04-03 08:08:27 phintuka Exp $ * */ @@ -1135,28 +1135,10 @@ void cXinelibServer::Handle_Control_CONFIG(int cli) m_bNoVideo?1:0, m_bLiveMode?1:0); SetVolume(m_Volume); - ConfigureOSD(xc.prescale_osd, xc.unscaled_osd); - ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, - xc.audio_compression, xc.audio_equalizer, - xc.audio_surround, xc.speaker_type); - ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.contrast, xc.overscan, xc.vo_aspect_ratio); - ConfigurePostprocessing("upmix", xc.audio_upmix ? true : false, NULL); - ConfigurePostprocessing("autocrop", xc.autocrop ? true : false, - xc.AutocropOptions()); - ConfigurePostprocessing("swscale", xc.swscale ? true : false, - xc.SwScaleOptions()); - ConfigurePostprocessing("pp", xc.ffmpeg_pp ? true : false, - xc.FfmpegPpOptions()); - ConfigurePostprocessing("unsharp",xc.unsharp ? true : false, - xc.UnsharpOptions()); - ConfigurePostprocessing("denoise3d",xc.denoise3d ? true : false, - xc.Denoise3dOptions()); - fd_control[cli].write_cmd("CLEAR\r\n"); + Configure(); -#ifdef ENABLE_TEST_POSTPLUGINS - ConfigurePostprocessing("headphone", xc.headphone ? true : false, NULL); -#endif + fd_control[cli].write_cmd("CLEAR\r\n"); if(m_bPlayingFile && *m_FileName) { Unlock(); |