mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
update for removed fixate function
This commit is contained in:
parent
221ea2fc44
commit
88e398b0ea
5 changed files with 16 additions and 17 deletions
|
@ -71,8 +71,9 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
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);
|
||||
|
@ -212,6 +213,7 @@ gst_aasink_class_init (GstAASinkClass * klass)
|
|||
|
||||
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);
|
||||
|
@ -219,7 +221,7 @@ gst_aasink_class_init (GstAASinkClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_aasink_fixate (GstPad * pad, GstCaps * caps)
|
||||
gst_aasink_fixate (GstBaseSink * bsink, GstCaps * caps)
|
||||
{
|
||||
GstStructure *structure;
|
||||
|
||||
|
@ -228,6 +230,8 @@ gst_aasink_fixate (GstPad * pad, GstCaps * caps)
|
|||
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
|
||||
|
@ -256,11 +260,6 @@ invalid_caps:
|
|||
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;
|
||||
|
|
|
@ -1264,7 +1264,7 @@ gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc)
|
|||
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))
|
||||
|
|
|
@ -952,7 +952,7 @@ gst_pulsesrc_negotiate (GstBaseSrc * basesrc)
|
|||
|
||||
/* 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)) {
|
||||
|
@ -1084,7 +1084,7 @@ gst_pulsesrc_success_cb (pa_stream * s, int success, void *userdata)
|
|||
{
|
||||
GstPulseSrc *pulsesrc = GST_PULSESRC_CAST (userdata);
|
||||
|
||||
pulsesrc->operation_success = !!success;
|
||||
pulsesrc->operation_success = ! !success;
|
||||
pa_threaded_mainloop_signal (pulsesrc->mainloop, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -402,7 +402,7 @@ gst_v4l2src_negotiate (GstBaseSrc * basesrc)
|
|||
|
||||
/* 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);
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ enum
|
|||
#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 */
|
||||
|
@ -1131,7 +1131,7 @@ gst_ximage_src_set_caps (GstBaseSrc * bs, GstCaps * caps)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_ximage_src_fixate (GstPad * pad, GstCaps * caps)
|
||||
gst_ximage_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
|
||||
{
|
||||
gint i;
|
||||
GstStructure *structure;
|
||||
|
@ -1141,6 +1141,7 @@ gst_ximage_src_fixate (GstPad * pad, GstCaps * caps)
|
|||
|
||||
gst_structure_fixate_field_nearest_fraction (structure, "framerate", 25, 1);
|
||||
}
|
||||
GST_BASE_SRC_CLASS (parent_class)->fixate (bsrc, caps);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1269,12 +1270,13 @@ gst_ximage_src_class_init (GstXImageSrcClass * klass)
|
|||
"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
|
||||
|
@ -1282,8 +1284,6 @@ gst_ximage_src_init (GstXImageSrc * ximagesrc)
|
|||
{
|
||||
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 ();
|
||||
|
|
Loading…
Reference in a new issue