From a74413f06efef91496b3f5b9f749b328ede19ac8 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sat, 29 May 2004 14:45:25 +0000 Subject: separate the two semantics of querying a port's status with a NULL stream; before, NULL could mean two things: no stream at all or a stream that does not want to be addressed; now the latter is represented by the new XINE_ANON_STREAM resulting changes: * the status() functions now behave differently for NULL and XINE_ANON_STREAM (as the commentary always implied, but this was not the case, so post plugin rewiring went wrong, because it relies on the status() function) * the NULL_STREAM defines in audio_out and video_out are obsolete * update the function comments in the headers * update the post plugin rewire functions to use the status() functions to check, if the old port was opened and handle the new one accordingly; this makes open_count obsolete * change all post plugins accordingly (mostly using XINE_ANON_STREAM instead of NULL) additional change: * the status() function of audio port now returns the bits/rate/mode values of the input and not the output; this is more likely to be what a post plugin wants * the reimplementation of status() in the upmix plugin is obsolete CVS patchset: 6603 CVS date: 2004/05/29 14:45:25 --- src/xine-engine/audio_out.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/xine-engine/audio_out.h') diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h index 810b37c9f..fe51d4475 100644 --- a/src/xine-engine/audio_out.h +++ b/src/xine-engine/audio_out.h @@ -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: audio_out.h,v 1.69 2004/05/23 16:20:56 mroi Exp $ + * $Id: audio_out.h,v 1.70 2004/05/29 14:45:25 mroi Exp $ */ #ifndef HAVE_AUDIO_OUT_H #define HAVE_AUDIO_OUT_H @@ -186,7 +186,7 @@ struct xine_audio_port_s { * return value: 0:failure, >0:output sample rate */ /* when you are not a full-blown stream, but still need to open the port - * (e.g. you are a post plugin) it is legal to pass a NULL stream */ + * (e.g. you are a post plugin) it is legal to pass an anonymous stream */ int (*open) (xine_audio_port_t *, xine_stream_t *stream, uint32_t bits, uint32_t rate, int mode); @@ -199,12 +199,12 @@ struct xine_audio_port_s { * append a buffer filled with audio data to the audio fifo * for output */ - /* when the frame does not originate from a stream, it is legal to pass a NULL stream */ + /* when the frame does not originate from a stream, it is legal to pass an anonymous stream */ void (*put_buffer) (xine_audio_port_t *, audio_buffer_t *buf, xine_stream_t *stream); /* audio driver is no longer used by decoder => close */ /* when you are not a full-blown stream, but still need to close the port - * (e.g. you are a post plugin) it is legal to pass a NULL stream */ + * (e.g. you are a post plugin) it is legal to pass an anonymous stream */ void (*close) (xine_audio_port_t *self, xine_stream_t *stream); /* called on xine exit */ @@ -224,6 +224,7 @@ struct xine_audio_port_s { /* * Check if port is opened for this stream and get parameters. + * The stream can be anonymous. */ int (*status) (xine_audio_port_t *, xine_stream_t *stream, uint32_t *bits, uint32_t *rate, int *mode); -- cgit v1.2.3