Commit 89563c1a authored by Ali Abdallah's avatar Ali Abdallah

Revert "For local media files, check the stream caps only when switching from...

Revert "For local media files, check the stream caps only when switching from ready to paused state."

This reverts commit 1a09d817.

It contains wrong code from 0.2.2 branch
parent 4f874ff0
......@@ -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");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment