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.
This commit is contained in:
Wim Taymans 2005-06-02 09:39:21 +00:00
parent c41ec35eaf
commit 5c026ec0db
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2005-06-02 Wim Taymans <wim@fluendo.com>
* gst/gstpipeline.c: (gst_pipeline_send_event):
Take snapshot of state without blocking.
2005-06-02 Wim Taymans <wim@fluendo.com>
* docs/design/part-TODO.txt:

View file

@ -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)