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.
This commit is contained in:
David Schleef 2004-04-13 23:25:19 +00:00
parent 23222fefd2
commit 9414aca1c5
5 changed files with 54 additions and 5 deletions

View file

@ -1,3 +1,18 @@
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.

2
common

@ -1 +1 @@
Subproject commit 99901894a48091bfed16826702c38c4063e64954
Subproject commit c4fb9e5b7bc69f9420a0f008230e3028fdc2b097

View file

@ -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;

View file

@ -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

View file

@ -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;
}
@ -221,6 +232,25 @@ gst_negotiation_pad_link (GstPad * pad, const GstCaps * 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)
{
@ -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;