diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-10-15 16:10:18 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-10-15 16:10:18 +0000 |
commit | 1ca9e2b92a11214c737bb5bf061f87cdde926cfa (patch) | |
tree | 0db0b0452c4708f7c875cb1e825235ba34a4cadf | |
parent | 15371ea25b3808fbca88627f3567b05beddb5857 (diff) | |
download | xine-lib-1ca9e2b92a11214c737bb5bf061f87cdde926cfa.tar.gz xine-lib-1ca9e2b92a11214c737bb5bf061f87cdde926cfa.tar.bz2 |
added missing stream end handling function
CVS patchset: 2834
CVS date: 2002/10/15 16:10:18
-rw-r--r-- | src/xine-engine/xine.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 37ff867d6..ef16e96c8 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.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.c,v 1.166 2002/10/14 18:24:59 guenter Exp $ + * $Id: xine.c,v 1.167 2002/10/15 16:10:18 guenter Exp $ * * top-level xine functions * @@ -57,17 +57,25 @@ #include "xineutils.h" #include "compat.h" -void xine_notify_stream_finished (xine_stream_t *stream) { +void xine_handle_stream_end (xine_stream_t *stream, int non_user) { - xine_event_t event; if (stream->status == XINE_STATUS_QUIT) return; - event.data_length = 0; - event.type = XINE_EVENT_UI_PLAYBACK_FINISHED; + if (non_user) { + /* frontends will not be interested in receiving this event + * if they have called xine_stop explicitly, so only send + * it if stream playback finished because of stream end reached + */ + + xine_event_t event; - xine_event_send (stream, &event); + event.data_length = 0; + event.type = XINE_EVENT_UI_PLAYBACK_FINISHED; + + xine_event_send (stream, &event); + } } void xine_report_codec (xine_stream_t *stream, int codec_type, |