]> git.tue.mpg.de Git - paraslash.git/commitdiff
Introduce vss_stopped().
authorAndre Noll <maan@systemlinux.org>
Sat, 17 Nov 2007 17:15:11 +0000 (18:15 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 17 Nov 2007 17:15:11 +0000 (18:15 +0100)
vss.c
vss.h

diff --git a/vss.c b/vss.c
index e470a737d4c9224bf06336c02f02c77ff1c8fa24..46fb3196c4c2155be65b361e9f1fb31715693e19 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -84,6 +84,18 @@ unsigned int vss_paused(void)
                && !(mmd->new_vss_status_flags & VSS_PLAYING);
 }
 
+/**
+ * Check if the vss is currently stopped.
+ *
+ * \return Greater than zero if paused, zero otherwise.
+ *
+ */
+unsigned int vss_stopped(void)
+{
+       return (mmd->new_vss_status_flags & VSS_NEXT)
+               && !(mmd->new_vss_status_flags & VSS_PLAYING);
+}
+
 /**
  * Initialize the virtual streaming system.
  *
diff --git a/vss.h b/vss.h
index c521e0dd919a87ac4a7a9c8a1d2cb570834df943..eb3685fecb0900f01ab8bd609ffa110913fe5029 100644 (file)
--- a/vss.h
+++ b/vss.h
@@ -13,6 +13,7 @@ unsigned int vss_playing(void);
 unsigned int vss_next(void);
 unsigned int vss_repos(void);
 unsigned int vss_paused(void);
+unsigned int vss_stopped(void);
 char *vss_get_header(size_t *header_len);
 struct timeval *vss_chunk_time(void);
 const char *supported_audio_formats(void);