update for removed fixate functions

This commit is contained in:
Wim Taymans 2011-11-10 11:02:12 +01:00
parent f2ab0b8f19
commit 671131a83a
2 changed files with 7 additions and 11 deletions

View file

@ -452,8 +452,7 @@ gst_vis_src_negotiate (GstVisual * visual)
gst_structure_fixate_field_nearest_int (structure, "height", DEFAULT_HEIGHT);
gst_structure_fixate_field_nearest_fraction (structure, "framerate",
DEFAULT_FPS_N, DEFAULT_FPS_D);
gst_pad_fixate_caps (visual->srcpad, target);
gst_caps_fixate (target);
GST_DEBUG_OBJECT (visual, "after fixate caps %" GST_PTR_FORMAT, target);

View file

@ -377,10 +377,12 @@ gst_text_render_src_setcaps (GstTextRender * render, GstCaps * caps)
}
static void
gst_text_render_fixate_caps (GstPad * pad, GstCaps * caps)
gst_text_render_fixate_caps (GstTextRender * render, GstCaps * caps)
{
GstTextRender *render = GST_TEXT_RENDER (gst_pad_get_parent (pad));
GstStructure *s = gst_caps_get_structure (caps, 0);
GstStructure *s;
gst_caps_truncate (caps);
s = gst_caps_get_structure (caps, 0);
GST_DEBUG ("Fixating caps %" GST_PTR_FORMAT, caps);
gst_structure_fixate_field_nearest_int (s, "width", MAX (render->image_width,
@ -388,8 +390,6 @@ gst_text_render_fixate_caps (GstPad * pad, GstCaps * caps)
gst_structure_fixate_field_nearest_int (s, "height",
MAX (render->image_height + render->ypad, DEFAULT_RENDER_HEIGHT));
GST_DEBUG ("Fixated to %" GST_PTR_FORMAT, caps);
gst_object_unref (render);
}
#define CAIRO_UNPREMULTIPLY(a,r,g,b) G_STMT_START { \
@ -505,8 +505,7 @@ gst_text_render_chain (GstPad * pad, GstBuffer * inbuf)
goto done;
}
gst_caps_truncate (caps);
gst_pad_fixate_caps (render->srcpad, caps);
gst_text_render_fixate_caps (render, caps);
if (!gst_text_render_src_setcaps (render, caps)) {
GST_ELEMENT_ERROR (render, CORE, NEGOTIATION, (NULL), (NULL));
@ -609,8 +608,6 @@ gst_text_render_init (GstTextRender * render)
template = gst_static_pad_template_get (&src_template_factory);
render->srcpad = gst_pad_new_from_template (template, "src");
gst_object_unref (template);
gst_pad_set_fixatecaps_function (render->srcpad,
GST_DEBUG_FUNCPTR (gst_text_render_fixate_caps));
gst_element_add_pad (GST_ELEMENT (render), render->srcpad);