summaryrefslogtreecommitdiff
path: root/src/post/visualizations
diff options
context:
space:
mode:
Diffstat (limited to 'src/post/visualizations')
-rw-r--r--src/post/visualizations/fftscope.c8
-rw-r--r--src/post/visualizations/fooviz.c11
-rw-r--r--src/post/visualizations/oscope.c8
-rw-r--r--src/post/visualizations/visualizations.c6
4 files changed, 22 insertions, 11 deletions
diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c
index c595e21be..5132ba0a6 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.14 2003/07/26 17:44:30 tmattern Exp $
+ * $Id: fftscope.c,v 1.15 2003/08/04 03:47:11 miguelfreitas Exp $
*
*/
@@ -58,6 +58,8 @@ struct post_plugin_fftscope_s {
xine_video_port_t *vo_port;
xine_stream_t *stream;
+ double ratio;
+
int data_idx;
complex wave[MAXCHANNELS][NUMSAMPLES];
int amp_max[MAXCHANNELS][NUMSAMPLES / 2];
@@ -492,6 +494,8 @@ static int fftscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream
post_plugin_fftscope_t *this = (post_plugin_fftscope_t *)port->post;
int c, i;
+ this->ratio = (double)FFT_WIDTH/(double)FFT_HEIGHT;
+
this->bits = bits;
this->mode = mode;
this->channels = mode_channels(mode);
@@ -599,7 +603,7 @@ static void fftscope_port_put_buffer (xine_audio_port_t *port_gen,
samples_used += this->samples_per_frame;
frame = this->vo_port->get_frame (this->vo_port, FFT_WIDTH, FFT_HEIGHT,
- XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YUY2,
+ this->ratio, XINE_IMGFMT_YUY2,
VO_BOTH_FIELDS);
frame->extra_info->invalid = 1;
frame->bad_frame = 0;
diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c
index c1aecb329..505a10bc6 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.8 2003/07/26 17:44:30 tmattern Exp $
+ * $Id: fooviz.c,v 1.9 2003/08/04 03:47:11 miguelfreitas Exp $
*
*/
@@ -49,10 +49,12 @@ struct post_plugin_fooviz_s {
xine_video_port_t *vo_port;
xine_stream_t *stream;
+ double ratio;
+
int data_idx;
short data [2][NUMSAMPLES];
audio_buffer_t buf; /* dummy buffer just to hold a copy of audio data */
-
+
int bits;
int mode;
int channels;
@@ -139,6 +141,7 @@ static int fooviz_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
post_audio_port_t *port = (post_audio_port_t *)port_gen;
post_plugin_fooviz_t *this = (post_plugin_fooviz_t *)port->post;
+ this->ratio = (double)FOO_WIDTH/(double)FOO_HEIGHT;
this->bits = bits;
this->mode = mode;
this->channels = mode_channels(mode);
@@ -231,7 +234,7 @@ static void fooviz_port_put_buffer (xine_audio_port_t *port_gen,
samples_used += this->samples_per_frame;
frame = this->vo_port->get_frame (this->vo_port, FOO_WIDTH, FOO_HEIGHT,
- XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YUY2,
+ this->ratio, XINE_IMGFMT_YUY2,
VO_BOTH_FIELDS);
frame->extra_info->invalid = 1;
frame->bad_frame = 0;
@@ -370,6 +373,6 @@ post_info_t fooviz_special_info = { XINE_POST_TYPE_AUDIO_VISUALIZATION };
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_POST, 3, "fooviz", XINE_VERSION_CODE, &fooviz_special_info, &fooviz_init_plugin },
+ { PLUGIN_POST, 4, "fooviz", XINE_VERSION_CODE, &fooviz_special_info, &fooviz_init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c
index e143b8f27..3e2908d54 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.8 2003/07/26 17:44:30 tmattern Exp $
+ * $Id: oscope.c,v 1.9 2003/08/04 03:47:11 miguelfreitas Exp $
*
*/
@@ -47,6 +47,8 @@ struct post_plugin_oscope_s {
xine_video_port_t *vo_port;
xine_stream_t *stream;
+ double ratio;
+
int data_idx;
short data [MAXCHANNELS][NUMSAMPLES];
audio_buffer_t buf; /* dummy buffer just to hold a copy of audio data */
@@ -209,6 +211,8 @@ static int oscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
post_audio_port_t *port = (post_audio_port_t *)port_gen;
post_plugin_oscope_t *this = (post_plugin_oscope_t *)port->post;
+ this->ratio = (double)OSCOPE_WIDTH/(double)OSCOPE_HEIGHT;
+
this->bits = bits;
this->mode = mode;
this->channels = mode_channels(mode);
@@ -298,7 +302,7 @@ static void oscope_port_put_buffer (xine_audio_port_t *port_gen,
samples_used += this->samples_per_frame;
frame = this->vo_port->get_frame (this->vo_port, OSCOPE_WIDTH, OSCOPE_HEIGHT,
- XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YUY2,
+ this->ratio, XINE_IMGFMT_YUY2,
VO_BOTH_FIELDS);
frame->extra_info->invalid = 1;
frame->bad_frame = 0;
diff --git a/src/post/visualizations/visualizations.c b/src/post/visualizations/visualizations.c
index 2241aeea4..97d6d51db 100644
--- a/src/post/visualizations/visualizations.c
+++ b/src/post/visualizations/visualizations.c
@@ -19,7 +19,7 @@
*
* This file contains plugin entries for several visualization post plugins.
*
- * $Id: visualizations.c,v 1.3 2003/05/31 18:33:30 miguelfreitas Exp $
+ * $Id: visualizations.c,v 1.4 2003/08/04 03:47:11 miguelfreitas Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -43,7 +43,7 @@ post_info_t fftscope_special_info = { XINE_POST_TYPE_AUDIO_VISUALIZATION };
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_POST, 3, "oscope", XINE_VERSION_CODE, &oscope_special_info, &oscope_init_plugin },
- { PLUGIN_POST, 3, "fftscope", XINE_VERSION_CODE, &fftscope_special_info, &fftscope_init_plugin },
+ { PLUGIN_POST, 4, "oscope", XINE_VERSION_CODE, &oscope_special_info, &oscope_init_plugin },
+ { PLUGIN_POST, 4, "fftscope", XINE_VERSION_CODE, &fftscope_special_info, &fftscope_init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};