diff options
-rw-r--r-- | config.c | 6 | ||||
-rw-r--r-- | config.h | 6 | ||||
-rw-r--r-- | frontend.c | 14 | ||||
-rw-r--r-- | frontend_svr.c | 3 |
4 files changed, 18 insertions, 11 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.c,v 1.92 2010-05-26 12:10:02 phintuka Exp $ + * $Id: config.c,v 1.93 2010-05-27 12:04:50 phintuka Exp $ * */ @@ -175,7 +175,7 @@ const char * const config_t::s_audioEqNames[ AUDIO_EQ_count+1 ] = { }; const char * const config_t::s_audioVisualizations[ AUDIO_VIS_count+1 ] = { - "none", "goom", "oscope", "fftscope", "fftgraph", + "none", "goom", "oscope", "fftscope", "fftgraph", "image", NULL }; @@ -185,6 +185,7 @@ const char * const config_t::s_audioVisualizationNames[ AUDIO_VIS_count+1 ] = { trNOOP("Oscilloscope"), trNOOP("FFT Scope"), trNOOP("FFT Graph"), + trNOOP("Image"), NULL }; @@ -530,6 +531,7 @@ config_t::config_t() { memset(audio_equalizer,0,sizeof(audio_equalizer)); strn0cpy(audio_visualization, "goom", sizeof(audio_visualization)); strn0cpy(audio_vis_goom_opts, "fps:25,width:720,height:576", sizeof(audio_vis_goom_opts)); + strn0cpy(audio_vis_image_opts, "", sizeof(audio_vis_image_opts)); headphone = 0; audio_upmix = 0; @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.h,v 1.70 2010-05-26 11:53:13 phintuka Exp $ + * $Id: config.h,v 1.71 2010-05-27 12:04:50 phintuka Exp $ * */ @@ -119,7 +119,8 @@ #define AUDIO_VIS_NONE 0 #define AUDIO_VIS_GOOM 1 -#define AUDIO_VIS_count 5 +#define AUDIO_VIS_IMAGE 5 +#define AUDIO_VIS_count 6 /* speaker arrangements: xine, audio_out_alsa.c */ #define SPEAKERS_MONO 0 @@ -337,6 +338,7 @@ class config_t { // Audio visualization char audio_visualization[64]; char audio_vis_goom_opts[256]; + char audio_vis_image_opts[4096]; // deinterlacing post plugin char deinterlace_method[32]; @@ -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.87 2010-05-27 11:43:50 phintuka Exp $ + * $Id: frontend.c,v 1.88 2010-05-27 12:04:50 phintuka Exp $ * */ @@ -321,7 +321,7 @@ void cXinelibThread::SetNoVideo(bool bVal) Xine_Control("NOVIDEO", m_bNoVideo ? 1 : 0); - if(m_bNoVideo && strcmp(xc.audio_visualization, "none")) { + if(m_bNoVideo && strcmp(xc.audio_visualization, "none") && strcmp(xc.audio_visualization, "image")) { char *opts = NULL; if(xc.audio_vis_goom_opts[0] && !strcmp(xc.audio_visualization, "goom")) @@ -686,7 +686,7 @@ bool cXinelibThread::PlayFile(const char *FileName, int Position, { TRACEF("cXinelibThread::PlayFile"); - char vis[256]; + char vis[256+4096]; switch(PlayMode) { case pmVideoOnly: @@ -705,6 +705,8 @@ bool cXinelibThread::PlayFile(const char *FileName, int Position, default: if (xc.audio_vis_goom_opts[0] && !strcmp(xc.audio_visualization, "goom")) { snprintf(vis, sizeof(vis), "%s:%s", xc.audio_visualization, xc.audio_vis_goom_opts); + } else if (xc.audio_vis_image_opts[0] && !strcmp(xc.audio_visualization, "image")) { + snprintf(vis, sizeof(vis), "%s:%s", xc.audio_visualization, xc.audio_vis_image_opts); } else { strn0cpy(vis, xc.audio_visualization, sizeof(vis)); } @@ -712,11 +714,11 @@ bool cXinelibThread::PlayFile(const char *FileName, int Position, break; } - char buf[4096]; + char buf[4096+4096+256]; m_bEndOfStreamReached = false; if(snprintf(buf, sizeof(buf), "PLAYFILE %s %d %s %s", LoopPlay ? "Loop" : "", Position, vis, FileName ? FileName : "") - >= 4096) { + >= 4096+4096+256) { LOGMSG("PlayFile: message too long !"); return 0; } @@ -826,7 +828,7 @@ int cXinelibThread::ConfigurePostprocessing(const char *deinterlace_method, audio_equalizer[8],audio_equalizer[9]); r = Xine_Control(buf) && r; - if(m_bNoVideo && strcmp(xc.audio_visualization, "none")) { + if (m_bNoVideo && strcmp(xc.audio_visualization, "none") && strcmp(xc.audio_visualization, "image")) { char *opts = NULL; if(xc.audio_vis_goom_opts[0] && !strcmp(xc.audio_visualization, "goom")) opts = xc.audio_vis_goom_opts; diff --git a/frontend_svr.c b/frontend_svr.c index 25d88632..d0408725 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.92 2010-05-18 15:28:34 phintuka Exp $ + * $Id: frontend_svr.c,v 1.93 2010-05-27 12:04:50 phintuka Exp $ * */ @@ -1366,6 +1366,7 @@ void cXinelibServer::Handle_Control_HTTP(int cli, const char *arg) if(pos) file.Truncate(pos - m_FileName); bool Allow = ( !strcmp_escaped(file, m_State[cli]->Uri() + 9) + || !strcmp_escaped(xc.audio_vis_image_opts, m_State[cli]->Uri() + 9) || (pos && !strcmp_escaped(pos + 10, m_State[cli]->Uri() + 9))); if(Allow) { LOGMSG("HTTP streaming media file"); |