GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420"))
);
-static gboolean gst_aasink_setcaps (GstBaseSink * pad, GstCaps * caps);
-static void gst_aasink_get_times (GstBaseSink * sink, GstBuffer * buffer,
+static void gst_aasink_fixate (GstBaseSink * bsink, GstCaps * caps);
+static gboolean gst_aasink_setcaps (GstBaseSink * bsink, GstCaps * caps);
+static void gst_aasink_get_times (GstBaseSink * bsink, GstBuffer * buffer,
GstClockTime * start, GstClockTime * end);
static GstFlowReturn gst_aasink_render (GstBaseSink * basesink,
GstBuffer * buffer);
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_aasink_change_state);
+ gstbasesink_class->fixate = GST_DEBUG_FUNCPTR (gst_aasink_fixate);
gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_aasink_setcaps);
gstbasesink_class->get_times = GST_DEBUG_FUNCPTR (gst_aasink_get_times);
gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_aasink_render);
}
static void
-gst_aasink_fixate (GstPad * pad, GstCaps * caps)
+gst_aasink_fixate (GstBaseSink * bsink, GstCaps * caps)
{
GstStructure *structure;
gst_structure_fixate_field_nearest_int (structure, "width", 320);
gst_structure_fixate_field_nearest_int (structure, "height", 240);
gst_structure_fixate_field_nearest_fraction (structure, "framerate", 30, 1);
+
+ GST_BASE_SINK_CLASS (parent_class)->fixate (bsink, caps);
}
static gboolean
static void
gst_aasink_init (GstAASink * aasink)
{
- GstPad *pad;
-
- pad = GST_BASE_SINK_PAD (aasink);
- gst_pad_set_fixatecaps_function (pad, gst_aasink_fixate);
-
memcpy (&aasink->ascii_surf, &aa_defparams,
sizeof (struct aa_hardware_params));
aasink->ascii_parms.bright = 0;
gst_caps_unref (caps);
caps = gst_caps_copy_nth (allowed_caps, i);
/* sigh, ds and _parse_caps need fixed caps for parsing, fixate */
- gst_pad_fixate_caps (dec->srcpad, caps);
+ gst_caps_fixate (caps);
GST_LOG_OBJECT (dec, "checking caps %" GST_PTR_FORMAT, caps);
if (!gst_video_info_from_caps (&tmpinfo, caps))
/* now fixate */
if (!gst_caps_is_empty (caps)) {
- gst_pad_fixate_caps (GST_BASE_SRC_PAD (basesrc), caps);
+ GST_BASE_SRC_CLASS (parent_class)->fixate (basesrc, caps);
GST_DEBUG_OBJECT (basesrc, "fixated to: %" GST_PTR_FORMAT, caps);
if (gst_caps_is_any (caps)) {
{
GstPulseSrc *pulsesrc = GST_PULSESRC_CAST (userdata);
- pulsesrc->operation_success = !!success;
+ pulsesrc->operation_success = ! !success;
pa_threaded_mainloop_signal (pulsesrc->mainloop, 0);
}
/* now fixate */
if (!gst_caps_is_empty (caps)) {
- gst_pad_fixate_caps (GST_BASE_SRC_PAD (basesrc), caps);
+ gst_v4l2src_fixate (basesrc, caps);
GST_DEBUG_OBJECT (basesrc, "fixated to: %" GST_PTR_FORMAT, caps);
LOG_CAPS (basesrc, caps);
#define gst_ximage_src_parent_class parent_class
G_DEFINE_TYPE (GstXImageSrc, gst_ximage_src, GST_TYPE_PUSH_SRC);
-static void gst_ximage_src_fixate (GstPad * pad, GstCaps * caps);
+static void gst_ximage_src_fixate (GstBaseSrc * bsrc, GstCaps * caps);
static void gst_ximage_src_clear_bufpool (GstXImageSrc * ximagesrc);
/* Called when a buffer is returned from the pipeline */
}
static void
-gst_ximage_src_fixate (GstPad * pad, GstCaps * caps)
+gst_ximage_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
{
gint i;
GstStructure *structure;
gst_structure_fixate_field_nearest_fraction (structure, "framerate", 25, 1);
}
+ GST_BASE_SRC_CLASS (parent_class)->fixate (bsrc, caps);
}
static void
"Zaheer Merali <zaheerabbas at merali dot org>");
gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&t));
- push_class->create = gst_ximage_src_create;
+ bc->fixate = gst_ximage_src_fixate;
bc->get_caps = gst_ximage_src_get_caps;
bc->set_caps = gst_ximage_src_set_caps;
bc->start = gst_ximage_src_start;
bc->stop = gst_ximage_src_stop;
bc->unlock = gst_ximage_src_unlock;
+ push_class->create = gst_ximage_src_create;
}
static void
{
gst_base_src_set_format (GST_BASE_SRC (ximagesrc), GST_FORMAT_TIME);
gst_base_src_set_live (GST_BASE_SRC (ximagesrc), TRUE);
- gst_pad_set_fixatecaps_function (GST_BASE_SRC_PAD (ximagesrc),
- gst_ximage_src_fixate);
ximagesrc->pool_lock = g_mutex_new ();
ximagesrc->x_lock = g_mutex_new ();