mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
- queue can change state only when not connected
Original commit message from CVS: - queue can change state only when not connected - bufferpools can only be requested from srcpads
This commit is contained in:
parent
abfc7a0ed8
commit
f8feed18a0
3 changed files with 11 additions and 7 deletions
14
gst/gstpad.c
14
gst/gstpad.c
|
@ -377,13 +377,13 @@ gst_pad_set_active (GstPad *pad, gboolean active)
|
|||
|
||||
g_return_if_fail (GST_IS_PAD (pad));
|
||||
|
||||
if (GST_PAD_IS_ACTIVE (pad) == active)
|
||||
old = GST_PAD_IS_ACTIVE (pad);
|
||||
|
||||
if (old == active)
|
||||
return;
|
||||
|
||||
realpad = GST_PAD_REALIZE (pad);
|
||||
|
||||
old = GST_FLAG_IS_SET (realpad, GST_PAD_DISABLED);
|
||||
|
||||
if (active) {
|
||||
GST_DEBUG (GST_CAT_PADS, "activating pad %s:%s",
|
||||
GST_DEBUG_PAD_NAME (realpad));
|
||||
|
@ -803,7 +803,8 @@ gst_pad_set_getcaps_function (GstPad *pad,
|
|||
* @pad: a #GstPad to set the bufferpool function for.
|
||||
* @bufpool: the #GstPadBufferPoolFunction to set.
|
||||
*
|
||||
* Sets the given bufferpool function for the pad.
|
||||
* Sets the given bufferpool function for the pad. Note that the
|
||||
* bufferpool function can only be set on sinkpads.
|
||||
*/
|
||||
void
|
||||
gst_pad_set_bufferpool_function (GstPad *pad,
|
||||
|
@ -811,6 +812,7 @@ gst_pad_set_bufferpool_function (GstPad *pad,
|
|||
{
|
||||
g_return_if_fail (pad != NULL);
|
||||
g_return_if_fail (GST_IS_REAL_PAD (pad));
|
||||
g_return_if_fail (GST_PAD_IS_SINK (pad));
|
||||
|
||||
GST_RPAD_BUFFERPOOLFUNC (pad) = bufpool;
|
||||
GST_DEBUG (GST_CAT_PADS, "bufferpoolfunc for %s:%s set to %s",
|
||||
|
@ -1926,7 +1928,8 @@ gst_pad_recalc_allowed_caps (GstPad *pad)
|
|||
* gst_pad_get_bufferpool:
|
||||
* @pad: a #GstPad to get the bufferpool from.
|
||||
*
|
||||
* Gets the bufferpool of the peer pad of the given pad.
|
||||
* Gets the bufferpool of the peer pad of the given pad.Note that
|
||||
* a bufferpool can only be obtained from a srcpad.
|
||||
*
|
||||
* Returns: the #GstBufferPool, or NULL in case of an error.
|
||||
*/
|
||||
|
@ -1937,6 +1940,7 @@ gst_pad_get_bufferpool (GstPad *pad)
|
|||
|
||||
g_return_val_if_fail (pad != NULL, NULL);
|
||||
g_return_val_if_fail (GST_IS_PAD (pad), NULL);
|
||||
g_return_val_if_fail (GST_PAD_IS_SRC (pad), NULL);
|
||||
|
||||
peer = GST_RPAD_PEER (pad);
|
||||
|
||||
|
|
|
@ -644,7 +644,7 @@ gst_queue_change_state (GstElement *element)
|
|||
gst_queue_locked_flush (queue);
|
||||
}
|
||||
else if (new_state == GST_STATE_PLAYING) {
|
||||
if (!GST_PAD_IS_USABLE (queue->sinkpad)) {
|
||||
if (!GST_PAD_IS_CONNECTED (queue->sinkpad)) {
|
||||
GST_DEBUG_ELEMENT (GST_CAT_STATES, queue, "queue %s is not connected", GST_ELEMENT_NAME (queue));
|
||||
/* FIXME can this be? */
|
||||
if (queue->reader)
|
||||
|
|
|
@ -644,7 +644,7 @@ gst_queue_change_state (GstElement *element)
|
|||
gst_queue_locked_flush (queue);
|
||||
}
|
||||
else if (new_state == GST_STATE_PLAYING) {
|
||||
if (!GST_PAD_IS_USABLE (queue->sinkpad)) {
|
||||
if (!GST_PAD_IS_CONNECTED (queue->sinkpad)) {
|
||||
GST_DEBUG_ELEMENT (GST_CAT_STATES, queue, "queue %s is not connected", GST_ELEMENT_NAME (queue));
|
||||
/* FIXME can this be? */
|
||||
if (queue->reader)
|
||||
|
|
Loading…
Reference in a new issue