Commit 7163617a authored by David Schleef's avatar David Schleef

Global change from "caps2" to "caps"

Original commit message from CVS:
Global change from "caps2" to "caps"
parent a9cf6561
......@@ -12,25 +12,25 @@ struct probe_context {
gint total_ls;
GstCaps2 *metadata;
GstCaps2 *streaminfo;
GstCaps2 *caps;
GstCaps *metadata;
GstCaps *streaminfo;
GstCaps *caps;
};
static void
print_caps (GstCaps2 *caps)
print_caps (GstCaps *caps)
{
char *s;
s = gst_caps2_to_string (caps);
s = gst_caps_to_string (caps);
g_print(" %s\n", s);
g_free (s);
}
static void
print_format (GstCaps2 *caps)
print_format (GstCaps *caps)
{
char *s;
s = gst_caps2_to_string (caps);
s = gst_caps_to_string (caps);
g_print(" format: %s\n", s);
g_free (s);
}
......
......@@ -240,14 +240,14 @@ gst_aasink_class_init (GstAASinkClass *klass)
}
static GstPadLinkReturn
gst_aasink_sinkconnect (GstPad *pad, const GstCaps2 *caps)
gst_aasink_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstAASink *aasink;
GstStructure *structure;
aasink = GST_AASINK (gst_pad_get_parent (pad));
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "width", &aasink->width);
gst_structure_get_int (structure, "height", &aasink->height);
......
......@@ -723,27 +723,27 @@ gst_dvdec_loop (GstElement *element)
/* if we did not negotiate yet, do it now */
if (!GST_PAD_CAPS (dvdec->videosrcpad)) {
GstCaps2 *caps = NULL;
GstCaps2 *negotiated_caps = NULL;
GstCaps *caps = NULL;
GstCaps *negotiated_caps = NULL;
GstPadTemplate *src_pad_template;
int i;
/* try to fix our height */
src_pad_template = gst_static_pad_template_get (&video_src_temp);
caps = gst_caps2_copy(gst_pad_template_get_caps (src_pad_template));
caps = gst_caps_copy(gst_pad_template_get_caps (src_pad_template));
for (i = 0; i < gst_caps2_get_n_structures (caps); i++)
for (i = 0; i < gst_caps_get_size (caps); i++)
{
GstStructure *structure = gst_caps2_get_nth_cap (caps, i);
GstStructure *structure = gst_caps_get_structure (caps, i);
gst_structure_set(structure,
"height", G_TYPE_INT, height,
"framerate", G_TYPE_INT, fps, NULL
);
}
for (i=0; i < gst_caps2_get_n_structures(caps); i++) {
GstStructure *to_try_struct = gst_caps2_get_nth_cap (caps, i);
GstCaps2 *try_caps = gst_caps2_new_full (to_try_struct);
for (i=0; i < gst_caps_get_size(caps); i++) {
GstStructure *to_try_struct = gst_caps_get_structure (caps, i);
GstCaps *try_caps = gst_caps_new_full (to_try_struct);
/* try each format */
if (gst_pad_try_set_caps (dvdec->videosrcpad, try_caps) > 0) {
......@@ -751,14 +751,14 @@ gst_dvdec_loop (GstElement *element)
break;
}
gst_caps2_free(try_caps);
gst_caps_free(try_caps);
}
gst_caps2_free (caps);
gst_caps_free (caps);
/* Check if we negotiated caps successfully */
if (negotiated_caps != NULL) {
GstStructure *structure = gst_caps2_get_nth_cap (negotiated_caps, 0);
GstStructure *structure = gst_caps_get_structure (negotiated_caps, 0);
guint32 fourcc;
/* it worked, try to find what it was again */
......@@ -801,7 +801,7 @@ gst_dvdec_loop (GstElement *element)
/* if we did not negotiate yet, do it now */
if (!GST_PAD_CAPS (dvdec->audiosrcpad)) {
gst_pad_try_set_caps (dvdec->audiosrcpad,
gst_caps2_new_simple (
gst_caps_new_simple (
"audio/x-raw-int",
"rate", G_TYPE_INT, dvdec->decoder->audio->frequency,
"depth", G_TYPE_INT, 16,
......
......@@ -258,7 +258,7 @@ gst_esdmon_get (GstPad *pad)
/* set caps on src pad */
/* FIXME: do this dynamically */
if (gst_pad_try_set_caps (esdmon->srcpad,
gst_caps2_new_simple ("audio/x-raw-int",
gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, sign,
"width", G_TYPE_INT, esdmon->depth,
......
......@@ -79,7 +79,7 @@ static void gst_esdsink_init (GTypeInstance *instance, gpointer g_class);
static gboolean gst_esdsink_open_audio (GstEsdsink *sink);
static void gst_esdsink_close_audio (GstEsdsink *sink);
static GstElementStateReturn gst_esdsink_change_state (GstElement *element);
static GstPadLinkReturn gst_esdsink_link (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_esdsink_link (GstPad *pad, const GstCaps *caps);
static GstClockTime gst_esdsink_get_time (GstClock *clock, gpointer data);
static GstClock * gst_esdsink_get_clock (GstElement *element);
......@@ -185,14 +185,14 @@ gst_esdsink_init(GTypeInstance *instance, gpointer g_class)
}
static GstPadLinkReturn
gst_esdsink_link (GstPad *pad, const GstCaps2 *caps)
gst_esdsink_link (GstPad *pad, const GstCaps *caps)
{
GstEsdsink *esdsink;
GstStructure *structure;
esdsink = GST_ESDSINK (gst_pad_get_parent (pad));
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "signed", &esdsink->depth);
gst_structure_get_int (structure, "channels", &esdsink->channels);
gst_structure_get_int (structure, "rate", &esdsink->frequency);
......
......@@ -121,18 +121,18 @@ flacdec_get_type(void) {
return flacdec_type;
}
static GstCaps2*
static GstCaps*
flac_caps_factory (void)
{
return gst_caps2_new_simple ("audio/x-flac", NULL);
return gst_caps_new_simple ("audio/x-flac", NULL);
/* "rate", GST_PROPS_INT_RANGE (11025, 48000),
* "channels", GST_PROPS_INT_RANGE (1, 2), */
}
static GstCaps2*
static GstCaps*
raw_caps_factory (void)
{
return gst_caps2_new_simple ("audio/x-raw-int",
return gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, TRUE,
"width", G_TYPE_INT, 16,
......@@ -146,7 +146,7 @@ static void
gst_flacdec_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *raw_caps, *flac_caps;
GstCaps *raw_caps, *flac_caps;
raw_caps = raw_caps_factory ();
flac_caps = flac_caps_factory ();
......@@ -474,7 +474,7 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder *decoder,
if (!GST_PAD_CAPS (flacdec->srcpad)) {
gst_pad_try_set_caps (flacdec->srcpad,
gst_caps2_new_simple ("audio/x-raw-int",
gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, TRUE,
"width", G_TYPE_INT, depth,
......
......@@ -68,7 +68,7 @@ static void gst_flacenc_class_init (FlacEncClass *klass);
static void gst_flacenc_dispose (GObject *object);
static GstPadLinkReturn
gst_flacenc_sinkconnect (GstPad *pad, const GstCaps2 *caps);
gst_flacenc_sinkconnect (GstPad *pad, const GstCaps *caps);
static void gst_flacenc_chain (GstPad *pad, GstData *_data);
static gboolean gst_flacenc_update_quality (FlacEnc *flacenc, gint quality);
......@@ -176,18 +176,18 @@ gst_flacenc_quality_get_type (void)
return qtype;
}
static GstCaps2*
static GstCaps*
flac_caps_factory (void)
{
return gst_caps2_new_simple ("audio/x-flac", NULL);
return gst_caps_new_simple ("audio/x-flac", NULL);
/* "rate", GST_PROPS_INT_RANGE (11025, 48000),
* "channels", GST_PROPS_INT_RANGE (1, 2), */
}
static GstCaps2*
static GstCaps*
raw_caps_factory (void)
{
return gst_caps2_new_simple ("audio/x-raw-int",
return gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, TRUE,
"width", G_TYPE_INT, 16,
......@@ -201,7 +201,7 @@ static void
gst_flacenc_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *raw_caps, *flac_caps;
GstCaps *raw_caps, *flac_caps;
raw_caps = raw_caps_factory ();
flac_caps = flac_caps_factory ();
......@@ -345,7 +345,7 @@ gst_flacenc_dispose (GObject *object)
}
static GstPadLinkReturn
gst_flacenc_sinkconnect (GstPad *pad, const GstCaps2 *caps)
gst_flacenc_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstPadLinkReturn ret;
FlacEnc *flacenc;
......@@ -353,13 +353,13 @@ gst_flacenc_sinkconnect (GstPad *pad, const GstCaps2 *caps)
flacenc = GST_FLACENC (gst_pad_get_parent (pad));
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "channels", &flacenc->channels);
gst_structure_get_int (structure, "depth", &flacenc->depth);
gst_structure_get_int (structure, "rate", &flacenc->sample_rate);
caps = gst_caps2_new_simple ("audio/x-flac",
caps = gst_caps_new_simple ("audio/x-flac",
"channels", G_TYPE_INT, flacenc->channels,
"rate", G_TYPE_INT, flacenc->sample_rate, NULL);
ret = gst_pad_try_set_caps (flacenc->srcpad, caps);
......
......@@ -195,14 +195,14 @@ static gboolean
caps_nego (GstFlacTag *tag)
{
/* do caps nego */
GstCaps2 *caps;
GstCaps *caps;
caps = gst_caps2_new_simple ("audio/x-flac", NULL);
caps = gst_caps_new_simple ("audio/x-flac", NULL);
if (gst_pad_try_set_caps (tag->srcpad, caps) != GST_PAD_LINK_REFUSED) {
tag->only_output_tags = FALSE;
GST_LOG_OBJECT (tag, "normal operation, using audio/x-flac output");
} else {
if (gst_pad_try_set_caps (tag->srcpad, gst_caps2_new_simple (
if (gst_pad_try_set_caps (tag->srcpad, gst_caps_new_simple (
"application/x-gst-tags", NULL))
!= GST_PAD_LINK_REFUSED) {
tag->only_output_tags = TRUE;
......
......@@ -100,7 +100,7 @@ static void gst_gdk_pixbuf_type_find (GstTypeFind *tf, gpointer ignore);
static GstElementClass *parent_class = NULL;
static GstPadLinkReturn
gst_gdk_pixbuf_sink_link (GstPad *pad, const GstCaps2 *caps)
gst_gdk_pixbuf_sink_link (GstPad *pad, const GstCaps *caps)
{
GstGdkPixbuf *filter;
......@@ -117,29 +117,29 @@ gst_gdk_pixbuf_sink_link (GstPad *pad, const GstCaps2 *caps)
* These are just the formats that gdk-pixbuf is known to support.
* But maybe not -- it may have been compiled without an external
* library. */
static GstCaps2 *gst_gdk_pixbuf_get_capslist(void)
static GstCaps *gst_gdk_pixbuf_get_capslist(void)
{
return gst_caps2_copy (gst_static_caps_get (
return gst_caps_copy (gst_static_caps_get (
&gst_gdk_pixbuf_sink_template.static_caps));
}
#else
static GstCaps2 *gst_gdk_pixbuf_get_capslist(void)
static GstCaps *gst_gdk_pixbuf_get_capslist(void)
{
GSList *slist;
GSList *slist0;
GdkPixbufFormat *pixbuf_format;
char **mimetypes;
char **mimetype;
GstCaps2 *capslist = NULL;
GstCaps *capslist = NULL;
capslist = gst_caps2_new_empty ();
capslist = gst_caps_new_empty ();
slist0 = gdk_pixbuf_get_formats();
for(slist = slist0;slist;slist=g_slist_next(slist)){
pixbuf_format = slist->data;
mimetypes = gdk_pixbuf_format_get_mime_types(pixbuf_format);
for(mimetype = mimetypes; *mimetype; mimetype++){
gst_caps2_append_cap (capslist,
gst_caps_append_structure (capslist,
gst_structure_new (*mimetype,NULL));
}
g_free(mimetypes);
......@@ -150,7 +150,7 @@ static GstCaps2 *gst_gdk_pixbuf_get_capslist(void)
}
#endif
static GstCaps2 *gst_gdk_pixbuf_sink_getcaps(GstPad *pad)
static GstCaps *gst_gdk_pixbuf_sink_getcaps(GstPad *pad)
{
GstGdkPixbuf *filter;
......@@ -265,7 +265,7 @@ gst_gdk_pixbuf_chain (GstPad *pad, GstData *_data)
gdk_pixbuf_get_height(pixbuf));
if(filter->image_size == 0){
GstCaps2 *caps;
GstCaps *caps;
filter->width = gdk_pixbuf_get_width(pixbuf);
filter->height = gdk_pixbuf_get_height(pixbuf);
......@@ -273,7 +273,7 @@ gst_gdk_pixbuf_chain (GstPad *pad, GstData *_data)
filter->image_size = filter->rowstride * filter->height;
caps = gst_pad_get_caps(filter->srcpad);
gst_caps2_set_simple (caps,
gst_caps_set_simple (caps,
"width", G_TYPE_INT, filter->width,
"height", G_TYPE_INT, filter->height,
"framerate", G_TYPE_DOUBLE, 0., NULL);
......@@ -360,7 +360,7 @@ gst_gdk_pixbuf_type_find (GstTypeFind *tf, gpointer ignore)
gchar **mlist = gdk_pixbuf_format_get_mime_types(format);
gst_type_find_suggest (tf, GST_TYPE_FIND_MINIMUM,
gst_caps2_new_simple (mlist[0], NULL));
gst_caps_new_simple (mlist[0], NULL));
}
gdk_pixbuf_loader_close (pixbuf_loader, NULL);
......@@ -380,7 +380,7 @@ plugin_init (GstPlugin *plugin)
gst_type_find_register (plugin, "image/*", GST_RANK_MARGINAL,
gst_gdk_pixbuf_type_find, NULL,
gst_caps2_copy(GST_CAPS2_ANY), NULL);
gst_caps_copy(GST_CAPS_ANY), NULL);
/* plugin initialisation succeeded */
return TRUE;
......
......@@ -54,7 +54,7 @@ static void gst_jpegdec_init (GstJpegDec *jpegdec);
static void gst_jpegdec_chain (GstPad *pad, GstData *_data);
static GstPadLinkReturn
gst_jpegdec_link (GstPad *pad, const GstCaps2 *caps);
gst_jpegdec_link (GstPad *pad, const GstCaps *caps);
static GstElementClass *parent_class = NULL;
/*static guint gst_jpegdec_signals[LAST_SIGNAL] = { 0 }; */
......@@ -80,27 +80,27 @@ gst_jpegdec_get_type(void) {
return jpegdec_type;
}
static GstCaps2*
static GstCaps*
jpeg_caps_factory (void)
{
return gst_caps2_new_simple ("image/jpeg",
return gst_caps_new_simple ("image/jpeg",
"width", GST_TYPE_INT_RANGE, 16, 4096,
"height", GST_TYPE_INT_RANGE, 16, 4096,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE,
NULL);
}
static GstCaps2*
static GstCaps*
raw_caps_factory (void)
{
return gst_caps2_from_string (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"));
return gst_caps_from_string (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"));
}
static void
gst_jpegdec_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *raw_caps, *jpeg_caps;
GstCaps *raw_caps, *jpeg_caps;
raw_caps = raw_caps_factory ();
jpeg_caps = jpeg_caps_factory ();
......@@ -197,18 +197,18 @@ gst_jpegdec_init (GstJpegDec *jpegdec)
}
static GstPadLinkReturn
gst_jpegdec_link (GstPad *pad, const GstCaps2 *caps)
gst_jpegdec_link (GstPad *pad, const GstCaps *caps)
{
GstJpegDec *jpegdec = GST_JPEGDEC (gst_pad_get_parent (pad));
GstStructure *structure;
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_double (structure, "framerate", &jpegdec->fps);
gst_structure_get_int (structure, "width", &jpegdec->width);
gst_structure_get_int (structure, "height", &jpegdec->height);
caps = gst_caps2_new_simple ("video/x-raw-yuv",
caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I','4','2','0'),
"width", G_TYPE_INT, jpegdec->width,
"height", G_TYPE_INT, jpegdec->height,
......@@ -405,7 +405,7 @@ gst_jpegdec_chain (GstPad *pad, GstData *_data)
jpegdec->height = height;
gst_pad_try_set_caps (jpegdec->srcpad,
gst_caps2_new_simple ("video/x-raw-yuv",
gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I','4','2','0'),
"width", G_TYPE_INT, width,
"height", G_TYPE_INT, height,
......
......@@ -51,7 +51,7 @@ static void gst_jpegenc_class_init (GstJpegEnc *klass);
static void gst_jpegenc_init (GstJpegEnc *jpegenc);
static void gst_jpegenc_chain (GstPad *pad, GstData *_data);
static GstPadLinkReturn gst_jpegenc_link (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_jpegenc_link (GstPad *pad, const GstCaps *caps);
static GstData *gst_jpegenc_get (GstPad *pad);
......@@ -83,27 +83,27 @@ gst_jpegenc_get_type (void)
return jpegenc_type;
}
static GstCaps2*
static GstCaps*
jpeg_caps_factory (void)
{
return gst_caps2_new_simple ("video/x-jpeg",
return gst_caps_new_simple ("video/x-jpeg",
"width", GST_TYPE_INT_RANGE, 16, 4096,
"height", GST_TYPE_INT_RANGE, 16, 4096,
"framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE,
NULL);
}
static GstCaps2*
static GstCaps*
raw_caps_factory (void)
{
return gst_caps2_from_string (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"));
return gst_caps_from_string (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"));
}
static void
gst_jpegenc_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *raw_caps, *jpeg_caps;
GstCaps *raw_caps, *jpeg_caps;
raw_caps = raw_caps_factory ();
jpeg_caps = jpeg_caps_factory ();
......@@ -193,17 +193,17 @@ gst_jpegenc_init (GstJpegEnc *jpegenc)
}
static GstPadLinkReturn
gst_jpegenc_link (GstPad *pad, const GstCaps2 *caps)
gst_jpegenc_link (GstPad *pad, const GstCaps *caps)
{
GstJpegEnc *jpegenc = GST_JPEGENC (gst_pad_get_parent (pad));
GstStructure *structure;
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_double (structure, "framerate", &jpegenc->fps);
gst_structure_get_int (structure, "width", &jpegenc->width);
gst_structure_get_int (structure, "height", &jpegenc->height);
caps = gst_caps2_new_simple ("video/x-jpeg",
caps = gst_caps_new_simple ("video/x-jpeg",
"width", G_TYPE_INT, jpegenc->width,
"height", G_TYPE_INT, jpegenc->height,
"framerate", G_TYPE_DOUBLE, jpegenc->fps,
......
......@@ -37,7 +37,7 @@
#define LADSPA_VERSION "1.0"
#endif
static GstStaticCaps2 ladspa_pad_caps =
static GstStaticCaps ladspa_pad_caps =
GST_STATIC_CAPS (GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS);
static void gst_ladspa_class_init (GstLADSPAClass *klass);
......@@ -45,7 +45,7 @@ static void gst_ladspa_base_init (GstLADSPAClass *klass);
static void gst_ladspa_init (GstLADSPA *ladspa);
static void gst_ladspa_update_int (const GValue *value, gpointer data);
static GstPadLinkReturn gst_ladspa_link (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_ladspa_link (GstPad *pad, const GstCaps *caps);
static void gst_ladspa_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void gst_ladspa_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
......@@ -112,11 +112,11 @@ gst_ladspa_base_init (GstLADSPAClass *klass)
/* the factories take ownership of the name */
if (LADSPA_IS_PORT_INPUT(desc->PortDescriptors[j])) {
templ = gst_pad_template_new (name, GST_PAD_SINK, GST_PAD_ALWAYS,
gst_caps2_copy (gst_static_caps2_get (&ladspa_pad_caps)));
gst_caps_copy (gst_static_caps_get (&ladspa_pad_caps)));
klass->numsinkpads++;
} else {
templ = gst_pad_template_new (name, GST_PAD_SRC, GST_PAD_ALWAYS,
gst_caps2_copy (gst_static_caps2_get (&ladspa_pad_caps)));
gst_caps_copy (gst_static_caps_get (&ladspa_pad_caps)));
klass->numsrcpads++;
}
......@@ -463,7 +463,7 @@ gst_ladspa_update_int(const GValue *value, gpointer data)
}
static GstPadLinkReturn
gst_ladspa_link (GstPad *pad, const GstCaps2 *caps)
gst_ladspa_link (GstPad *pad, const GstCaps *caps)
{
GstElement *element = (GstElement*)GST_PAD_PARENT (pad);
GstLADSPA *ladspa = (GstLADSPA*)element;
......@@ -480,7 +480,7 @@ gst_ladspa_link (GstPad *pad, const GstCaps2 *caps)
/* we assume that the ladspa plugin can handle any sample rate, so this
check gets put last */
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "rate", &rate);
/* have to instantiate ladspa plugin when samplerate changes (groan) */
if (ladspa->samplerate != rate) {
......
......@@ -90,10 +90,10 @@ GType gst_pngenc_get_type (void)
return pngenc_type;
}
static GstCaps2*
static GstCaps*
png_caps_factory (void)
{
return gst_caps2_new_simple ("video/x-png",
return gst_caps_new_simple ("video/x-png",
"width", GST_TYPE_INT_RANGE, 16, 4096,
"height", GST_TYPE_INT_RANGE, 16, 4096,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE,
......@@ -101,17 +101,17 @@ png_caps_factory (void)
}
static GstCaps2*
static GstCaps*
raw_caps_factory (void)
{
return gst_caps2_from_string (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_24);
return gst_caps_from_string (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_24);
}
static void
gst_pngenc_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *raw_caps, *png_caps;
GstCaps *raw_caps, *png_caps;
raw_caps = raw_caps_factory ();
png_caps = png_caps_factory ();
......@@ -143,7 +143,7 @@ gst_pngenc_class_init (GstPngEncClass *klass)
static GstPadLinkReturn
gst_pngenc_sinklink (GstPad *pad, const GstCaps2 *caps)
gst_pngenc_sinklink (GstPad *pad, const GstCaps *caps)
{
GstPngEnc *pngenc;
gdouble fps;
......@@ -151,13 +151,13 @@ gst_pngenc_sinklink (GstPad *pad, const GstCaps2 *caps)
pngenc = GST_PNGENC (gst_pad_get_parent (pad));
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "width", &pngenc->width);
gst_structure_get_int (structure, "height", &pngenc->height);
gst_structure_get_double (structure, "framerate", &fps);
gst_structure_get_int (structure, "bpp", &pngenc->bpp);
caps = gst_caps2_new_simple ("video/x-png",
caps = gst_caps_new_simple ("video/x-png",
"framerate", G_TYPE_DOUBLE, fps,
"width", G_TYPE_INT, pngenc->width,
"height", G_TYPE_INT, pngenc->height, NULL);
......
......@@ -79,7 +79,7 @@ static void gst_mikmod_class_init (GstMikModClass *klass);
static void gst_mikmod_init (GstMikMod *filter);
static void gst_mikmod_set_property (GObject *object, guint id, const GValue *value, GParamSpec *pspec );
static void gst_mikmod_get_property (GObject *object, guint id, GValue *value, GParamSpec *pspec );
static GstPadLinkReturn gst_mikmod_srclink (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_mikmod_srclink (GstPad *pad, const GstCaps *caps);
static void gst_mikmod_loop (GstElement *element);
static gboolean gst_mikmod_setup (GstMikMod *mikmod);
static GstElementStateReturn gst_mikmod_change_state (GstElement *element);
......@@ -227,7 +227,7 @@ gst_mikmod_negotiate (GstMikMod *mikmod)
}
return gst_pad_try_set_caps (mikmod->srcpad,
gst_caps2_new_simple ( "audio/x-raw-int",
gst_caps_new_simple ( "audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, sign,
"width", G_TYPE_INT, width,
......@@ -239,7 +239,7 @@ gst_mikmod_negotiate (GstMikMod *mikmod)
static GstPadLinkReturn
gst_mikmod_srclink (GstPad *pad, const GstCaps2 *caps)
gst_mikmod_srclink (GstPad *pad, const GstCaps *caps)
{
GstMikMod *filter;
GstStructure *structure;
......@@ -248,7 +248,7 @@ gst_mikmod_srclink (GstPad *pad, const GstCaps2 *caps)
filter = GST_MIKMOD (gst_pad_get_parent (pad));
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "depth", &depth);
filter->_16bit = (depth == 16);
......
......@@ -213,21 +213,21 @@ render_text(GstTextOverlay *overlay)
}
/* static GstPadLinkReturn */
/* gst_textoverlay_text_sinkconnect (GstPad *pad, GstCaps2 *caps) */
/* gst_textoverlay_text_sinkconnect (GstPad *pad, GstCaps *caps) */
/* { */
/* return GST_PAD_LINK_DONE; */
/* } */
static GstPadLinkReturn
gst_textoverlay_video_sinkconnect(GstPad *pad, const GstCaps2 *caps)
gst_textoverlay_video_sinkconnect(GstPad *pad, const GstCaps *caps)
{
GstTextOverlay *overlay;
GstStructure *structure;
overlay = GST_TEXTOVERLAY(gst_pad_get_parent(pad));
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
overlay->width = overlay->height = 0;
gst_structure_get_int (structure, "width", &overlay->width);
gst_structure_get_int (structure, "height", &overlay->height);
......
......@@ -248,7 +248,7 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad
dv1394src->frameSize = PAL_FRAMESIZE;
GST_DEBUG ("PAL data");
if (gst_pad_try_set_caps (dv1394src->srcpad,
gst_caps2_new_simple ("video/dv",
gst_caps_new_simple ("video/dv",
"format", G_TYPE_STRING, "PAL", NULL)) <= 0) {
gst_element_error (GST_ELEMENT(dv1394src), "Could not set source caps for PAL");
return 0;
......@@ -258,7 +258,7 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad
dv1394src->frameSize = NTSC_FRAMESIZE;
GST_DEBUG ("NTSC data [untested] - please report success/failure to <dan@f3c.com>");
if (gst_pad_try_set_caps (dv1394src->srcpad,
gst_caps2_new_simple ("video/dv",
gst_caps_new_simple ("video/dv",
"format", G_TYPE_STRING, "NTSC", NULL)) <= 0) {
gst_element_error (GST_ELEMENT(dv1394src), "Could not set source caps for NTSC");
return 0;
......
......@@ -51,7 +51,7 @@ static void gst_speexdec_class_init (GstSpeexDec *klass);
static void gst_speexdec_init (GstSpeexDec *speexdec);
static void gst_speexdec_chain (GstPad *pad, GstData *_data);
static GstPadLinkReturn gst_speexdec_sinkconnect (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_speexdec_sinkconnect (GstPad *pad, const GstCaps *caps);
static GstElementClass *parent_class = NULL;
/*static guint gst_speexdec_signals[LAST_SIGNAL] = { 0 }; */
......@@ -143,7 +143,7 @@ gst_speexdec_init (GstSpeexDec *speexdec)
}
static GstPadLinkReturn
gst_speexdec_sinkconnect (GstPad *pad, const GstCaps2 *caps)
gst_speexdec_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstSpeexDec *speexdec;
gint rate;
......@@ -151,11 +151,11 @@ gst_speexdec_sinkconnect (GstPad *pad, const GstCaps2 *caps)
speexdec = GST_SPEEXDEC (gst_pad_get_parent (pad));
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "rate", &rate);
if (gst_pad_try_set_caps (speexdec->srcpad,