diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-05-18 03:16:12 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-05-18 03:16:12 +0000 |
commit | e422232e6a5235e12fd143481d7d987d201a5208 (patch) | |
tree | 8a7e4db6a8e8b283dc91e33b0181d43a145d2d58 /src/post/visualizations | |
parent | 23f2c85267adc425a7b89b91fdc4b36729b87d68 (diff) | |
download | xine-lib-e422232e6a5235e12fd143481d7d987d201a5208.tar.gz xine-lib-e422232e6a5235e12fd143481d7d987d201a5208.tar.bz2 |
track number of times the port has being opened.
rewiring a closed port won't cause the new destination to be opened.
CVS patchset: 6564
CVS date: 2004/05/18 03:16:12
Diffstat (limited to 'src/post/visualizations')
-rw-r--r-- | src/post/visualizations/fftgraph.c | 5 | ||||
-rw-r--r-- | src/post/visualizations/fftscope.c | 5 | ||||
-rw-r--r-- | src/post/visualizations/fooviz.c | 5 | ||||
-rw-r--r-- | src/post/visualizations/oscope.c | 5 |
4 files changed, 16 insertions, 4 deletions
diff --git a/src/post/visualizations/fftgraph.c b/src/post/visualizations/fftgraph.c index 2e905776d..eeb0f246e 100644 --- a/src/post/visualizations/fftgraph.c +++ b/src/post/visualizations/fftgraph.c @@ -20,7 +20,7 @@ * FftGraph Visualization Post Plugin For xine * by Thibaut Mattern (tmattern@noos.fr) * - * $Id: fftgraph.c,v 1.10 2004/02/12 18:25:08 mroi Exp $ + * $Id: fftgraph.c,v 1.11 2004/05/18 03:17:03 miguelfreitas Exp $ * */ @@ -224,6 +224,7 @@ static int fftgraph_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream port->bits = bits; port->rate = rate; port->mode = mode; + port->open_count++; this->ratio = (double)FFTGRAPH_WIDTH / (double)FFTGRAPH_HEIGHT; @@ -304,6 +305,8 @@ static void fftgraph_port_close(xine_audio_port_t *port_gen, xine_stream_t *stre port->original_port->close(port->original_port, stream ); + port->open_count--; + _x_post_dec_usage(port); } diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c index eb0f2b2f1..d2a98bb9f 100644 --- a/src/post/visualizations/fftscope.c +++ b/src/post/visualizations/fftscope.c @@ -22,7 +22,7 @@ * * FFT code by Steve Haehnichen, originally licensed under GPL v1 * - * $Id: fftscope.c,v 1.25 2004/02/12 18:25:08 mroi Exp $ + * $Id: fftscope.c,v 1.26 2004/05/18 03:17:03 miguelfreitas Exp $ * */ @@ -284,6 +284,7 @@ static int fftscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream port->bits = bits; port->rate = rate; port->mode = mode; + port->open_count++; this->ratio = (double)FFT_WIDTH/(double)FFT_HEIGHT; @@ -325,6 +326,8 @@ static void fftscope_port_close(xine_audio_port_t *port_gen, xine_stream_t *stre port->original_port->close(port->original_port, stream ); + port->open_count--; + _x_post_dec_usage(port); } diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c index f05689592..d4d671749 100644 --- a/src/post/visualizations/fooviz.c +++ b/src/post/visualizations/fooviz.c @@ -23,7 +23,7 @@ * process. It simply paints the screen a solid color and rotates through * colors on each iteration. * - * $Id: fooviz.c,v 1.21 2004/04/17 19:54:32 mroi Exp $ + * $Id: fooviz.c,v 1.22 2004/05/18 03:17:03 miguelfreitas Exp $ * */ @@ -116,6 +116,7 @@ static int fooviz_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, port->bits = bits; port->rate = rate; port->mode = mode; + port->open_count++; this->ratio = (double)FOO_WIDTH/(double)FOO_HEIGHT; this->channels = _x_ao_mode2channels(mode); @@ -140,6 +141,8 @@ static void fooviz_port_close(xine_audio_port_t *port_gen, xine_stream_t *stream port->original_port->close(port->original_port, stream ); + port->open_count--; + _x_post_dec_usage(port); } diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c index ab9cf7396..44204a0b3 100644 --- a/src/post/visualizations/oscope.c +++ b/src/post/visualizations/oscope.c @@ -20,7 +20,7 @@ * Basic Oscilloscope Visualization Post Plugin For xine * by Mike Melanson (melanson@pcisys.net) * - * $Id: oscope.c,v 1.17 2004/02/12 18:25:08 mroi Exp $ + * $Id: oscope.c,v 1.18 2004/05/18 03:17:03 miguelfreitas Exp $ * */ @@ -186,6 +186,7 @@ static int oscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, port->bits = bits; port->rate = rate; port->mode = mode; + port->open_count++; this->ratio = (double)OSCOPE_WIDTH/(double)OSCOPE_HEIGHT; @@ -214,6 +215,8 @@ static void oscope_port_close(xine_audio_port_t *port_gen, xine_stream_t *stream port->original_port->close(port->original_port, stream ); + port->open_count--; + _x_post_dec_usage(port); } |