diff options
Diffstat (limited to 'src/post/visualizations')
-rw-r--r-- | src/post/visualizations/fftgraph.c | 20 | ||||
-rw-r--r-- | src/post/visualizations/fftscope.c | 20 | ||||
-rw-r--r-- | src/post/visualizations/fooviz.c | 20 | ||||
-rw-r--r-- | src/post/visualizations/oscope.c | 20 |
4 files changed, 28 insertions, 52 deletions
diff --git a/src/post/visualizations/fftgraph.c b/src/post/visualizations/fftgraph.c index eeb0f246e..1b88b4521 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.11 2004/05/18 03:17:03 miguelfreitas Exp $ + * $Id: fftgraph.c,v 1.12 2004/05/29 14:45:26 mroi Exp $ * */ @@ -196,8 +196,8 @@ static int fftgraph_rewire_video(xine_post_out_t *output_gen, void *data) if (!data) return 0; /* register our stream at the new output port */ - old_port->close(old_port, NULL); - new_port->open(new_port, NULL); + old_port->close(old_port, XINE_ANON_STREAM); + new_port->open(new_port, XINE_ANON_STREAM); /* reconnect ourselves */ this->vo_port = new_port; return 1; @@ -217,14 +217,10 @@ static int fftgraph_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream _x_post_rewire(&this->post); _x_post_inc_usage(port); - if (stream) - port->stream = stream; - else - port->stream = POST_NULL_STREAM; + port->stream = stream; port->bits = bits; port->rate = rate; port->mode = mode; - port->open_count++; this->ratio = (double)FFTGRAPH_WIDTH / (double)FFTGRAPH_HEIGHT; @@ -235,7 +231,7 @@ static int fftgraph_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream this->samples_per_frame = rate / FPS; this->data_idx = 0; - this->vo_port->open(this->vo_port, NULL); + this->vo_port->open(this->vo_port, XINE_ANON_STREAM); this->metronom->set_master(this->metronom, stream->metronom); this->fft = fft_new(FFT_BITS); @@ -300,13 +296,11 @@ static void fftgraph_port_close(xine_audio_port_t *port_gen, xine_stream_t *stre fft_dispose(this->fft); this->fft = NULL; - this->vo_port->close(this->vo_port, NULL); + this->vo_port->close(this->vo_port, XINE_ANON_STREAM); this->metronom->set_master(this->metronom, NULL); port->original_port->close(port->original_port, stream ); - port->open_count--; - _x_post_dec_usage(port); } @@ -387,7 +381,7 @@ static void fftgraph_port_put_buffer (xine_audio_port_t *port_gen, draw_fftgraph(this, frame); - frame->draw(frame, NULL); + frame->draw(frame, XINE_ANON_STREAM); frame->free(frame); } } while( this->sample_counter >= this->samples_per_frame ); diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c index d2a98bb9f..95ed6969e 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.26 2004/05/18 03:17:03 miguelfreitas Exp $ + * $Id: fftscope.c,v 1.27 2004/05/29 14:45:26 mroi Exp $ * */ @@ -260,8 +260,8 @@ static int fftscope_rewire_video(xine_post_out_t *output_gen, void *data) if (!data) return 0; /* register our stream at the new output port */ - old_port->close(old_port, NULL); - new_port->open(new_port, NULL); + old_port->close(old_port, XINE_ANON_STREAM); + new_port->open(new_port, XINE_ANON_STREAM); /* reconnect ourselves */ this->vo_port = new_port; return 1; @@ -277,14 +277,10 @@ static int fftscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream _x_post_rewire(&this->post); _x_post_inc_usage(port); - if (stream) - port->stream = stream; - else - port->stream = POST_NULL_STREAM; + port->stream = stream; port->bits = bits; port->rate = rate; port->mode = mode; - port->open_count++; this->ratio = (double)FFT_WIDTH/(double)FFT_HEIGHT; @@ -295,7 +291,7 @@ static int fftscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream this->data_idx = 0; this->fft = fft_new(FFT_BITS); - this->vo_port->open(this->vo_port, NULL); + this->vo_port->open(this->vo_port, XINE_ANON_STREAM); this->metronom->set_master(this->metronom, stream->metronom); for (c = 0; c < this->channels; c++) { @@ -321,13 +317,11 @@ static void fftscope_port_close(xine_audio_port_t *port_gen, xine_stream_t *stre fft_dispose(this->fft); this->fft = NULL; - this->vo_port->close(this->vo_port, NULL); + this->vo_port->close(this->vo_port, XINE_ANON_STREAM); this->metronom->set_master(this->metronom, NULL); port->original_port->close(port->original_port, stream ); - port->open_count--; - _x_post_dec_usage(port); } @@ -408,7 +402,7 @@ static void fftscope_port_put_buffer (xine_audio_port_t *port_gen, draw_fftscope(this, frame); - frame->draw(frame, NULL); + frame->draw(frame, XINE_ANON_STREAM); frame->free(frame); } } while( this->sample_counter >= this->samples_per_frame ); diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c index d4d671749..08fa83c4f 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.22 2004/05/18 03:17:03 miguelfreitas Exp $ + * $Id: fooviz.c,v 1.23 2004/05/29 14:45:26 mroi Exp $ * */ @@ -93,8 +93,8 @@ static int fooviz_rewire_video(xine_post_out_t *output_gen, void *data) if (!data) return 0; /* register our stream at the new output port */ - old_port->close(old_port, NULL); - new_port->open(new_port, NULL); + old_port->close(old_port, XINE_ANON_STREAM); + new_port->open(new_port, XINE_ANON_STREAM); /* reconnect ourselves */ this->vo_port = new_port; return 1; @@ -109,21 +109,17 @@ static int fooviz_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, _x_post_rewire(&this->post); _x_post_inc_usage(port); - if (stream) - port->stream = stream; - else - port->stream = POST_NULL_STREAM; + port->stream = 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); this->samples_per_frame = rate / FPS; this->data_idx = 0; - this->vo_port->open(this->vo_port, NULL); + this->vo_port->open(this->vo_port, XINE_ANON_STREAM); this->metronom->set_master(this->metronom, stream->metronom); return port->original_port->open(port->original_port, stream, bits, rate, mode ); @@ -136,13 +132,11 @@ static void fooviz_port_close(xine_audio_port_t *port_gen, xine_stream_t *stream port->stream = NULL; - this->vo_port->close(this->vo_port, NULL); + this->vo_port->close(this->vo_port, XINE_ANON_STREAM); this->metronom->set_master(this->metronom, NULL); port->original_port->close(port->original_port, stream ); - port->open_count--; - _x_post_dec_usage(port); } @@ -222,7 +216,7 @@ static void fooviz_port_put_buffer (xine_audio_port_t *port_gen, memset(frame->base[0], this->current_yuv_byte, FOO_WIDTH * FOO_HEIGHT * 2); this->current_yuv_byte += 3; - frame->draw(frame, NULL); + frame->draw(frame, XINE_ANON_STREAM); frame->free(frame); } } while( this->sample_counter >= this->samples_per_frame ); diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c index 44204a0b3..93041e393 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.18 2004/05/18 03:17:03 miguelfreitas Exp $ + * $Id: oscope.c,v 1.19 2004/05/29 14:45:26 mroi Exp $ * */ @@ -163,8 +163,8 @@ static int oscope_rewire_video(xine_post_out_t *output_gen, void *data) if (!data) return 0; - old_port->close(old_port, NULL); - new_port->open(new_port, NULL); + old_port->close(old_port, XINE_ANON_STREAM); + new_port->open(new_port, XINE_ANON_STREAM); /* reconnect ourselves */ this->vo_port = new_port; return 1; @@ -179,14 +179,10 @@ static int oscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, _x_post_rewire(&this->post); _x_post_inc_usage(port); - if (stream) - port->stream = stream; - else - port->stream = POST_NULL_STREAM; + port->stream = stream; port->bits = bits; port->rate = rate; port->mode = mode; - port->open_count++; this->ratio = (double)OSCOPE_WIDTH/(double)OSCOPE_HEIGHT; @@ -197,7 +193,7 @@ static int oscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, this->data_idx = 0; init_yuv_planes(&this->yuv, OSCOPE_WIDTH, OSCOPE_HEIGHT); - this->vo_port->open(this->vo_port, NULL); + this->vo_port->open(this->vo_port, XINE_ANON_STREAM); this->metronom->set_master(this->metronom, stream->metronom); return port->original_port->open(port->original_port, stream, bits, rate, mode ); @@ -210,13 +206,11 @@ static void oscope_port_close(xine_audio_port_t *port_gen, xine_stream_t *stream port->stream = NULL; - this->vo_port->close(this->vo_port, NULL); + this->vo_port->close(this->vo_port, XINE_ANON_STREAM); this->metronom->set_master(this->metronom, NULL); port->original_port->close(port->original_port, stream ); - port->open_count--; - _x_post_dec_usage(port); } @@ -292,7 +286,7 @@ static void oscope_port_put_buffer (xine_audio_port_t *port_gen, draw_oscope_dots(this); yuv444_to_yuy2(&this->yuv, frame->base[0], frame->pitches[0]); - frame->draw(frame, NULL); + frame->draw(frame, XINE_ANON_STREAM); frame->free(frame); } |