mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gst-libs/gst/video/video.h: Fix caps template names to be understandable.
Original commit message from CVS: 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.
This commit is contained in:
parent
44455ef9c9
commit
92bcd41763
14 changed files with 64 additions and 57 deletions
42
ChangeLog
42
ChangeLog
|
@ -1,3 +1,45 @@
|
|||
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
|
||||
|
|
|
@ -63,7 +63,7 @@ GST_STATIC_PAD_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"))
|
||||
);
|
||||
|
||||
static void gst_aasink_base_init (gpointer g_class);
|
||||
|
|
|
@ -80,7 +80,7 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
"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);
|
||||
|
|
|
@ -93,7 +93,7 @@ jpeg_caps_factory (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
|
||||
|
|
|
@ -94,7 +94,7 @@ jpeg_caps_factory (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
|
||||
|
|
|
@ -53,7 +53,7 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
"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);
|
||||
|
|
|
@ -106,7 +106,7 @@ png_caps_factory (void)
|
|||
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
|
||||
|
|
|
@ -54,7 +54,7 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
"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 =
|
||||
|
@ -62,7 +62,7 @@ GST_STATIC_PAD_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
|
||||
|
|
|
@ -61,7 +61,7 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
"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 )
|
||||
);
|
||||
|
||||
|
||||
|
@ -484,7 +484,7 @@ gst_flxdec_loop (GstElement *element)
|
|||
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,
|
||||
|
|
|
@ -83,7 +83,7 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
"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 =
|
||||
|
|
|
@ -37,7 +37,7 @@ GST_STATIC_PAD_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 =
|
||||
|
@ -45,7 +45,7 @@ GST_STATIC_PAD_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"))
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
"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 =
|
||||
|
@ -104,8 +104,6 @@ static void gst_monoscope_init (GstMonoscope *monoscope);
|
|||
|
||||
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);
|
||||
|
||||
|
@ -169,7 +167,6 @@ gst_monoscope_init (GstMonoscope *monoscope)
|
|||
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;
|
||||
|
@ -181,38 +178,9 @@ gst_monoscope_init (GstMonoscope *monoscope)
|
|||
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;
|
||||
|
||||
|
@ -222,10 +190,7 @@ gst_monoscope_srcconnect (GstPad *pad, const GstCaps *caps)
|
|||
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
|
||||
|
@ -263,8 +228,8 @@ gst_monoscope_chain (GstPad *pad, GstData *_data)
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (
|
||||
GST_VIDEO_YUV_PAD_TEMPLATE_CAPS("I420")
|
||||
GST_VIDEO_CAPS_YUV("I420")
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -49,7 +49,7 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (
|
||||
GST_VIDEO_YUV_PAD_TEMPLATE_CAPS("I420")
|
||||
GST_VIDEO_CAPS_YUV("I420")
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -59,7 +59,7 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (
|
||||
GST_VIDEO_YUV_PAD_TEMPLATE_CAPS("I420")
|
||||
GST_VIDEO_CAPS_YUV("I420")
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ GST_STATIC_PAD_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 gst_video_crop_sink_template =
|
||||
|
@ -93,7 +93,7 @@ GST_STATIC_PAD_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"))
|
||||
);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue