diff --git a/ChangeLog b/ChangeLog index 3605fb6d40..6b91401e6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2004-01-21 David Schleef + + * ext/swfdec/gstswfdec.c: (gst_swfdec_video_getcaps), + (gst_swfdec_video_link), (copy_image), (gst_swfdec_loop), + (gst_swfdec_init), (gst_swfdec_change_state): + * ext/swfdec/gstswfdec.h: + Fix negotiation. + * gst/adder/gstadder.c: (gst_adder_link), (gst_adder_init), + (gst_adder_request_new_pad): Fix negotiation. + * gst/goom/gstgoom.c: (gst_goom_init), (gst_goom_src_fixate): + Add a fixate function. + * gst/intfloat/gstfloat2int.c: + * gst/intfloat/gstfloat2int.h: + * gst/intfloat/gstint2float.c: + * gst/intfloat/gstint2float.h: + Completely rewrite the negotiation. Doesn't quite work yet, + due to some buffer-frames problem. + 2004-01-21 Thomas Vander Stichele * ext/gnomevfs/gstgnomevfssrc.c: diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c index 5aa043fe03..db40a13dad 100644 --- a/gst/goom/gstgoom.c +++ b/gst/goom/gstgoom.c @@ -114,6 +114,7 @@ static void gst_goom_chain (GstPad *pad, GstData *_data); static GstPadLinkReturn gst_goom_sinkconnect (GstPad *pad, const GstCaps *caps); static GstPadLinkReturn gst_goom_srcconnect (GstPad *pad, const GstCaps *caps); +static GstCaps * gst_goom_src_fixate (GstPad *pad, const GstCaps *caps); static GstElementClass *parent_class = NULL; @@ -184,6 +185,7 @@ gst_goom_init (GstGOOM *goom) gst_pad_set_link_function (goom->sinkpad, gst_goom_sinkconnect); gst_pad_set_link_function (goom->srcpad, gst_goom_srcconnect); + gst_pad_set_fixate_function (goom->srcpad, gst_goom_src_fixate); goom->width = 320; goom->height = 200; @@ -236,6 +238,33 @@ gst_goom_srcconnect (GstPad *pad, const GstCaps *caps) return GST_PAD_LINK_OK; } +static GstCaps * +gst_goom_src_fixate (GstPad *pad, const GstCaps *caps) +{ + GstCaps *newcaps; + GstStructure *structure; + + if (!gst_caps_is_simple (caps)) return NULL; + + newcaps = gst_caps_copy (caps); + structure = gst_caps_get_structure (newcaps, 0); + + if (gst_caps_structure_fixate_field_nearest_int (structure, "width", 320)) { + return newcaps; + } + if (gst_caps_structure_fixate_field_nearest_int (structure, "height", 240)) { + return newcaps; + } + if (gst_caps_structure_fixate_field_nearest_double (structure, "framerate", + 30.0)) { + return newcaps; + } + + /* failed to fixate */ + gst_caps_free (newcaps); + return NULL; +} + static void gst_goom_chain (GstPad *pad, GstData *_data) {