_peer_get_caps() -> _peer_query_caps()

This commit is contained in:
Wim Taymans 2011-11-15 17:29:45 +01:00
parent b2d508ac40
commit 797523efbd
14 changed files with 23 additions and 23 deletions

View file

@ -305,7 +305,7 @@ gst_jpegenc_getcaps (GstPad * pad, GstCaps * filter)
/* we want to proxy properties like width, height and framerate from the /* we want to proxy properties like width, height and framerate from the
other end of the element */ other end of the element */
othercaps = gst_pad_peer_get_caps (jpegenc->srcpad, filter); othercaps = gst_pad_peer_query_caps (jpegenc->srcpad, filter);
if (othercaps == NULL || if (othercaps == NULL ||
gst_caps_is_empty (othercaps) || gst_caps_is_any (othercaps)) { gst_caps_is_empty (othercaps) || gst_caps_is_any (othercaps)) {
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad)); caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));

View file

@ -606,7 +606,7 @@ out:
static void static void
update_eac3_alignment (GstPulseAudioSink * pbin) update_eac3_alignment (GstPulseAudioSink * pbin)
{ {
GstCaps *caps = gst_pad_peer_get_caps (pbin->sinkpad, NULL); GstCaps *caps = gst_pad_peer_query_caps (pbin->sinkpad, NULL);
GstStructure *st; GstStructure *st;
if (!caps) if (!caps)

View file

@ -933,7 +933,7 @@ gst_pulsesrc_negotiate (GstBaseSrc * basesrc)
goto no_nego_needed; goto no_nego_needed;
/* get the peer caps */ /* get the peer caps */
peercaps = gst_pad_peer_get_caps (GST_BASE_SRC_PAD (basesrc), NULL); peercaps = gst_pad_peer_query_caps (GST_BASE_SRC_PAD (basesrc), NULL);
GST_DEBUG_OBJECT (basesrc, "caps of peer: %" GST_PTR_FORMAT, peercaps); GST_DEBUG_OBJECT (basesrc, "caps of peer: %" GST_PTR_FORMAT, peercaps);
if (peercaps) { if (peercaps) {
/* get intersection */ /* get intersection */

View file

@ -254,7 +254,7 @@ gst_goom_src_negotiate (GstGoom * goom)
GST_DEBUG_OBJECT (goom, "performing negotiation"); GST_DEBUG_OBJECT (goom, "performing negotiation");
/* see what the peer can do */ /* see what the peer can do */
othercaps = gst_pad_peer_get_caps (goom->srcpad, NULL); othercaps = gst_pad_peer_query_caps (goom->srcpad, NULL);
if (othercaps) { if (othercaps) {
target = gst_caps_intersect (othercaps, templ); target = gst_caps_intersect (othercaps, templ);
gst_caps_unref (othercaps); gst_caps_unref (othercaps);

View file

@ -166,7 +166,7 @@ gst_alaw_dec_getcaps (GstPad * pad, GstCaps * filter)
otherpad = alawdec->srcpad; otherpad = alawdec->srcpad;
} }
/* get caps from the peer, this can return NULL when there is no peer */ /* get caps from the peer, this can return NULL when there is no peer */
othercaps = gst_pad_peer_get_caps (otherpad, filter); othercaps = gst_pad_peer_query_caps (otherpad, filter);
/* get the template caps to make sure we return something acceptable */ /* get the template caps to make sure we return something acceptable */
templ = gst_pad_get_pad_template_caps (pad); templ = gst_pad_get_pad_template_caps (pad);

View file

@ -318,7 +318,7 @@ gst_alaw_enc_getcaps (GstPad * pad, GstCaps * filter)
otherpad = alawenc->srcpad; otherpad = alawenc->srcpad;
} }
/* get caps from the peer, this can return NULL when there is no peer */ /* get caps from the peer, this can return NULL when there is no peer */
othercaps = gst_pad_peer_get_caps (otherpad, filter); othercaps = gst_pad_peer_query_caps (otherpad, filter);
/* get the template caps to make sure we return something acceptable */ /* get the template caps to make sure we return something acceptable */
templ = gst_pad_get_pad_template_caps (pad); templ = gst_pad_get_pad_template_caps (pad);

View file

@ -109,7 +109,7 @@ mulawdec_getcaps (GstPad * pad, GstCaps * filter)
otherpad = mulawdec->srcpad; otherpad = mulawdec->srcpad;
} }
/* get caps from the peer, this can return NULL when there is no peer */ /* get caps from the peer, this can return NULL when there is no peer */
othercaps = gst_pad_peer_get_caps (otherpad, filter); othercaps = gst_pad_peer_query_caps (otherpad, filter);
/* get the template caps to make sure we return something acceptable */ /* get the template caps to make sure we return something acceptable */
templ = gst_pad_get_pad_template_caps (pad); templ = gst_pad_get_pad_template_caps (pad);

View file

@ -73,7 +73,7 @@ mulawenc_getcaps (GstPad * pad, GstCaps * filter)
otherpad = mulawenc->srcpad; otherpad = mulawenc->srcpad;
} }
/* get caps from the peer, this can return NULL when there is no peer */ /* get caps from the peer, this can return NULL when there is no peer */
othercaps = gst_pad_peer_get_caps (otherpad, filter); othercaps = gst_pad_peer_query_caps (otherpad, filter);
/* get the template caps to make sure we return something acceptable */ /* get the template caps to make sure we return something acceptable */
templ = gst_pad_get_pad_template_caps (pad); templ = gst_pad_get_pad_template_caps (pad);

View file

@ -181,7 +181,7 @@ gst_rtp_g726_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
GST_DEBUG_OBJECT (payload, "selected base encoding %s", encoding_name); GST_DEBUG_OBJECT (payload, "selected base encoding %s", encoding_name);
/* now see if we need to produce AAL2 or not */ /* now see if we need to produce AAL2 or not */
peercaps = gst_pad_peer_get_caps (payload->srcpad, NULL); peercaps = gst_pad_peer_query_caps (payload->srcpad, NULL);
if (peercaps) { if (peercaps) {
GstCaps *filter, *intersect; GstCaps *filter, *intersect;
gchar *capsstr; gchar *capsstr;

View file

@ -182,7 +182,7 @@ gst_rtp_h263p_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
g_return_val_if_fail (gst_caps_is_fixed (caps), FALSE); g_return_val_if_fail (gst_caps_is_fixed (caps), FALSE);
peercaps = peercaps =
gst_pad_peer_get_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), NULL); gst_pad_peer_query_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), NULL);
if (peercaps) { if (peercaps) {
GstCaps *intersect = gst_caps_intersect (peercaps, GstCaps *intersect = gst_caps_intersect (peercaps,
gst_pad_get_pad_template_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload))); gst_pad_get_pad_template_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload)));
@ -241,7 +241,7 @@ gst_rtp_h263p_pay_sink_getcaps (GstRTPBasePayload * payload, GstPad * pad,
rtph263ppay = GST_RTP_H263P_PAY (payload); rtph263ppay = GST_RTP_H263P_PAY (payload);
peercaps = peercaps =
gst_pad_peer_get_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), filter); gst_pad_peer_query_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), filter);
if (!peercaps) if (!peercaps)
return return
gst_caps_copy (gst_pad_get_pad_template_caps gst_caps_copy (gst_pad_get_pad_template_caps

View file

@ -270,7 +270,7 @@ gst_rtp_h264_pay_getcaps (GstRTPBasePayload * payload, GstPad * pad,
GstCaps *allowed_caps; GstCaps *allowed_caps;
allowed_caps = allowed_caps =
gst_pad_peer_get_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), filter); gst_pad_peer_query_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), filter);
if (allowed_caps) { if (allowed_caps) {
GstCaps *caps = NULL; GstCaps *caps = NULL;

View file

@ -727,7 +727,7 @@ gst_rtp_jitter_buffer_getcaps (GstPad * pad, GstCaps * filter)
other = (pad == priv->srcpad ? priv->sinkpad : priv->srcpad); other = (pad == priv->srcpad ? priv->sinkpad : priv->srcpad);
caps = gst_pad_peer_get_caps (other, filter); caps = gst_pad_peer_query_caps (other, filter);
templ = gst_pad_get_pad_template_caps (pad); templ = gst_pad_get_pad_template_caps (pad);
if (caps == NULL) { if (caps == NULL) {

View file

@ -330,7 +330,7 @@ gst_shape_wipe_video_sink_getcaps (GstPad * pad, GstCaps * filter)
if (gst_pad_has_current_caps (pad)) if (gst_pad_has_current_caps (pad))
return gst_pad_get_current_caps (pad); return gst_pad_get_current_caps (pad);
tmp = gst_pad_peer_get_caps (self->srcpad, NULL); tmp = gst_pad_peer_query_caps (self->srcpad, NULL);
if (tmp) { if (tmp) {
ret = gst_caps_intersect (tmp, gst_pad_get_pad_template_caps (pad)); ret = gst_caps_intersect (tmp, gst_pad_get_pad_template_caps (pad));
gst_caps_unref (tmp); gst_caps_unref (tmp);
@ -343,7 +343,7 @@ gst_shape_wipe_video_sink_getcaps (GstPad * pad, GstCaps * filter)
if (gst_caps_is_empty (ret)) if (gst_caps_is_empty (ret))
goto done; goto done;
tmp = gst_pad_peer_get_caps (pad, NULL); tmp = gst_pad_peer_query_caps (pad, NULL);
GST_LOG_OBJECT (pad, "peerpad accepted caps: %" GST_PTR_FORMAT, tmp); GST_LOG_OBJECT (pad, "peerpad accepted caps: %" GST_PTR_FORMAT, tmp);
if (tmp) { if (tmp) {
@ -372,7 +372,7 @@ gst_shape_wipe_video_sink_getcaps (GstPad * pad, GstCaps * filter)
} }
} }
tmp = gst_pad_peer_get_caps (self->mask_sinkpad, NULL); tmp = gst_pad_peer_query_caps (self->mask_sinkpad, NULL);
GST_LOG_OBJECT (pad, "mask accepted caps: %" GST_PTR_FORMAT, tmp); GST_LOG_OBJECT (pad, "mask accepted caps: %" GST_PTR_FORMAT, tmp);
if (tmp) { if (tmp) {
@ -456,7 +456,7 @@ gst_shape_wipe_mask_sink_getcaps (GstPad * pad, GstCaps * filter)
if (gst_pad_has_current_caps (pad)) if (gst_pad_has_current_caps (pad))
return gst_pad_get_current_caps (pad); return gst_pad_get_current_caps (pad);
tmp = gst_pad_peer_get_caps (self->video_sinkpad, NULL); tmp = gst_pad_peer_query_caps (self->video_sinkpad, NULL);
if (tmp) { if (tmp) {
ret = ret =
gst_caps_intersect (tmp, gst_caps_intersect (tmp,
@ -471,7 +471,7 @@ gst_shape_wipe_mask_sink_getcaps (GstPad * pad, GstCaps * filter)
if (gst_caps_is_empty (ret)) if (gst_caps_is_empty (ret))
goto done; goto done;
tmp = gst_pad_peer_get_caps (self->srcpad, NULL); tmp = gst_pad_peer_query_caps (self->srcpad, NULL);
GST_LOG_OBJECT (pad, "srcpad accepted caps: %" GST_PTR_FORMAT, ret); GST_LOG_OBJECT (pad, "srcpad accepted caps: %" GST_PTR_FORMAT, ret);
if (tmp) { if (tmp) {
@ -512,7 +512,7 @@ gst_shape_wipe_mask_sink_getcaps (GstPad * pad, GstCaps * filter)
} }
gst_caps_append (ret, tmp); gst_caps_append (ret, tmp);
tmp = gst_pad_peer_get_caps (pad, NULL); tmp = gst_pad_peer_query_caps (pad, NULL);
GST_LOG_OBJECT (pad, "peer accepted caps: %" GST_PTR_FORMAT, tmp); GST_LOG_OBJECT (pad, "peer accepted caps: %" GST_PTR_FORMAT, tmp);
if (tmp) { if (tmp) {
@ -543,7 +543,7 @@ gst_shape_wipe_src_getcaps (GstPad * pad, GstCaps * filter)
else if (gst_pad_has_current_caps (self->video_sinkpad)) else if (gst_pad_has_current_caps (self->video_sinkpad))
return gst_pad_get_current_caps (self->video_sinkpad); return gst_pad_get_current_caps (self->video_sinkpad);
tmp = gst_pad_peer_get_caps (self->video_sinkpad, NULL); tmp = gst_pad_peer_query_caps (self->video_sinkpad, NULL);
if (tmp) { if (tmp) {
ret = ret =
gst_caps_intersect (tmp, gst_caps_intersect (tmp,
@ -558,7 +558,7 @@ gst_shape_wipe_src_getcaps (GstPad * pad, GstCaps * filter)
if (gst_caps_is_empty (ret)) if (gst_caps_is_empty (ret))
goto done; goto done;
tmp = gst_pad_peer_get_caps (pad, NULL); tmp = gst_pad_peer_query_caps (pad, NULL);
GST_LOG_OBJECT (pad, "peer accepted caps: %" GST_PTR_FORMAT, ret); GST_LOG_OBJECT (pad, "peer accepted caps: %" GST_PTR_FORMAT, ret);
if (tmp) { if (tmp) {
GstCaps *intersection; GstCaps *intersection;
@ -586,7 +586,7 @@ gst_shape_wipe_src_getcaps (GstPad * pad, GstCaps * filter)
} }
} }
tmp = gst_pad_peer_get_caps (self->mask_sinkpad, NULL); tmp = gst_pad_peer_query_caps (self->mask_sinkpad, NULL);
GST_LOG_OBJECT (pad, "mask sink accepted caps: %" GST_PTR_FORMAT, ret); GST_LOG_OBJECT (pad, "mask sink accepted caps: %" GST_PTR_FORMAT, ret);
if (tmp) { if (tmp) {
GstCaps *intersection, *tmp2; GstCaps *intersection, *tmp2;

View file

@ -327,7 +327,7 @@ gst_v4l2src_negotiate (GstBaseSrc * basesrc)
goto no_nego_needed; goto no_nego_needed;
/* get the peer caps */ /* get the peer caps */
peercaps = gst_pad_peer_get_caps (GST_BASE_SRC_PAD (basesrc), thiscaps); peercaps = gst_pad_peer_query_caps (GST_BASE_SRC_PAD (basesrc), thiscaps);
GST_DEBUG_OBJECT (basesrc, "caps of peer: %" GST_PTR_FORMAT, peercaps); GST_DEBUG_OBJECT (basesrc, "caps of peer: %" GST_PTR_FORMAT, peercaps);
LOG_CAPS (basesrc, peercaps); LOG_CAPS (basesrc, peercaps);
if (peercaps && !gst_caps_is_any (peercaps)) { if (peercaps && !gst_caps_is_any (peercaps)) {