[Xfce4-commits] <parole:master> Revert "For local media files, check the stream caps only when switching from ready to paused state."

Ali Abdallah noreply at xfce.org
Thu Jan 14 10:12:01 CET 2010


Updating branch refs/heads/master
         to 89563c1ae389bc4b1b1b45fa7c3fccc509a60d86 (commit)
       from 4f874ff01dfa0c5538dc1c113331d6fddb174a0c (commit)

commit 89563c1ae389bc4b1b1b45fa7c3fccc509a60d86
Author: Ali Abdallah <aliov at xfce.org>
Date:   Thu Jan 14 10:05:51 2010 +0100

    Revert "For local media files, check the stream caps only when switching from ready to paused state."
    
    This reverts commit 1a09d817662e5d3be8cae120d6c006d2c7b6760a.
    
    It contains wrong code from 0.2.2 branch

 gst/parole-gst.c |   52 ++++++++++++++--------------------------------------
 1 files changed, 14 insertions(+), 38 deletions(-)

diff --git a/gst/parole-gst.c b/gst/parole-gst.c
index 2f982e7..cb30a38 100644
--- a/gst/parole-gst.c
+++ b/gst/parole-gst.c
@@ -34,7 +34,7 @@
 #include <gst/video/video.h>
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfce4ui/libxfce4ui.h>
+#include <libxfcegui4/libxfcegui4.h>
 
 #include <gdk/gdkx.h>
 
@@ -630,8 +630,8 @@ parole_gst_query_capabilities (ParoleGst *gst)
 				 NULL,
 				 NULL);
 	g_object_set (G_OBJECT (gst->priv->stream),
-	              "seekable", seekable,
-		      NULL);
+	          "seekable", seekable,
+		  NULL);
     }
     gst_query_unref (query);
 }
@@ -931,22 +931,9 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState
 	}
 	case GST_STATE_PAUSED:
 	{
-	    if ( pending == GST_STATE_PLAYING )
-	    {
-		ParoleMediaType media_type;
-		
-		g_object_get (G_OBJECT (gst->priv->stream),
-			      "media-type", &media_type,
-			      NULL);
-		
-		if ( (media_type == PAROLE_MEDIA_TYPE_LOCAL_FILE && old == GST_STATE_READY) ||
-		      media_type != PAROLE_MEDIA_TYPE_LOCAL_FILE )
-		{
-		    parole_gst_query_duration (gst);
-		    parole_gst_query_capabilities (gst);
-		    parole_gst_query_info (gst);
-		}
-	    }
+	    parole_gst_query_duration (gst);
+	    parole_gst_query_capabilities (gst);
+	    parole_gst_query_info (gst);
 
 	    if ( gst->priv->target == GST_STATE_PLAYING )
 	    {
@@ -966,7 +953,7 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState
 	    g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0, 
 			   gst->priv->stream, PAROLE_MEDIA_STATE_STOPPED);
 
-	    if ( gst->priv->target == GST_STATE_PLAYING && pending < GST_STATE_PAUSED)
+	    if ( gst->priv->target == GST_STATE_PLAYING && pending != GST_STATE_PLAYING)
 	    {
 		parole_gst_play_file_internal (gst);
 	    }
@@ -1507,11 +1494,8 @@ parole_gst_check_state_change_timeout (gpointer data)
     
     if ( gst->priv->state != gst->priv->target )
     {
-	gboolean ret_val = xfce_dialog_confirm (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
-						GTK_STOCK_YES,
-						_("Stop"),
-						_("The stream is taking too much time to load"), 
-						NULL);
+	gboolean ret_val = 
+	    xfce_confirm (_("The stream is taking too much time to load"), GTK_STOCK_OK, _("Stop"));
 	    
 	if ( ret_val )
 	{
@@ -1700,13 +1684,9 @@ parole_gst_constructed (GObject *object)
  
     if ( G_UNLIKELY (gst->priv->playbin == NULL) )
     {
-	GError *error;
-	error = g_error_new (0, 0, "%s", _("Unable to load playbin GStreamer plugin"
-					    ", check your GStreamer installation"));
-					    
-	xfce_dialog_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
-				error, NULL);
-	g_error_free (error);
+	xfce_err (_("Unable to load playbin GStreamer plugin"
+		    ", check your GStreamer installation"));
+		    
 	g_error ("playbin load failed");
     }
     
@@ -1724,12 +1704,8 @@ parole_gst_constructed (GObject *object)
 	
 	if ( G_UNLIKELY (gst->priv->video_sink == NULL) )
 	{
-	    GError *error;
-	    error = g_error_new (0, 0, "%s", _("Unable to load video GStreamer plugin"
-					      ", check your GStreamer installation"));
-	    xfce_dialog_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
-				error, NULL);
-	    g_error_free (error);
+	    xfce_err (_("Unable to load video GStreamer plugin"
+		      ", check your GStreamer installation"));
 	    g_error ("ximagesink load failed");
 	}
     }



More information about the Xfce4-commits mailing list