diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2008-03-20 16:48:46 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-03-20 16:48:46 +0000 |
commit | a00c9300d4a4ce9ff4565034f70a5c2193912af8 (patch) | |
tree | 959dc742544e29d9c8858b7928dc7522b9433b1a /gst/selector/gstinputselector.h | |
parent | 6ad41986af602c84943ce3aa5fa373047dcd9114 (diff) | |
download | gst-plugins-bad-a00c9300d4a4ce9ff4565034f70a5c2193912af8.tar.gz gst-plugins-bad-a00c9300d4a4ce9ff4565034f70a5c2193912af8.tar.bz2 gst-plugins-bad-a00c9300d4a4ce9ff4565034f70a5c2193912af8.zip |
gst/selector/gstinputselector.*: Figure out the locking a bit more.
Original commit message from CVS:
* gst/selector/gstinputselector.c:
(gst_selector_pad_get_running_time), (gst_selector_pad_reset),
(gst_selector_pad_event), (gst_selector_pad_bufferalloc),
(gst_input_selector_wait), (gst_selector_pad_chain),
(gst_input_selector_class_init), (gst_input_selector_init),
(gst_input_selector_dispose), (gst_segment_set_start),
(gst_input_selector_set_active_pad),
(gst_input_selector_set_property),
(gst_input_selector_get_property),
(gst_input_selector_get_linked_pad),
(gst_input_selector_is_active_sinkpad),
(gst_input_selector_activate_sinkpad),
(gst_input_selector_request_new_pad),
(gst_input_selector_release_pad),
(gst_input_selector_change_state), (gst_input_selector_block),
(gst_input_selector_switch):
* gst/selector/gstinputselector.h:
Figure out the locking a bit more.
Mark buffers with discont after switching.
Fix initial segment forwarding, make sure to only forward one segment
regardless of what the sequence of buffers/segments is. See #522203.
Improve flushing when blocked.
Return NOT_LINKED when a stream is not selected.
Not API change for the switch signal in the docs.
Fix start/time/accum values of the new segment.
Correctly unlock and flush a blocking selector when going to READY.
Diffstat (limited to 'gst/selector/gstinputselector.h')
-rw-r--r-- | gst/selector/gstinputselector.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gst/selector/gstinputselector.h b/gst/selector/gstinputselector.h index daefced8..58a671d5 100644 --- a/gst/selector/gstinputselector.h +++ b/gst/selector/gstinputselector.h @@ -40,6 +40,14 @@ G_BEGIN_DECLS typedef struct _GstInputSelector GstInputSelector; typedef struct _GstInputSelectorClass GstInputSelectorClass; +#define GST_INPUT_SELECTOR_GET_LOCK(sel) (((GstInputSelector*)(sel))->lock) +#define GST_INPUT_SELECTOR_GET_COND(sel) (((GstInputSelector*)(sel))->cond) +#define GST_INPUT_SELECTOR_LOCK(sel) (g_mutex_lock (GST_INPUT_SELECTOR_GET_LOCK(sel))) +#define GST_INPUT_SELECTOR_UNLOCK(sel) (g_mutex_unlock (GST_INPUT_SELECTOR_GET_LOCK(sel))) +#define GST_INPUT_SELECTOR_WAIT(sel) (g_cond_wait (GST_INPUT_SELECTOR_GET_COND(sel), \ + GST_INPUT_SELECTOR_GET_LOCK(sel))) +#define GST_INPUT_SELECTOR_BROADCAST(sel) (g_cond_broadcast (GST_INPUT_SELECTOR_GET_COND(sel))) + struct _GstInputSelector { GstElement element; @@ -49,12 +57,13 @@ struct _GstInputSelector { guint n_pads; guint padcount; - GstSegment segment; + GstSegment segment; /* the output segment */ + gboolean pending_close; /* if we should push a close first */ - GCond *blocked_cond; + GMutex *lock; + GCond *cond; gboolean blocked; - gboolean pending_stop; - GstSegment pending_stop_segment; + gboolean flushing; /* select all mode, send data from all input pads forward */ gboolean select_all; |