[Xfce4-commits] <parole:0.2.2> 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:04:04 CET 2010
Updating branch refs/heads/0.2.2
to 4568822db02335517d685604e66323636018c14f (commit)
from 3c88414b3b0edf3ed4620e62df9c69e39c05c67f (commit)
commit 4568822db02335517d685604e66323636018c14f
Author: Ali Abdallah <aliov at xfce.org>
Date: Thu Jan 14 10:01:19 2010 +0100
For local media files, check the stream caps only when switching from ready to paused state.
gst/parole-gst.c | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/gst/parole-gst.c b/gst/parole-gst.c
index c66fca5..2f982e7 100644
--- a/gst/parole-gst.c
+++ b/gst/parole-gst.c
@@ -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,9 +931,22 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState
}
case GST_STATE_PAUSED:
{
- parole_gst_query_duration (gst);
- parole_gst_query_capabilities (gst);
- parole_gst_query_info (gst);
+ 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);
+ }
+ }
if ( gst->priv->target == GST_STATE_PLAYING )
{
More information about the Xfce4-commits
mailing list