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 e470a73..46fb319 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 c521e0d..eb3685f 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);