mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
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:
parent
c41ec35eaf
commit
5c026ec0db
2 changed files with 10 additions and 3 deletions
|
@ -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>
|
2005-06-02 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* docs/design/part-TODO.txt:
|
* docs/design/part-TODO.txt:
|
||||||
|
|
|
@ -290,11 +290,13 @@ gst_pipeline_send_event (GstElement * element, GstEvent * event)
|
||||||
gboolean res;
|
gboolean res;
|
||||||
GstElementState state;
|
GstElementState state;
|
||||||
GstEventType event_type = GST_EVENT_TYPE (event);
|
GstEventType event_type = GST_EVENT_TYPE (event);
|
||||||
|
GTimeVal timeout;
|
||||||
|
|
||||||
/* need to call _get_state() since a bin state is only updated
|
/* need to call _get_state() since a bin state is only updated
|
||||||
* with this call. FIXME, we should probably not block but just
|
* with this call. */
|
||||||
* take a snapshot. */
|
GST_TIME_TO_TIMEVAL (0, timeout);
|
||||||
gst_element_get_state (element, &state, NULL, NULL);
|
|
||||||
|
gst_element_get_state (element, &state, NULL, &timeout);
|
||||||
was_playing = state == GST_STATE_PLAYING;
|
was_playing = state == GST_STATE_PLAYING;
|
||||||
|
|
||||||
if (was_playing && event_type == GST_EVENT_SEEK)
|
if (was_playing && event_type == GST_EVENT_SEEK)
|
||||||
|
|
Loading…
Reference in a new issue