[xiph-cvs] cvs commit: ices/src definitions.h ices_config.c icestypes.h setup.c stream.c

Brendan brendan at xiph.org
Thu Jun 19 15:17:27 PDT 2003



brendan     03/06/19 18:17:27

  Modified:    src      definitions.h ices_config.c icestypes.h setup.c
                        stream.c
  Log:
  Revoke -l (loop playlist) option. A blank line works as well, and for
  playlist scripts too.

Revision  Changes    Path
1.14      +0 -1      ices/src/definitions.h

Index: definitions.h
===================================================================
RCS file: /cvs/ice/ices/src/definitions.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -u -r1.13 -r1.14
--- definitions.h	27 Mar 2003 13:55:49 -0000	1.13
+++ definitions.h	19 Jun 2003 22:17:27 -0000	1.14
@@ -126,7 +126,6 @@
 #define ICES_DEFAULT_CONFIGFILE "ices.conf"
 #define ICES_DEFAULT_PLAYLIST_FILE "playlist.txt"
 #define ICES_DEFAULT_RANDOMIZE_PLAYLIST 0
-#define ICES_DEFAULT_LOOP_PLAYLIST 1
 #define ICES_DEFAULT_DAEMON 0
 #define ICES_DEFAULT_BASE_DIRECTORY "/tmp"
 #define ICES_DEFAULT_PLAYLIST_TYPE ices_playlist_builtin_e;

<p><p>1.11      +0 -2      ices/src/ices_config.c

Index: ices_config.c
===================================================================
RCS file: /cvs/ice/ices/src/ices_config.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -u -r1.10 -r1.11
--- ices_config.c	12 Mar 2003 21:21:26 -0000	1.10
+++ ices_config.c	19 Jun 2003 22:17:27 -0000	1.11
@@ -275,8 +275,6 @@ parse_playlist_node (xmlDocPtr doc, xmlN
       ices_util_free (ices_config->pm.module);
       ices_config->pm.module =
         ices_util_strdup (ices_xml_read_node (doc, cur));
-    } else if (strcmp (cur->name, "Loop") == 0) {
-      ices_config->pm.loop_playlist = atoi (ices_xml_read_node (doc, cur));
     } else {
       ices_log ("Unknown playlist keyword: %s", cur->name);
     }

<p><p>1.24      +0 -1      ices/src/icestypes.h

Index: icestypes.h
===================================================================
RCS file: /cvs/ice/ices/src/icestypes.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -u -r1.23 -r1.24
--- icestypes.h	17 Mar 2003 04:45:03 -0000	1.23
+++ icestypes.h	19 Jun 2003 22:17:27 -0000	1.24
@@ -65,7 +65,6 @@ typedef struct ices_stream_St {
 typedef struct {
   playlist_type_t playlist_type;
   int randomize;
-  int loop_playlist;
   char* playlist_file;
   char* module;
 

<p><p>1.44      +1 -6      ices/src/setup.c

Index: setup.c
===================================================================
RCS file: /cvs/ice/ices/src/setup.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -p -u -r1.43 -r1.44
--- setup.c	13 Mar 2003 19:29:24 -0000	1.43
+++ setup.c	19 Jun 2003 22:17:27 -0000	1.44
@@ -158,7 +158,6 @@ ices_setup_parse_defaults (ices_config_t
     ices_util_strdup (ICES_DEFAULT_PLAYLIST_FILE);
   ices_config->pm.module = ices_util_strdup (ICES_DEFAULT_MODULE);
   ices_config->pm.randomize = ICES_DEFAULT_RANDOMIZE_PLAYLIST;
-  ices_config->pm.loop_playlist = ICES_DEFAULT_LOOP_PLAYLIST;
   ices_config->pm.playlist_type = ICES_DEFAULT_PLAYLIST_TYPE;
 
   ices_config->streams = (ices_stream_t*) malloc (sizeof (ices_stream_t));
@@ -315,7 +314,7 @@ ices_setup_parse_command_line (ices_conf
     s = argv[arg];
 
     if (s[0] == '-') {
-      if ((strchr ("BilRrsVv", s[1]) == NULL) && arg >= (argc - 1)) {
+      if ((strchr ("BiRrsVv", s[1]) == NULL) && arg >= (argc - 1)) {
         fprintf (stderr, "Option %c requires an argument!\n", s[1]);
         ices_setup_usage ();
         ices_setup_shutdown ();
@@ -370,9 +369,6 @@ ices_setup_parse_command_line (ices_conf
         case 'i':
           stream->protocol = icy_protocol_e;
           break;
-        case 'l':
-                    ices_config->pm.loop_playlist = 0;
-	  break;
         case 'M':
           arg++;
           ices_util_free (ices_config->pm.module);
@@ -526,7 +522,6 @@ ices_setup_usage (void)
   printf ("\t-g <stream genre>\n");
   printf ("\t-h <host>\n");
   printf ("\t-i (use icy headers)\n");
-  printf ("\t-l (don't restart the playlist (no looping))\n");
   printf ("\t-M <interpreter module>\n");
   printf ("\t-m <mountpoint>\n");
   printf ("\t-n <stream name>\n");

<p><p>1.54      +1 -12     ices/src/stream.c

Index: stream.c
===================================================================
RCS file: /cvs/ice/ices/src/stream.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -p -u -r1.53 -r1.54
--- stream.c	24 Mar 2003 04:16:15 -0000	1.53
+++ stream.c	19 Jun 2003 22:17:27 -0000	1.54
@@ -65,8 +65,6 @@ void
 ices_stream_loop (ices_config_t* config)
 {
   int consecutive_errors = 0;
-  int linenum_old = 0;
-  int linenum_new = 0;
   input_stream_t source;
   ices_stream_t* stream;
   int rc;
@@ -79,16 +77,7 @@ ices_stream_loop (ices_config_t* config)
 
     source.path = ices_playlist_get_next ();
 
-    /* keep track of the line numbers */
-    linenum_old = linenum_new;
-    linenum_new = ices_playlist_get_current_lineno ();
-    ices_cue_set_lineno (linenum_new);
-
-    /* we quit if we're told not to loop and the the new line num is lower than the old */
-    if ( !config->pm.loop_playlist && ( linenum_new < linenum_old ) ) {
-      ices_log ("Info: next playlist line number less than previous and looping disabled: quitting.");
-      ices_setup_shutdown ();
-    }
+    ices_cue_set_lineno (ices_playlist_get_current_lineno ());
 
     /* We quit if the playlist handler gives us a NULL filename */
     if (!source.path) {

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list