comparison src/icecast/icecast.c @ 2906:8220728cc77b

Use full DECLARE_PLUGIN definition (no missing initializers); Use NULL init/fini for EffectPlugin struct; Use different names for effect and output plugin versions.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 13 Aug 2008 21:37:35 +0300
parents 19c696215a73
children 639241e725e2
comparison
equal deleted inserted replaced
2905:19c696215a73 2906:8220728cc77b
112 static void ice_configure(void); 112 static void ice_configure(void);
113 static int ice_mod_samples(gpointer * d, gint length, AFormat afmt, gint srate, gint nch); 113 static int ice_mod_samples(gpointer * d, gint length, AFormat afmt, gint srate, gint nch);
114 114
115 OutputPlugin ice_op = 115 OutputPlugin ice_op =
116 { 116 {
117 .description = "Icecast Plugin", 117 .description = "Icecast Plugin (output)",
118 .init = ice_init, 118 .init = ice_init,
119 .cleanup = ice_cleanup, 119 .cleanup = ice_cleanup,
120 .about = ice_about, 120 .about = ice_about,
121 .configure = ice_configure, 121 .configure = ice_configure,
122 .open_audio = ice_open, 122 .open_audio = ice_open,
130 .written_time = ice_get_written_time 130 .written_time = ice_get_written_time
131 }; 131 };
132 132
133 EffectPlugin ice_ep = 133 EffectPlugin ice_ep =
134 { 134 {
135 .description = "Icecast Plugin", 135 .description = "Icecast Plugin (effect)",
136 .init = ice_init, 136 .init = NULL,
137 .cleanup = ice_cleanup, 137 .cleanup = NULL,
138 .about = ice_about, 138 .about = ice_about,
139 .configure = ice_configure, 139 .configure = ice_configure,
140 .mod_samples = ice_mod_samples, 140 .mod_samples = ice_mod_samples,
141 }; 141 };
142 142
143 OutputPlugin *ice_oplist[] = { &ice_op, NULL }; 143 OutputPlugin *ice_oplist[] = { &ice_op, NULL };
144 144
145 EffectPlugin *ice_eplist[] = { &ice_ep, NULL }; 145 EffectPlugin *ice_eplist[] = { &ice_ep, NULL };
146 146
147 /*SIMPLE_OUTPUT_PLUGIN(icecast, ice_oplist);*/ 147 /*SIMPLE_OUTPUT_PLUGIN(icecast, ice_oplist);*/
148 DECLARE_PLUGIN(icecast, NULL, NULL, NULL, ice_oplist, ice_eplist); 148 DECLARE_PLUGIN(icecast, NULL, NULL, NULL, ice_oplist, ice_eplist, NULL, NULL, NULL, NULL)
149 /*SIMPLE_EFFECT_PLUGIN(icecast, ice_eplist);*/ 149 /*SIMPLE_EFFECT_PLUGIN(icecast, ice_eplist);*/
150 150
151 static void set_plugin(void) 151 static void set_plugin(void)
152 { 152 {
153 if (streamformat < 0 || streamformat >= streamformat_MAX) 153 if (streamformat < 0 || streamformat >= streamformat_MAX)