From 5c026ec0db939a0a08ec39d03d3f975f3f9629b2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 2 Jun 2005 09:39:21 +0000 Subject: [PATCH] gst/gstpipeline.c: Take snapshot of state without blocking. Original commit message from CVS: * gst/gstpipeline.c: (gst_pipeline_send_event): Take snapshot of state without blocking. --- ChangeLog | 5 +++++ gst/gstpipeline.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd6795a5f5..4627668146 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-06-02 Wim Taymans + + * gst/gstpipeline.c: (gst_pipeline_send_event): + Take snapshot of state without blocking. + 2005-06-02 Wim Taymans * docs/design/part-TODO.txt: diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c index 2bca8361b3..6d7524d84c 100644 --- a/gst/gstpipeline.c +++ b/gst/gstpipeline.c @@ -290,11 +290,13 @@ gst_pipeline_send_event (GstElement * element, GstEvent * event) gboolean res; GstElementState state; GstEventType event_type = GST_EVENT_TYPE (event); + GTimeVal timeout; /* need to call _get_state() since a bin state is only updated - * with this call. FIXME, we should probably not block but just - * take a snapshot. */ - gst_element_get_state (element, &state, NULL, NULL); + * with this call. */ + GST_TIME_TO_TIMEVAL (0, timeout); + + gst_element_get_state (element, &state, NULL, &timeout); was_playing = state == GST_STATE_PLAYING; if (was_playing && event_type == GST_EVENT_SEEK) -- 2.34.1