Re: [0.11] gstreamer: pad: add 2 new caps methods

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [0.11] gstreamer: pad: add 2 new caps methods

Sebastian Dröge-7
On Fri, 2011-05-06 at 10:12 -0700, Wim Taymans wrote:

> +GstCaps *
> +gst_pad_get_current_caps (GstPad * pad)
> +{
> +  GstCaps *result;
> +
> +  g_return_val_if_fail (GST_IS_PAD (pad), NULL);
> +
> +  GST_OBJECT_LOCK (pad);
> +  GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad, "get current pad caps");
> +  if ((result = get_pad_caps (pad)))
> +    gst_caps_ref (result);
> +  GST_OBJECT_UNLOCK (pad);
> +
> +  return result;
> +}
Isn't this the same as gst_pad_get_negotiated_caps()?

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [0.11] gstreamer: pad: add 2 new caps methods

Wim Taymans
On 05/06/2011 07:16 PM, Sebastian Dröge wrote:

> On Fri, 2011-05-06 at 10:12 -0700, Wim Taymans wrote:
>
>> +GstCaps *
>> +gst_pad_get_current_caps (GstPad * pad)
>> +{
>> +  GstCaps *result;
>> +
>> +  g_return_val_if_fail (GST_IS_PAD (pad), NULL);
>> +
>> +  GST_OBJECT_LOCK (pad);
>> +  GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad, "get current pad caps");
>> +  if ((result = get_pad_caps (pad)))
>> +    gst_caps_ref (result);
>> +  GST_OBJECT_UNLOCK (pad);
>> +
>> +  return result;
>> +}
>
> Isn't this the same as gst_pad_get_negotiated_caps()?

Almost, get_negotiated_caps() needs a peer and is rather useless that
way, it needs to go.

Wim
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel