+2004-04-13 David Schleef <ds@schleef.org>
+
+ * common/m4/gst-feature.m4: Call -config scripts with
+ --plugin-libs if it is supported.
+ * gst/avi/gstavimux.c: (gst_avimux_vidsinkconnect): sequences of
+ JPEG images are image/jpeg.
+ * gst/debug/Makefile.am:
+ * gst/debug/negotiation.c: (gst_negotiation_class_init),
+ (gst_negotiation_getcaps), (gst_negotiation_pad_link),
+ (gst_negotiation_update_caps), (gst_negotiation_get_property),
+ (gst_negotiation_plugin_init): Add a property that acts like
+ filter caps.
+ * testsuite/gst-lint: Move license checking to be a standard
+ test.
+
2004-04-13 David Schleef <ds@schleef.org>
* gst/avi/gstavidemux.c: (gst_avi_demux_reset): Fix memleak.
"format = (fourcc) { YUY2, I420 }, "
"width = (int) [ 16, 4096 ], "
"height = (int) [ 16, 4096 ]; "
- "video/x-jpeg, "
+ "image/jpeg, "
"width = (int) [ 16, 4096 ], "
"height = (int) [ 16, 4096 ]; "
"video/x-divx, "
/* find format */
if (!strcmp (mimetype, "video/x-huffyuv")) {
avimux->vids.compression = GST_MAKE_FOURCC ('H', 'F', 'Y', 'U');
- } else if (!strcmp (mimetype, "video/x-jpeg")) {
+ } else if (!strcmp (mimetype, "image/jpeg")) {
avimux->vids.compression = GST_MAKE_FOURCC ('M', 'J', 'P', 'G');
} else if (!strcmp (mimetype, "video/x-divx")) {
gint divxversion;
GstElement element;
GstPad *sinkpad, *srcpad;
+
+ GstCaps *caps;
};
struct _GstNegotiationClass
enum
{
- ARG_0
+ ARG_0,
+ ARG_ALLOWED_CAPS
};
static GstStaticPadTemplate gst_negotiation_sink_factory =
static void gst_negotiation_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
+static void gst_negotiation_update_caps (GstNegotiation * negotiation);
static void gst_negotiation_chain (GstPad * pad, GstData * _data);
static GstElementClass *parent_class = NULL;
gobject_class->set_property = gst_negotiation_set_property;
gobject_class->get_property = gst_negotiation_get_property;
+
+ g_object_class_install_property (gobject_class, ARG_ALLOWED_CAPS,
+ g_param_spec_boxed ("allowed-caps", "Caps",
+ "The range of formats allowed by " "this element's peers",
+ GST_TYPE_CAPS, G_PARAM_READABLE));
}
static void
GST_ERROR ("getcaps called on %" GST_PTR_FORMAT ", returning %"
GST_PTR_FORMAT, pad, caps);
+ gst_negotiation_update_caps (negotiation);
+
return caps;
}
return ret;
}
+static void
+gst_negotiation_update_caps (GstNegotiation * negotiation)
+{
+ GstCaps *srccaps;
+ GstCaps *sinkcaps;
+ GstCaps *icaps;
+
+ srccaps = gst_pad_get_allowed_caps (negotiation->srcpad);
+ sinkcaps = gst_pad_get_allowed_caps (negotiation->sinkpad);
+
+ icaps = gst_caps_intersect (srccaps, sinkcaps);
+ gst_caps_free (srccaps);
+ gst_caps_free (sinkcaps);
+
+ gst_caps_replace (&negotiation->caps, icaps);
+ g_object_notify (G_OBJECT (negotiation), "allowed-caps");
+ g_print ("notify %s", gst_caps_to_string (icaps));
+}
+
static void
gst_negotiation_chain (GstPad * pad, GstData * _data)
{
filter = GST_NEGOTIATION (object);
switch (prop_id) {
+ case ARG_ALLOWED_CAPS:
+ g_value_set_boxed (value, filter->caps);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;