+2004-01-12 Benjamin Otte <in7y118@public.uni-hamburg.de>
+
+ * gst-libs/gst/video/video.h:
+ Fix caps template names to be understandable.
+ Prefix everything with GST_VIDEO.
+ * ext/aalib/gstaasink.c:
+ * ext/divx/gstdivxdec.c:
+ * ext/divx/gstdivxenc.c:
+ * ext/gdk_pixbuf/gstgdkpixbuf.c:
+ * ext/hermes/gstcolorspace.c: (gst_colorspace_base_init):
+ * ext/jpeg/gstjpegdec.c: (raw_caps_factory):
+ * ext/jpeg/gstjpegenc.c: (raw_caps_factory):
+ * ext/libcaca/gstcacasink.c:
+ * ext/libpng/gstpngenc.c: (raw_caps_factory):
+ * ext/snapshot/gstsnapshot.c:
+ * ext/swfdec/gstswfdec.c:
+ * ext/xvid/gstxviddec.c:
+ * ext/xvid/gstxvidenc.c:
+ * gst/chart/gstchart.c:
+ * gst/deinterlace/gstdeinterlace.c:
+ * gst/effectv/gsteffectv.c:
+ * gst/flx/gstflxdec.c: (gst_flxdec_loop):
+ * gst/goom/gstgoom.c:
+ * gst/median/gstmedian.c:
+ * gst/monoscope/gstmonoscope.c: (gst_monoscope_init),
+ (gst_monoscope_srcconnect), (gst_monoscope_chain):
+ * gst/overlay/gstoverlay.c:
+ * gst/smooth/gstsmooth.c:
+ * gst/smpte/gstsmpte.c:
+ * gst/synaesthesia/gstsynaesthesia.c:
+ * gst/videocrop/gstvideocrop.c:
+ * gst/videodrop/gstvideodrop.c:
+ * gst/y4m/gsty4mencode.c:
+ * sys/qcam/gstqcamsrc.c:
+ * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_palette_to_caps):
+ Make them work with new video.h file.
+ * sys/ximage/ximagesink.c: (gst_ximagesink_chain),
+ (gst_ximagesink_buffer_free), (gst_ximagesink_buffer_alloc):
+ * sys/xvimage/xvimagesink.c: (gst_xvimagesink_chain),
+ (gst_xvimagesink_buffer_free), (gst_xvimagesink_buffer_alloc):
+ Make it work with new buffer allocation system.
+
2004-01-11 Julien MOUTTE <julien@moutte.net>
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_chain): Fixing the
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"))
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420"))
);
static void gst_aasink_base_init (gpointer g_class);
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_24)
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB)
);
static void gst_gdk_pixbuf_base_init (gpointer g_class);
static GstCaps*
raw_caps_factory (void)
{
- return gst_caps_from_string (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"));
+ return gst_caps_from_string (GST_VIDEO_CAPS_YUV ("I420"));
}
static void
static GstCaps*
raw_caps_factory (void)
{
- return gst_caps_from_string (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"));
+ return gst_caps_from_string (GST_VIDEO_CAPS_YUV ("I420"));
}
static void
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_24));
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB));
static void gst_cacasink_base_init (gpointer g_class);
static void gst_cacasink_class_init (GstCACASinkClass *klass);
static GstCaps*
raw_caps_factory (void)
{
- return gst_caps_from_string (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_24);
+ return gst_caps_from_string (GST_VIDEO_CAPS_RGB);
}
static void
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ( GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32 )
+ GST_STATIC_CAPS ( GST_VIDEO_CAPS_xRGB_HOST_ENDIAN )
);
GstStaticPadTemplate gst_effectv_sink_template =
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ( GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32 )
+ GST_STATIC_CAPS ( GST_VIDEO_CAPS_xRGB_HOST_ENDIAN )
);
static gboolean
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ( GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32 )
+ GST_STATIC_CAPS ( GST_VIDEO_CAPS_xRGB_HOST_ENDIAN )
);
flxdec->frame_time = flxh->speed * GST_MSECOND;
}
- caps = gst_caps_from_string (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32);
+ caps = gst_caps_from_string (GST_VIDEO_CAPS_xRGB_HOST_ENDIAN);
gst_caps_set_simple (caps,
"width", G_TYPE_INT, flxh->width,
"height", G_TYPE_INT, flxh->height,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ( GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32 )
+ GST_STATIC_CAPS ( GST_VIDEO_CAPS_xRGB_HOST_ENDIAN )
);
static GstStaticPadTemplate sink_template =
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"))
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420"))
);
static GstStaticPadTemplate median_sink_factory =
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"))
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420"))
);
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32)
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB_HOST_ENDIAN)
);
static GstStaticPadTemplate sink_template =
static void gst_monoscope_chain (GstPad *pad, GstData *_data);
-static GstPadLinkReturn
- gst_monoscope_sinkconnect (GstPad *pad, const GstCaps *caps);
static GstPadLinkReturn
gst_monoscope_srcconnect (GstPad *pad, const GstCaps *caps);
gst_element_add_pad (GST_ELEMENT (monoscope), monoscope->srcpad);
gst_pad_set_chain_function (monoscope->sinkpad, gst_monoscope_chain);
- gst_pad_set_link_function (monoscope->sinkpad, gst_monoscope_sinkconnect);
gst_pad_set_link_function (monoscope->srcpad, gst_monoscope_srcconnect);
monoscope->next_time = 0;
monoscope->fps = 25.; /* desired frame rate */
}
-static GstPadLinkReturn
-gst_monoscope_sinkconnect (GstPad *pad, const GstCaps *caps)
-{
- GstMonoscope *monoscope;
- monoscope = GST_MONOSCOPE (gst_pad_get_parent (pad));
-
- return GST_PAD_LINK_OK;
-}
-
-static GstPadLinkReturn
-gst_monoscope_negotiate (GstMonoscope *monoscope)
-{
- GstCaps *caps;
-
- caps = gst_caps_new_simple ("video/x-raw-rgb",
- "bpp", G_TYPE_INT, 32,
- "depth", G_TYPE_INT, 32,
- "endianness", G_TYPE_INT, G_BIG_ENDIAN,
- "red_mask", G_TYPE_INT, R_MASK_32,
- "green_mask", G_TYPE_INT, G_MASK_32,
- "blue_mask", G_TYPE_INT, B_MASK_32,
- "width", G_TYPE_INT, monoscope->width,
- "height", G_TYPE_INT, monoscope->height,
- "framerate", G_TYPE_DOUBLE, monoscope->fps, NULL);
-
- return gst_pad_try_set_caps (monoscope->srcpad, caps);
-}
-
static GstPadLinkReturn
gst_monoscope_srcconnect (GstPad *pad, const GstCaps *caps)
{
- GstPadLinkReturn ret;
GstMonoscope *monoscope = GST_MONOSCOPE (gst_pad_get_parent (pad));
GstStructure *structure;
gst_structure_get_int (structure, "height", &monoscope->height);
gst_structure_get_double (structure, "framerate", &monoscope->fps);
- if ((ret = gst_monoscope_negotiate (monoscope)) <= 0)
- return ret;
-
- return GST_PAD_LINK_DONE;
+ return GST_PAD_LINK_OK;
}
static void
monoscope->visstate = monoscope_init (monoscope->width, monoscope->height);
g_assert(monoscope->visstate != 0);
GST_DEBUG ("making new pad");
- if (!GST_PAD_CAPS (monoscope->srcpad)) {
- if (gst_monoscope_negotiate (monoscope) <= 0) {
+ if (!gst_pad_is_negotiated (monoscope->srcpad)) {
+ if (gst_pad_renegotiate (monoscope->srcpad) <= 0) {
gst_element_error (GST_ELEMENT (monoscope), "could not set caps");
return;
}
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (
- GST_VIDEO_YUV_PAD_TEMPLATE_CAPS("I420")
+ GST_VIDEO_CAPS_YUV("I420")
)
);
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (
- GST_VIDEO_YUV_PAD_TEMPLATE_CAPS("I420")
+ GST_VIDEO_CAPS_YUV("I420")
)
);
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (
- GST_VIDEO_YUV_PAD_TEMPLATE_CAPS("I420")
+ GST_VIDEO_CAPS_YUV("I420")
)
);
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"))
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420"))
);
static GstStaticPadTemplate gst_video_crop_sink_template =
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"))
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420"))
);