Commit ff90353f authored by David Schleef's avatar David Schleef

ext/swfdec/gstswfdec.*: Fix negotiation.

Original commit message from CVS:
* 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.
parent f2504850
2004-01-21 David Schleef <ds@schleef.org>
* 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 <thomas at apestaart dot org>
* ext/gnomevfs/gstgnomevfssrc.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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment