]> git.sesse.net Git - vlc/commitdiff
configure.ac: typo, fix #1204
authorRafaël Carré <funman@videolan.org>
Mon, 1 Oct 2007 00:29:00 +0000 (00:29 +0000)
committerRafaël Carré <funman@videolan.org>
Mon, 1 Oct 2007 00:29:00 +0000 (00:29 +0000)
configure.ac
extras/mpris.py
modules/control/dbus.c
modules/control/rc.c
modules/misc/notify/notify.c
src/network/io.c

index 55cefa7866cf9bcff91b2a645cbab1c24e2c5827..a6e2e3f35361d9d32861994a910dce409fd191b0 100644 (file)
@@ -1508,7 +1508,7 @@ AS_IF([test "${CFLAGS_TUNING}"],
 dnl
 dnl  x86 accelerations
 dnl
-if test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "x86" -o "${host_cpu}" = "i386" -o "${host_cpu}"="i486" -o "${host_cpu}" = "x86_64"
+if test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "x86" -o "${host_cpu}" = "i386" -o "${host_cpu}" = "i486" -o "${host_cpu}" = "x86_64"
 then
     ARCH="${ARCH} mmx"
     VLC_ADD_PLUGINS([${ACCEL_MODULES}])
index 3f25494b770db128e7a3bba7f5543777574349f4..3473f3cb5b5f2a20be757ada8c446b7841f320db 100755 (executable)
@@ -182,21 +182,33 @@ def Loop(widget):
 
 # update status display
 def update(widget):
-    item = tracklist.GetMetadata(tracklist.GetCurrentTrack())
+    Track = player.GetMetadata()
     vol.set_value(player.VolumeGet())
     try: 
-        a = item["artist"]
-    except:        a = ""
+        a = Track["artist"]
+    except:
+        a = ""
     try:
-        t = item["title"]
-    except:        t = ""
+        t = Track["title"]
+    except:        
+        t = ""
     if t == "":
         try:
-            t = item["URI"]
+            t = Track["URI"]
         except:
             t = ""
     l_artist.set_text(a)
     l_title.set_text(t)
+    try:
+        length = Track["length"]
+    except:
+        length = 0
+    if length > 0:
+        time_s.set_range(0,Track["length"])
+        time_s.set_sensitive(True)
+    else:
+        # disable the position scale if length isn't available
+        time_s.set_sensitive(False)
     GetPlayStatus(0)
 
 # callback for volume change
@@ -211,7 +223,10 @@ def timechange(widget, x=None, y=None):
 def timeset():
     global playing
     if playing == True:
-        time_s.set_value(player.PositionGet())
+        try:
+            time_s.set_value(player.PositionGet())
+        except:
+            playing = False
     return True
 
 # toggle simple/full display
index 8b8c0482c61163b183fe0eafdfa03d716106478e..832d3c1955873cf066892aad435f992f586b4ed8 100644 (file)
@@ -526,12 +526,12 @@ DBUS_METHOD( Random )
     dbus_bool_t b_random;
     vlc_value_t val;
     playlist_t* p_playlist = NULL;
+
     dbus_error_init( &error );
     dbus_message_get_args( p_from, &error,
             DBUS_TYPE_BOOLEAN, &b_random,
             DBUS_TYPE_INVALID );
+
     if( dbus_error_is_set( &error ) )
     {
         msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
@@ -541,7 +541,7 @@ DBUS_METHOD( Random )
     }
 
     val.b_bool = ( b_random == TRUE ) ? VLC_TRUE : VLC_FALSE ;
+
     p_playlist = pl_Yield( (vlc_object_t*) p_this );
     var_Set ( p_playlist, "random", val );
     pl_Release( ((vlc_object_t*) p_this) );
index c9bd4db33059be3e08a1bc765396b1790c952d85..80f230021d5e66b7b81abb0479852da9fcb30373 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * rc.c : remote control stdin/stdout module for vlc
  *****************************************************************************
- * Copyright (C) 2004 - 2005 the VideoLAN team
+ * Copyright (C) 2004-2007 the VideoLAN team
  * $Id$
  *
  * Author: Peter Surda <shurdeek@panorama.sth.ac.at>
@@ -1941,15 +1941,26 @@ vlc_bool_t ReadCommand( intf_thread_t *p_intf, char *p_buffer, int *pi_size )
     }
 #endif
 
-    while( !intf_ShouldDie( p_intf ) && *pi_size < MAX_LINE_LENGTH &&
-           (i_read = net_Read( p_intf, p_intf->p_sys->i_socket == -1 ?
-                       0 /*STDIN_FILENO*/ : p_intf->p_sys->i_socket, NULL,
-                  (uint8_t *)p_buffer + *pi_size, 1, VLC_FALSE ) ) > 0 )
+    int i_socket =  p_intf->p_sys->i_socket == -1 ? 0 : p_intf->p_sys->i_socket;
+    /* 0 == STDIN_FILENO */
+
+    while( !intf_ShouldDie( p_intf ) && *pi_size < MAX_LINE_LENGTH )
     {
-        if( p_buffer[ *pi_size ] == '\r' || p_buffer[ *pi_size ] == '\n' )
-            break;
+        i_read = net_Read( p_intf, i_socket, NULL,
+                           (uint8_t *)p_buffer + *pi_size, 1, VLC_FALSE );
+
+        if( i_read > 0 )
+        {
+            if( p_buffer[ *pi_size ] == '\r' || p_buffer[ *pi_size ] == '\n' )
+                break;
 
-        (*pi_size)++;
+            (*pi_size)++;
+        }
+        else if( i_read == 0 )
+            break;
+        else if( errno != EINTR )
+        /* we try again if a system call was interrupted */
+            break;
     }
 
     /* Connection closed */
index 5319c1b179dc48d9a2b04d40a4ec9e115b9c68de..af017007f48a0c3e18a634f10a18388c769e8e1b 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * notify.c : libnotify notification plugin
  *****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2006-2007 the VideoLAN team
  * $Id$
  *
  * Authors: Christophe Mutricy <xtophe -at- videolan -dot- org>
index cfcec6b1f4f626a83ea3ab8e78a968916291790b..62e9e7164ef5d965c115c51d259d78d5365ead25 100644 (file)
@@ -267,6 +267,8 @@ net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
 #if defined(WIN32) || defined(UNDER_CE)
             WSASetLastError (WSAEINTR);
 #else
+            if( p_this->b_die ) printf("b_die\n");
+            else printf("p_libvlc->b_die\n");
             errno = EINTR;
 #endif
             goto error;