diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-08-04 03:47:09 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-08-04 03:47:09 +0000 |
commit | ed3497a1e20f74c28afc2124480c60fbdbf37fab (patch) | |
tree | 6ae75337cac3aa191151001085ed21d12e11385c /src/post/visualizations/oscope.c | |
parent | b0f659b58e295ab3c4b1bac9ed59e9cb3f29f308 (diff) | |
download | xine-lib-ed3497a1e20f74c28afc2124480c60fbdbf37fab.tar.gz xine-lib-ed3497a1e20f74c28afc2124480c60fbdbf37fab.tar.bz2 |
support for arbitrary aspect ratios
patch by Philip Jgenstedt
CVS patchset: 5243
CVS date: 2003/08/04 03:47:09
Diffstat (limited to 'src/post/visualizations/oscope.c')
-rw-r--r-- | src/post/visualizations/oscope.c | 8 |
1 files changed, 6 insertions, 2 deletions
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; |