From fe9eb37f05b677071f9de1b9e69c535aa2293d0b Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Thu, 30 Oct 2003 22:40:53 +0000 Subject: * modify the engine slightly, so that the stream member in a video frame or audio buffer can be NULL; this should be used to indicate that the frame/ buffer does not come directly from a stream, but was generated otherwise (the most important result is that frames/buffers with stream NULL will not be passed through metronom) * modify visualization post plugins so they set the stream on the generated frames to NULL, this avoids cluttering metronom, when playing a stream with audio AND video AND a visualization post * this also means modifying the way post plugins provide vpts values: they have to calculate them themselves for now CVS patchset: 5647 CVS date: 2003/10/30 22:40:53 --- src/xine-engine/audio_out.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/xine-engine/audio_out.c') diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index cec7eae9f..b925adc33 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.148 2003/10/06 13:09:52 mroi Exp $ + * $Id: audio_out.c,v 1.149 2003/10/30 22:40:53 mroi Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe @@ -1328,15 +1328,17 @@ static void ao_put_buffer (xine_audio_port_t *this_gen, } buf->stream = stream; - buf->format.bits = stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS]; - buf->format.rate = stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE]; - buf->format.mode = stream->stream_info[XINE_STREAM_INFO_AUDIO_MODE]; - extra_info_merge( buf->extra_info, stream->audio_decoder_extra_info ); - + pts = buf->vpts; + + if (stream) { + buf->format.bits = stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS]; + buf->format.rate = stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE]; + buf->format.mode = stream->stream_info[XINE_STREAM_INFO_AUDIO_MODE]; + extra_info_merge( buf->extra_info, stream->audio_decoder_extra_info ); + buf->vpts = stream->metronom->got_audio_samples(stream->metronom, pts, buf->num_frames); + } - buf->vpts = stream->metronom->got_audio_samples (stream->metronom, pts, - buf->num_frames); buf->extra_info->vpts = buf->vpts; lprintf ("ao_put_buffer, pts=%" PRId64 ", vpts=%" PRId64 ", flushmode=%d\n", -- cgit v1.2.3