gst_pad_peer_accept_caps() -> gst_pad_peer_query_accept_caps()
gst_pad_query_peer_*() -> gst_pad_peer_query_*()
+ GstPadFlags: GST_PAD_* -> GST_PAD_FLAG_*
* GstPadTemplate
gst_pad_template_get_caps() returns a new reference of the caps
const gchar *activation_mode = "-><";
/* check if pad flags */
- pad_flags[0] = GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_BLOCKED) ? 'B' : 'b';
- pad_flags[1] = GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLUSHING) ? 'F' : 'f';
- pad_flags[2] = GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_BLOCKING) ? 'B' : 'b';
+ pad_flags[0] =
+ GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_BLOCKED) ? 'B' : 'b';
+ pad_flags[1] =
+ GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_FLUSHING) ? 'F' : 'f';
+ pad_flags[2] =
+ GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_BLOCKING) ? 'B' : 'b';
pad_flags[3] = '\0';
fprintf (out,
GST_CAT_INFO_OBJECT (GST_CAT_ELEMENT_PADS, element, "adding pad '%s'",
GST_STR_NULL (pad_name));
flushing = GST_PAD_IS_FLUSHING (pad);
- GST_OBJECT_FLAG_SET (pad, GST_PAD_NEED_PARENT);
+ GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_NEED_PARENT);
GST_OBJECT_UNLOCK (pad);
/* then check to see if there's already a pad by that name here */
/* we had some new pending events, set our flag */
if (pending)
- GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_NEED_EVENTS);
+ GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_FLAG_NEED_EVENTS);
}
/* should be called with the OBJECT_LOCK */
} else {
if (!active) {
GST_OBJECT_LOCK (pad);
- GST_OBJECT_FLAG_UNSET (pad, GST_PAD_NEED_RECONFIGURE);
+ GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_NEED_RECONFIGURE);
GST_OBJECT_UNLOCK (pad);
}
}
if (mask & GST_PAD_PROBE_TYPE_BLOCKING) {
/* we have a block probe */
pad->num_blocked++;
- GST_OBJECT_FLAG_SET (pad, GST_PAD_BLOCKED);
+ GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_BLOCKED);
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, "added blocking probe, "
"now %d blocking probes", pad->num_blocked);
}
pad->num_blocked);
if (pad->num_blocked == 0) {
GST_DEBUG_OBJECT (pad, "last blocking probe removed, unblocking");
- GST_OBJECT_FLAG_UNSET (pad, GST_PAD_BLOCKED);
+ GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_BLOCKED);
GST_PAD_BLOCK_BROADCAST (pad);
}
}
g_return_val_if_fail (GST_IS_PAD (pad), result);
GST_OBJECT_LOCK (pad);
- result = GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_BLOCKED);
+ result = GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_BLOCKED);
GST_OBJECT_UNLOCK (pad);
return result;
GST_OBJECT_LOCK (pad);
/* the blocking flag is only valid if the pad is not flushing */
- result = GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_BLOCKING) &&
- !GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLUSHING);
+ result = GST_PAD_IS_BLOCKING (pad) && !GST_PAD_IS_FLUSHING (pad);
GST_OBJECT_UNLOCK (pad);
return result;
* gst_pad_check_reconfigure:
* @pad: the #GstPad to check
*
- * Check and clear the #GST_PAD_NEED_RECONFIGURE flag on @pad and return %TRUE
+ * Check and clear the #GST_PAD_FLAG_NEED_RECONFIGURE flag on @pad and return %TRUE
* if the flag was set.
*
- * Returns: %TRUE is the GST_PAD_NEED_RECONFIGURE flag was set on @pad.
+ * Returns: %TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag was set on @pad.
*/
gboolean
gst_pad_check_reconfigure (GstPad * pad)
GST_OBJECT_LOCK (pad);
reconfigure = GST_PAD_NEEDS_RECONFIGURE (pad);
- GST_OBJECT_FLAG_UNSET (pad, GST_PAD_NEED_RECONFIGURE);
+ GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_NEED_RECONFIGURE);
GST_OBJECT_UNLOCK (pad);
return reconfigure;
g_return_if_fail (GST_IS_PAD (pad));
GST_OBJECT_LOCK (pad);
- GST_OBJECT_FLAG_SET (pad, GST_PAD_NEED_RECONFIGURE);
+ GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_NEED_RECONFIGURE);
GST_OBJECT_UNLOCK (pad);
}
* the pad after setting the FLUSHING flag. */
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"Waiting to be unblocked or set flushing");
- GST_OBJECT_FLAG_SET (pad, GST_PAD_BLOCKING);
+ GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_BLOCKING);
GST_PAD_BLOCK_WAIT (pad);
- GST_OBJECT_FLAG_UNSET (pad, GST_PAD_BLOCKING);
+ GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_BLOCKING);
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, "We got unblocked");
if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))
/* take the current segment event, adjust it and then place
* it on the sinkpad. events on the srcpad are always active. */
if (replace_event (pad, peer, idx))
- GST_OBJECT_FLAG_SET (peer, GST_PAD_NEED_EVENTS);
+ GST_OBJECT_FLAG_SET (peer, GST_PAD_FLAG_NEED_EVENTS);
GST_OBJECT_UNLOCK (peer);
needs_events = GST_PAD_NEEDS_EVENTS (pad);
if (G_UNLIKELY (needs_events)) {
- GST_OBJECT_FLAG_UNSET (pad, GST_PAD_NEED_EVENTS);
+ GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_NEED_EVENTS);
GST_DEBUG_OBJECT (pad, "need to update all events");
ret = gst_pad_update_events (pad);
needs_events = GST_PAD_NEEDS_EVENTS (pad);
if (G_UNLIKELY (needs_events)) {
- GST_OBJECT_FLAG_UNSET (pad, GST_PAD_NEED_EVENTS);
+ GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_NEED_EVENTS);
GST_DEBUG_OBJECT (pad, "we need to update the events");
ret = gst_pad_update_events (pad);
}
case GST_EVENT_RECONFIGURE:
if (GST_PAD_IS_SINK (pad))
- GST_OBJECT_FLAG_SET (pad, GST_PAD_NEED_RECONFIGURE);
+ GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_NEED_RECONFIGURE);
break;
default:
break;
break;
case GST_EVENT_RECONFIGURE:
if (GST_PAD_IS_SRC (pad))
- GST_OBJECT_FLAG_SET (pad, GST_PAD_NEED_RECONFIGURE);
+ GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_NEED_RECONFIGURE);
default:
GST_CAT_DEBUG_OBJECT (GST_CAT_EVENT, pad, "have event type %s",
GST_EVENT_TYPE_NAME (event));
gst_event_replace (&ev->pending, event);
/* set the flag so that we update the events next time. We would
* usually update below but we might be flushing too. */
- GST_OBJECT_FLAG_SET (pad, GST_PAD_NEED_EVENTS);
+ GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_NEED_EVENTS);
needs_events = TRUE;
}
}
if (G_UNLIKELY (needs_events)) {
GstFlowReturn ret;
- GST_OBJECT_FLAG_UNSET (pad, GST_PAD_NEED_EVENTS);
+ GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_NEED_EVENTS);
GST_DEBUG_OBJECT (pad, "need to update all events");
ret = gst_pad_update_events (pad);
/**
* GstPadFlags:
- * @GST_PAD_BLOCKED: is dataflow on a pad blocked
- * @GST_PAD_FLUSHING: is pad refusing buffers
- * @GST_PAD_BLOCKING: is pad currently blocking on a buffer or event
- * @GST_PAD_NEED_RECONFIGURE: the pad should be reconfigured/renegotiated.
+ * @GST_PAD_FLAG_BLOCKED: is dataflow on a pad blocked
+ * @GST_PAD_FLAG_FLUSHING: is pad refusing buffers
+ * @GST_PAD_FLAG_BLOCKING: is pad currently blocking on a buffer or event
+ * @GST_PAD_FLAG_NEED_RECONFIGURE: the pad should be reconfigured/renegotiated.
* The flag has to be unset manually after
* reconfiguration happened.
* Since: 0.10.34.
- * @GST_PAD_NEED_EVENTS: the pad has pending events
- * @GST_PAD_FIXED_CAPS: the pad is using fixed caps this means that once the
+ * @GST_PAD_FLAG_NEED_EVENTS: the pad has pending events
+ * @GST_PAD_FLAG_FIXED_CAPS: the pad is using fixed caps this means that once the
* caps are set on the pad, the caps query function only
* returns those caps.
- * @GST_PAD_PROXY_CAPS: the default event and query handler will forward
+ * @GST_PAD_FLAG_PROXY_CAPS: the default event and query handler will forward
* all events and queries to the internally linked pads
* instead of discarding them.
- * @GST_PAD_NEED_PARENT: ensure that there is a parent object before calling
+ * @GST_PAD_FLAG_NEED_PARENT: ensure that there is a parent object before calling
* into the pad callbacks.
* @GST_PAD_FLAG_LAST: offset to define more flags
*
* Pad state flags
*/
typedef enum {
- GST_PAD_BLOCKED = (GST_OBJECT_FLAG_LAST << 0),
- GST_PAD_FLUSHING = (GST_OBJECT_FLAG_LAST << 1),
- GST_PAD_BLOCKING = (GST_OBJECT_FLAG_LAST << 2),
- GST_PAD_NEED_RECONFIGURE = (GST_OBJECT_FLAG_LAST << 3),
- GST_PAD_NEED_EVENTS = (GST_OBJECT_FLAG_LAST << 4),
- GST_PAD_FIXED_CAPS = (GST_OBJECT_FLAG_LAST << 5),
- GST_PAD_PROXY_CAPS = (GST_OBJECT_FLAG_LAST << 6),
- GST_PAD_NEED_PARENT = (GST_OBJECT_FLAG_LAST << 7),
+ GST_PAD_FLAG_BLOCKED = (GST_OBJECT_FLAG_LAST << 0),
+ GST_PAD_FLAG_FLUSHING = (GST_OBJECT_FLAG_LAST << 1),
+ GST_PAD_FLAG_BLOCKING = (GST_OBJECT_FLAG_LAST << 2),
+ GST_PAD_FLAG_NEED_RECONFIGURE = (GST_OBJECT_FLAG_LAST << 3),
+ GST_PAD_FLAG_NEED_EVENTS = (GST_OBJECT_FLAG_LAST << 4),
+ GST_PAD_FLAG_FIXED_CAPS = (GST_OBJECT_FLAG_LAST << 5),
+ GST_PAD_FLAG_PROXY_CAPS = (GST_OBJECT_FLAG_LAST << 6),
+ GST_PAD_FLAG_NEED_PARENT = (GST_OBJECT_FLAG_LAST << 7),
/* padding */
GST_PAD_FLAG_LAST = (GST_OBJECT_FLAG_LAST << 16)
} GstPadFlags;
#define GST_PAD_IS_ACTIVE(pad) (GST_PAD_ACTIVATE_MODE(pad) != GST_PAD_ACTIVATE_NONE)
-#define GST_PAD_IS_BLOCKED(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_BLOCKED))
-#define GST_PAD_IS_BLOCKING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_BLOCKING))
+#define GST_PAD_IS_BLOCKED(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_BLOCKED))
+#define GST_PAD_IS_BLOCKING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_BLOCKING))
-#define GST_PAD_IS_FLUSHING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLUSHING))
-#define GST_PAD_SET_FLUSHING(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLUSHING))
-#define GST_PAD_UNSET_FLUSHING(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLUSHING))
+#define GST_PAD_IS_FLUSHING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_FLUSHING))
+#define GST_PAD_SET_FLUSHING(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_FLUSHING))
+#define GST_PAD_UNSET_FLUSHING(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_FLUSHING))
-#define GST_PAD_NEEDS_RECONFIGURE(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_NEED_RECONFIGURE))
-#define GST_PAD_NEEDS_EVENTS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_NEED_EVENTS))
-#define GST_PAD_IS_FIXED_CAPS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FIXED_CAPS))
-#define GST_PAD_NEEDS_PARENT(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_NEED_PARENT))
+#define GST_PAD_NEEDS_RECONFIGURE(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_NEED_RECONFIGURE))
+#define GST_PAD_NEEDS_EVENTS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_NEED_EVENTS))
+#define GST_PAD_IS_FIXED_CAPS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_FIXED_CAPS))
+#define GST_PAD_NEEDS_PARENT(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_NEED_PARENT))
-#define GST_PAD_IS_PROXY_CAPS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_PROXY_CAPS))
-#define GST_PAD_SET_PROXY_CAPS(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_PROXY_CAPS))
-#define GST_PAD_UNSET_PROXY_CAPS(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_PROXY_CAPS))
+#define GST_PAD_IS_PROXY_CAPS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_PROXY_CAPS))
+#define GST_PAD_SET_PROXY_CAPS(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PROXY_CAPS))
+#define GST_PAD_UNSET_PROXY_CAPS(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_PROXY_CAPS))
/**
* GST_PAD_GET_STREAM_LOCK:
void
gst_pad_use_fixed_caps (GstPad * pad)
{
- GST_OBJECT_FLAG_SET (pad, GST_PAD_FIXED_CAPS);
+ GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_FIXED_CAPS);
}
/**
goto failed_configure;
GST_OBJECT_LOCK (trans->sinkpad);
- GST_OBJECT_FLAG_UNSET (trans->srcpad, GST_PAD_NEED_RECONFIGURE);
+ GST_OBJECT_FLAG_UNSET (trans->srcpad, GST_PAD_FLAG_NEED_RECONFIGURE);
trans->priv->reconfigure = FALSE;
GST_OBJECT_UNLOCK (trans->sinkpad);
GST_OBJECT_LOCK (trans->sinkpad);
reconfigure = GST_PAD_NEEDS_RECONFIGURE (trans->srcpad)
|| trans->priv->reconfigure;
- GST_OBJECT_FLAG_UNSET (trans->srcpad, GST_PAD_NEED_RECONFIGURE);
+ GST_OBJECT_FLAG_UNSET (trans->srcpad, GST_PAD_FLAG_NEED_RECONFIGURE);
trans->priv->reconfigure = FALSE;
GST_OBJECT_UNLOCK (trans->sinkpad);
GST_DEBUG_FUNCPTR (gst_input_selector_query));
gst_pad_set_event_function (sel->srcpad,
GST_DEBUG_FUNCPTR (gst_input_selector_event));
- GST_OBJECT_FLAG_SET (sel->srcpad, GST_PAD_PROXY_CAPS);
+ GST_OBJECT_FLAG_SET (sel->srcpad, GST_PAD_FLAG_PROXY_CAPS);
gst_element_add_pad (GST_ELEMENT (sel), sel->srcpad);
/* sinkpad management */
sel->active_sinkpad = NULL;
gst_pad_set_iterate_internal_links_function (sinkpad,
GST_DEBUG_FUNCPTR (gst_selector_pad_iterate_linked_pads));
- GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_PROXY_CAPS);
+ GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_FLAG_PROXY_CAPS);
gst_pad_set_active (sinkpad, TRUE);
gst_element_add_pad (GST_ELEMENT (sel), sinkpad);
GST_INPUT_SELECTOR_UNLOCK (sel);
GST_DEBUG_FUNCPTR (gst_multi_queue_sink_query));
gst_pad_set_iterate_internal_links_function (sq->sinkpad,
GST_DEBUG_FUNCPTR (gst_multi_queue_iterate_internal_links));
- GST_OBJECT_FLAG_SET (sq->sinkpad, GST_PAD_PROXY_CAPS);
+ GST_OBJECT_FLAG_SET (sq->sinkpad, GST_PAD_FLAG_PROXY_CAPS);
name = g_strdup_printf ("src_%u", sq->id);
sq->srcpad = gst_pad_new_from_static_template (&srctemplate, name);
GST_DEBUG_FUNCPTR (gst_multi_queue_src_query));
gst_pad_set_iterate_internal_links_function (sq->srcpad,
GST_DEBUG_FUNCPTR (gst_multi_queue_iterate_internal_links));
- GST_OBJECT_FLAG_SET (sq->srcpad, GST_PAD_PROXY_CAPS);
+ GST_OBJECT_FLAG_SET (sq->srcpad, GST_PAD_FLAG_PROXY_CAPS);
gst_pad_set_element_private (sq->sinkpad, (gpointer) sq);
gst_pad_set_element_private (sq->srcpad, (gpointer) sq);
GST_DEBUG_FUNCPTR (gst_queue2_handle_sink_event));
gst_pad_set_query_function (queue->sinkpad,
GST_DEBUG_FUNCPTR (gst_queue2_handle_sink_query));
- GST_OBJECT_FLAG_SET (queue->sinkpad, GST_PAD_PROXY_CAPS);
+ GST_OBJECT_FLAG_SET (queue->sinkpad, GST_PAD_FLAG_PROXY_CAPS);
gst_element_add_pad (GST_ELEMENT (queue), queue->sinkpad);
queue->srcpad = gst_pad_new_from_static_template (&srctemplate, "src");
GST_DEBUG_FUNCPTR (gst_queue2_handle_src_event));
gst_pad_set_query_function (queue->srcpad,
GST_DEBUG_FUNCPTR (gst_queue2_handle_src_query));
- GST_OBJECT_FLAG_SET (queue->srcpad, GST_PAD_PROXY_CAPS);
+ GST_OBJECT_FLAG_SET (queue->srcpad, GST_PAD_FLAG_PROXY_CAPS);
gst_element_add_pad (GST_ELEMENT (queue), queue->srcpad);
/* levels */
gst_pad_set_chain_function (tee->sinkpad, GST_DEBUG_FUNCPTR (gst_tee_chain));
gst_pad_set_chain_list_function (tee->sinkpad,
GST_DEBUG_FUNCPTR (gst_tee_chain_list));
- GST_OBJECT_FLAG_SET (tee->sinkpad, GST_PAD_PROXY_CAPS);
+ GST_OBJECT_FLAG_SET (tee->sinkpad, GST_PAD_FLAG_PROXY_CAPS);
gst_element_add_pad (GST_ELEMENT (tee), tee->sinkpad);
tee->last_message = NULL;
GST_DEBUG_FUNCPTR (gst_tee_src_get_range));
/* Forward sticky events to the new srcpad */
gst_pad_sticky_events_foreach (tee->sinkpad, forward_sticky_events, srcpad);
- GST_OBJECT_FLAG_SET (srcpad, GST_PAD_PROXY_CAPS);
+ GST_OBJECT_FLAG_SET (srcpad, GST_PAD_FLAG_PROXY_CAPS);
gst_element_add_pad (GST_ELEMENT_CAST (tee), srcpad);
return srcpad;