diff options
author | David Schleef <ds@schleef.org> | 2004-04-13 23:25:19 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2004-04-13 23:25:19 +0000 |
commit | 9414aca1c59e27c5fe7c62eef8c53f6e06b7e630 (patch) | |
tree | 1b691f5e2ec7aa0b384b54b21b121a4f412a3471 /gst | |
parent | 23222fefd280a46617c5d1ce47271a35d880036f (diff) |
common/m4/gst-feature.m4: Call -config scripts with
Original commit message from CVS:
* 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.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/avi/gstavimux.c | 4 | ||||
-rw-r--r-- | gst/debug/Makefile.am | 3 | ||||
-rw-r--r-- | gst/debug/negotiation.c | 35 |
3 files changed, 38 insertions, 4 deletions
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c index d613d0cc..f90ec53a 100644 --- a/gst/avi/gstavimux.c +++ b/gst/avi/gstavimux.c @@ -71,7 +71,7 @@ static GstStaticPadTemplate video_sink_factory = "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, " @@ -317,7 +317,7 @@ gst_avimux_vidsinkconnect (GstPad * pad, const GstCaps * vscaps) /* 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; diff --git a/gst/debug/Makefile.am b/gst/debug/Makefile.am index f1ca6bba..3f34ae72 100644 --- a/gst/debug/Makefile.am +++ b/gst/debug/Makefile.am @@ -11,7 +11,8 @@ libgstnavigationtest_la_SOURCES = gstnavigationtest.c libgstnavigationtest_la_CFLAGS = $(GST_CFLAGS) -I$(top_srcdir)/gst/videofilter libgstnavigationtest_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstdebug_la_SOURCES = gstdebug.c \ +libgstdebug_la_SOURCES = \ + gstdebug.c \ breakmydata.c \ negotiation.c \ gstnavseek.c diff --git a/gst/debug/negotiation.c b/gst/debug/negotiation.c index 3e71e11f..25f30024 100644 --- a/gst/debug/negotiation.c +++ b/gst/debug/negotiation.c @@ -48,6 +48,8 @@ struct _GstNegotiation GstElement element; GstPad *sinkpad, *srcpad; + + GstCaps *caps; }; struct _GstNegotiationClass @@ -75,7 +77,8 @@ enum enum { - ARG_0 + ARG_0, + ARG_ALLOWED_CAPS }; static GstStaticPadTemplate gst_negotiation_sink_factory = @@ -103,6 +106,7 @@ static void gst_negotiation_set_property (GObject * object, guint prop_id, 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; @@ -164,6 +168,11 @@ gst_negotiation_class_init (GstNegotiationClass * klass) 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 @@ -200,6 +209,8 @@ gst_negotiation_getcaps (GstPad * pad) GST_ERROR ("getcaps called on %" GST_PTR_FORMAT ", returning %" GST_PTR_FORMAT, pad, caps); + gst_negotiation_update_caps (negotiation); + return caps; } @@ -222,6 +233,25 @@ gst_negotiation_pad_link (GstPad * pad, const GstCaps * caps) } 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) { GstNegotiation *negotiation = GST_NEGOTIATION (gst_pad_get_parent (pad)); @@ -255,6 +285,9 @@ gst_negotiation_get_property (GObject * object, guint prop_id, 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; |