mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-24 23:38:20 +00:00
appsrc: remove filter argument from gst_app_src_get_caps()
Was presumably added by mistaken in the grand _get_caps() conversion. Doesn't really make sense for a property accessor.
This commit is contained in:
parent
8f08f6d256
commit
e110d8b6f4
|
@ -557,7 +557,27 @@ gst_app_src_finalize (GObject * obj)
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
gst_app_src_internal_get_caps (GstBaseSrc * bsrc, GstCaps * filter)
|
gst_app_src_internal_get_caps (GstBaseSrc * bsrc, GstCaps * filter)
|
||||||
{
|
{
|
||||||
return gst_app_src_get_caps (GST_APP_SRC_CAST (bsrc), filter);
|
GstAppSrc *appsrc = GST_APP_SRC (bsrc);
|
||||||
|
GstCaps *caps;
|
||||||
|
|
||||||
|
GST_OBJECT_LOCK (appsrc);
|
||||||
|
if ((caps = appsrc->priv->caps))
|
||||||
|
gst_caps_ref (caps);
|
||||||
|
GST_OBJECT_UNLOCK (appsrc);
|
||||||
|
|
||||||
|
if (filter) {
|
||||||
|
if (caps) {
|
||||||
|
GstCaps *intersection =
|
||||||
|
gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
caps = intersection;
|
||||||
|
} else {
|
||||||
|
caps = gst_caps_ref (filter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (appsrc, "caps: %" GST_PTR_FORMAT, caps);
|
||||||
|
return caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -623,7 +643,7 @@ gst_app_src_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
|
||||||
/* we're missing a _take_caps() function to transfer ownership */
|
/* we're missing a _take_caps() function to transfer ownership */
|
||||||
caps = gst_app_src_get_caps (appsrc, NULL);
|
caps = gst_app_src_get_caps (appsrc);
|
||||||
gst_value_set_caps (value, caps);
|
gst_value_set_caps (value, caps);
|
||||||
if (caps)
|
if (caps)
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
@ -1107,33 +1127,11 @@ gst_app_src_set_caps (GstAppSrc * appsrc, const GstCaps * caps)
|
||||||
* Since: 0.10.22
|
* Since: 0.10.22
|
||||||
*/
|
*/
|
||||||
GstCaps *
|
GstCaps *
|
||||||
gst_app_src_get_caps (GstAppSrc * appsrc, GstCaps * filter)
|
gst_app_src_get_caps (GstAppSrc * appsrc)
|
||||||
{
|
{
|
||||||
GstCaps *caps;
|
|
||||||
GstAppSrcPrivate *priv;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_APP_SRC (appsrc), NULL);
|
g_return_val_if_fail (GST_IS_APP_SRC (appsrc), NULL);
|
||||||
|
|
||||||
priv = appsrc->priv;
|
return gst_app_src_internal_get_caps (GST_BASE_SRC_CAST (appsrc), NULL);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (appsrc);
|
|
||||||
if ((caps = priv->caps))
|
|
||||||
gst_caps_ref (caps);
|
|
||||||
|
|
||||||
if (filter) {
|
|
||||||
if (caps) {
|
|
||||||
GstCaps *intersection =
|
|
||||||
gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
|
|
||||||
gst_caps_unref (caps);
|
|
||||||
caps = intersection;
|
|
||||||
} else {
|
|
||||||
caps = gst_caps_ref (filter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
GST_DEBUG_OBJECT (appsrc, "getting caps of %" GST_PTR_FORMAT, caps);
|
|
||||||
GST_OBJECT_UNLOCK (appsrc);
|
|
||||||
|
|
||||||
return caps;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -122,7 +122,7 @@ GType gst_app_src_get_type(void);
|
||||||
GType gst_app_stream_type_get_type (void);
|
GType gst_app_stream_type_get_type (void);
|
||||||
|
|
||||||
void gst_app_src_set_caps (GstAppSrc *appsrc, const GstCaps *caps);
|
void gst_app_src_set_caps (GstAppSrc *appsrc, const GstCaps *caps);
|
||||||
GstCaps* gst_app_src_get_caps (GstAppSrc *appsrc, GstCaps * filter);
|
GstCaps* gst_app_src_get_caps (GstAppSrc *appsrc);
|
||||||
|
|
||||||
void gst_app_src_set_size (GstAppSrc *appsrc, gint64 size);
|
void gst_app_src_set_size (GstAppSrc *appsrc, gint64 size);
|
||||||
gint64 gst_app_src_get_size (GstAppSrc *appsrc);
|
gint64 gst_app_src_get_size (GstAppSrc *appsrc);
|
||||||
|
|
Loading…
Reference in a new issue