chiark / gitweb /
Synchronize with trunk
[disorder] / lib / queue.h
index 1c70cfde8ffe2a22fcb6c63e02f2aad0ae00e4c2..72e38769726442557231928b0d28a2743ebdabf2 100644 (file)
@@ -38,9 +38,9 @@ enum playing_state {
    */
   playing_isscratch,
 
    */
   playing_isscratch,
 
-  /** @brief Could not find a player
+  /** @brief OBSOLETE
    *
    *
-   * Obsolete - nothing sets this any more
+   * Formerly meant that no player could be found.  Nothing sets this any more.
    */
   playing_no_player,
 
    */
   playing_no_player,
 
@@ -188,7 +188,14 @@ struct queue_entry {
   /** @brief How much of track has been played so far (seconds) */
   long sofar;
 
   /** @brief How much of track has been played so far (seconds) */
   long sofar;
 
-  /** @brief True if decoder is connected to speaker */
+  /** @brief True if decoder is connected to speaker 
+   *
+   * This is not a @ref playing_state for a couple of reasons
+   * - it is orthogonal to @ref playing_started and @ref playing_unplayed
+   * - it would have to be hidden to other users of @c queue_entry
+   *
+   * For non-raw tracks this should always be zero.
+   */
   int prepared;
   /* For DISORDER_PLAYER_PAUSES only: */
 
   int prepared;
   /* For DISORDER_PLAYER_PAUSES only: */
 
@@ -203,6 +210,9 @@ struct queue_entry {
 
   /** @brief Owning queue (for Disobedience only) */
   struct queuelike *ql;
 
   /** @brief Owning queue (for Disobedience only) */
   struct queuelike *ql;
+  
+  /** @brief Decoder (or player) process ID */
+  pid_t pid;
 };
 
 void queue_insert_entry(struct queue_entry *b, struct queue_entry *n);
 };
 
 void queue_insert_entry(struct queue_entry *b, struct queue_entry *n);