summaryrefslogtreecommitdiff
path: root/src/liba52/xine_decoder.c
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2002-11-20 11:57:38 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2002-11-20 11:57:38 +0000
commit4e95a4f5224e241075b8cd86b4423c85c1d0ee26 (patch)
treecd9287e15591dce94560663ad66fc4005d006012 /src/liba52/xine_decoder.c
parent74893748b868ecc6ae539fa66e326e06947c4ac9 (diff)
downloadxine-lib-4e95a4f5224e241075b8cd86b4423c85c1d0ee26.tar.gz
xine-lib-4e95a4f5224e241075b8cd86b4423c85c1d0ee26.tar.bz2
engine modifications to allow post plugin layer:
* new public output interface xine_{audio,video}_port_t instead of xine_{ao,vo}_driver_t, old names kept as aliases for compatibility * modified the engine to allow multiple streams per output * renaming of some internal structures according to public changes * moving SCR out of per-stream-metronom into a global metronom_clock_t residing in xine_t and therefore easily available to the output layer * adapting all available plugins (note to external projects: the compiler will help you a lot, if a plugin compiles, it is adapted, because all changes add new parameters to some functions) * bump up all interface versions because of xine_t and xine_stream_t changes CVS patchset: 3312 CVS date: 2002/11/20 11:57:38
Diffstat (limited to 'src/liba52/xine_decoder.c')
-rw-r--r--src/liba52/xine_decoder.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c
index 6775a37d3..7773ba694 100644
--- a/src/liba52/xine_decoder.c
+++ b/src/liba52/xine_decoder.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_decoder.c,v 1.39 2002/11/12 18:40:50 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.40 2002/11/20 11:57:43 mroi Exp $
*
* stuff needed to turn liba52 into a xine decoder plugin
*/
@@ -75,7 +75,7 @@ typedef struct a52dec_decoder_s {
int a52_flags_map[11];
int ao_flags_map[11];
- ao_instance_t *audio_out;
+ xine_audio_port_t *audio_out;
int audio_caps;
int bypass_mode;
int output_sampling_rate;
@@ -219,10 +219,11 @@ static void a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts) {
|| (output_mode != this->output_mode)) {
if (this->output_open)
- this->audio_out->close (this->audio_out);
+ this->audio_out->close (this->audio_out, this->stream);
- this->output_open = this->audio_out->open (this->audio_out, 16,
+ this->output_open = this->audio_out->open (this->audio_out,
+ this->stream, 16,
this->a52_sample_rate,
output_mode) ;
this->output_sampling_rate = this->a52_sample_rate;
@@ -286,7 +287,7 @@ static void a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts) {
/* output decoded samples */
buf->vpts = pts;
- this->audio_out->put_buffer (this->audio_out, buf);
+ this->audio_out->put_buffer (this->audio_out, buf, this->stream);
} else {
@@ -300,7 +301,8 @@ static void a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts) {
a52_syncinfo (this->frame_buffer, &flags, &sample_rate, &bit_rate);
- this->output_open = this->audio_out->open (this->audio_out, 16,
+ this->output_open = this->audio_out->open (this->audio_out,
+ this->stream, 16,
sample_rate,
AO_CAP_MODE_A52) ;
this->output_mode = AO_CAP_MODE_A52;
@@ -334,7 +336,7 @@ static void a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts) {
buf->num_frames = 1536;
buf->vpts = pts;
- this->audio_out->put_buffer (this->audio_out, buf);
+ this->audio_out->put_buffer (this->audio_out, buf, this->stream);
}
}
@@ -457,7 +459,7 @@ static void a52dec_dispose (audio_decoder_t *this_gen) {
a52dec_decoder_t *this = (a52dec_decoder_t *) this_gen;
if (this->output_open)
- this->audio_out->close (this->audio_out);
+ this->audio_out->close (this->audio_out, this->stream);
this->output_open = 0;
@@ -642,6 +644,6 @@ static decoder_info_t dec_info_audio = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_AUDIO_DECODER, 11, "a/52", XINE_VERSION_CODE, &dec_info_audio, init_plugin },
+ { PLUGIN_AUDIO_DECODER, 12, "a/52", XINE_VERSION_CODE, &dec_info_audio, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};