diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2002-01-13 22:27:25 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2002-01-13 22:27:25 +0000 |
commit | 93e9ac34a1058caab1ef680071874d620a10d132 (patch) | |
tree | 4c730c821178cc2ea708454dc276a1d36b5bfe1b /gst/y4m | |
parent | e92b7beff5470ec3f1662e2413622295b37f8710 (diff) |
Bring the plugins in sync with the new core capsnego system.
Original commit message from CVS:
Bring the plugins in sync with the new core capsnego system.
Added some features, enhancements...
Diffstat (limited to 'gst/y4m')
-rw-r--r-- | gst/y4m/gsty4mencode.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c index 69fc58dcf..ac82d65a6 100644 --- a/gst/y4m/gsty4mencode.c +++ b/gst/y4m/gsty4mencode.c @@ -115,15 +115,20 @@ gst_lavencode_class_init (GstLavEncodeClass *klass) gobject_class->get_property = gst_lavencode_get_property; } -static void -gst_lavencode_newcaps (GstPad *pad, GstCaps *caps) +static GstPadConnectReturn +gst_lavencode_sinkconnect (GstPad *pad, GstCaps *caps) { GstLavEncode *filter; filter = GST_LAVENCODE (gst_pad_get_parent (pad)); + if (!GST_CAPS_IS_FIXED (caps)) + return GST_PAD_CONNECT_DELAYED; + filter->width = gst_caps_get_int (caps, "width"); filter->height = gst_caps_get_int (caps, "height"); + + return GST_PAD_CONNECT_OK; } static void @@ -133,7 +138,7 @@ gst_lavencode_init (GstLavEncode *filter) GST_PADTEMPLATE_GET (lavencode_sink_factory), "sink"); gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad); gst_pad_set_chain_function (filter->sinkpad, gst_lavencode_chain); - gst_pad_set_newcaps_function (filter->sinkpad, gst_lavencode_newcaps); + gst_pad_set_connect_function (filter->sinkpad, gst_lavencode_sinkconnect); filter->srcpad = gst_pad_new_from_template( GST_PADTEMPLATE_GET (lavencode_src_factory), "src"); |