summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Zuehlke <andruil@users.sourceforge.net>2003-12-03 10:52:41 +0000
committerMarco Zuehlke <andruil@users.sourceforge.net>2003-12-03 10:52:41 +0000
commit27f6950525cef900b8fce09001123c5a117b2790 (patch)
treedb2287cddb9b0649faae12f76d5d2cd059c86067
parent84491c5973a2f27cb157951779c42f60fe91b0cb (diff)
downloadxine-lib-27f6950525cef900b8fce09001123c5a117b2790.tar.gz
xine-lib-27f6950525cef900b8fce09001123c5a117b2790.tar.bz2
use _x_ao_mode2channels in post-plugins
CVS patchset: 5829 CVS date: 2003/12/03 10:52:41
-rw-r--r--src/post/goom/xine_goom.c32
-rw-r--r--src/post/visualizations/fftgraph.c20
-rw-r--r--src/post/visualizations/fftscope.c20
-rw-r--r--src/post/visualizations/fooviz.c20
-rw-r--r--src/post/visualizations/oscope.c22
5 files changed, 17 insertions, 97 deletions
diff --git a/src/post/goom/xine_goom.c b/src/post/goom/xine_goom.c
index b0cfee656..fc2cdd8e9 100644
--- a/src/post/goom/xine_goom.c
+++ b/src/post/goom/xine_goom.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_goom.c,v 1.44 2003/11/26 19:43:37 f1rmb Exp $
+ * $Id: xine_goom.c,v 1.45 2003/12/03 10:52:41 andruil Exp $
*
* GOOM post plugin.
*
@@ -324,14 +324,14 @@ static post_plugin_t *goom_open_plugin(post_class_t *class_gen, int inputs,
this->post.xine_post.audio_input[1] = NULL;
this->post.xine_post.video_input = (xine_video_port_t **)malloc(sizeof(xine_video_port_t *) * 1);
this->post.xine_post.video_input[0] = NULL;
-
+
this->post.input = xine_list_new();
this->post.output = xine_list_new();
-
+
xine_list_append_content(this->post.input, input);
xine_list_append_content(this->post.output, output);
xine_list_append_content(this->post.output, outputv);
-
+
this->post.dispose = goom_dispose;
return &this->post;
@@ -362,12 +362,12 @@ static void goom_dispose(post_plugin_t *this_gen)
this->class->ip = NULL;
goom_close();
-
+
this->metronom->exit(this->metronom);
if (this->stream)
port->close(port, this->stream);
-
+
free(this->post.xine_post.audio_input);
free(this->post.xine_post.video_input);
free(xine_list_first_content(this->post.input));
@@ -418,22 +418,6 @@ static int goom_rewire_video(xine_post_out_t *output_gen, void *data)
return 1;
}
-static int mode_channels( int mode ) {
- switch( mode ) {
- case AO_CAP_MODE_MONO:
- return 1;
- case AO_CAP_MODE_STEREO:
- return 2;
- case AO_CAP_MODE_4CHANNEL:
- return 4;
- case AO_CAP_MODE_5CHANNEL:
- return 5;
- case AO_CAP_MODE_5_1CHANNEL:
- return 6;
- }
- return 0;
-}
-
static int goom_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
uint32_t bits, uint32_t rate, int mode) {
@@ -442,7 +426,7 @@ static int goom_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
this->bits = bits;
this->mode = mode;
- this->channels = mode_channels(mode);
+ this->channels = _x_ao_mode2channels(mode);
this->samples_per_frame = rate / this->fps;
this->sample_rate = rate;
this->stream = stream;
@@ -578,7 +562,7 @@ static void goom_port_put_buffer (xine_audio_port_t *port_gen,
while (goom_frame < goom_frame_end) {
uint8_t r1, g1, b1, r2, g2, b2;
-
+
#ifdef __BIG_ENDIAN__
goom_frame ++;
r1 = *goom_frame; goom_frame++;
diff --git a/src/post/visualizations/fftgraph.c b/src/post/visualizations/fftgraph.c
index 1953563b7..40a667621 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.7 2003/11/26 19:30:17 mroi Exp $
+ * $Id: fftgraph.c,v 1.8 2003/12/03 10:52:41 andruil Exp $
*
*/
@@ -233,22 +233,6 @@ static int fftgraph_rewire_video(xine_post_out_t *output_gen, void *data)
return 1;
}
-static int mode_channels( int mode ) {
- switch( mode ) {
- case AO_CAP_MODE_MONO:
- return 1;
- case AO_CAP_MODE_STEREO:
- return 2;
- case AO_CAP_MODE_4CHANNEL:
- return 4;
- case AO_CAP_MODE_5CHANNEL:
- return 5;
- case AO_CAP_MODE_5_1CHANNEL:
- return 6;
- }
- return 0;
-}
-
static int fftgraph_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
uint32_t bits, uint32_t rate, int mode) {
@@ -264,7 +248,7 @@ static int fftgraph_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream
this->bits = bits;
this->mode = mode;
- this->channels = mode_channels(mode);
+ this->channels = _x_ao_mode2channels(mode);
if( this->channels > MAXCHANNELS )
this->channels = MAXCHANNELS;
this->lines_per_channel = FFTGRAPH_HEIGHT / this->channels;
diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c
index d349f8603..ff59f28ed 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.21 2003/11/26 19:30:17 mroi Exp $
+ * $Id: fftscope.c,v 1.22 2003/12/03 10:52:41 andruil Exp $
*
*/
@@ -315,22 +315,6 @@ static int fftscope_rewire_video(xine_post_out_t *output_gen, void *data)
return 1;
}
-static int mode_channels( int mode ) {
- switch( mode ) {
- case AO_CAP_MODE_MONO:
- return 1;
- case AO_CAP_MODE_STEREO:
- return 2;
- case AO_CAP_MODE_4CHANNEL:
- return 4;
- case AO_CAP_MODE_5CHANNEL:
- return 5;
- case AO_CAP_MODE_5_1CHANNEL:
- return 6;
- }
- return 0;
-}
-
static int fftscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
uint32_t bits, uint32_t rate, int mode) {
@@ -342,7 +326,7 @@ static int fftscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream
this->bits = bits;
this->mode = mode;
- this->channels = mode_channels(mode);
+ this->channels = _x_ao_mode2channels(mode);
if( this->channels > MAXCHANNELS )
this->channels = MAXCHANNELS;
this->samples_per_frame = rate / FPS;
diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c
index a6ba782a7..f37c74f12 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.16 2003/11/26 19:30:17 mroi Exp $
+ * $Id: fooviz.c,v 1.17 2003/12/03 10:52:41 andruil Exp $
*
*/
@@ -130,22 +130,6 @@ static int fooviz_rewire_video(xine_post_out_t *output_gen, void *data)
return 1;
}
-static int mode_channels( int mode ) {
- switch( mode ) {
- case AO_CAP_MODE_MONO:
- return 1;
- case AO_CAP_MODE_STEREO:
- return 2;
- case AO_CAP_MODE_4CHANNEL:
- return 4;
- case AO_CAP_MODE_5CHANNEL:
- return 5;
- case AO_CAP_MODE_5_1CHANNEL:
- return 6;
- }
- return 0;
-}
-
static int fooviz_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
uint32_t bits, uint32_t rate, int mode) {
@@ -155,7 +139,7 @@ static int fooviz_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
this->ratio = (double)FOO_WIDTH/(double)FOO_HEIGHT;
this->bits = bits;
this->mode = mode;
- this->channels = mode_channels(mode);
+ this->channels = _x_ao_mode2channels(mode);
this->samples_per_frame = rate / FPS;
this->sample_rate = rate;
this->stream = stream;
diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c
index ee3c905d1..7b2427b83 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.14 2003/11/26 19:30:17 mroi Exp $
+ * $Id: oscope.c,v 1.15 2003/12/03 10:52:41 andruil Exp $
*
*/
@@ -201,22 +201,6 @@ static int oscope_rewire_video(xine_post_out_t *output_gen, void *data)
return 1;
}
-static int mode_channels( int mode ) {
- switch( mode ) {
- case AO_CAP_MODE_MONO:
- return 1;
- case AO_CAP_MODE_STEREO:
- return 2;
- case AO_CAP_MODE_4CHANNEL:
- return 4;
- case AO_CAP_MODE_5CHANNEL:
- return 5;
- case AO_CAP_MODE_5_1CHANNEL:
- return 6;
- }
- return 0;
-}
-
static int oscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
uint32_t bits, uint32_t rate, int mode) {
@@ -227,9 +211,9 @@ static int oscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
this->bits = bits;
this->mode = mode;
- this->channels = mode_channels(mode);
+ this->channels = _x_ao_mode2channels(mode);
this->samples_per_frame = rate / FPS;
- this->sample_rate = rate;
+ this->sample_rate = rate;
this->stream = stream;
this->data_idx = 0;
init_yuv_planes(&this->yuv, OSCOPE_WIDTH, OSCOPE_HEIGHT);