diff options
74 files changed, 455 insertions, 455 deletions
diff --git a/examples/seeking/vorbisfile.c b/examples/seeking/vorbisfile.c index f191aa7b8..acaa60c9d 100644 --- a/examples/seeking/vorbisfile.c +++ b/examples/seeking/vorbisfile.c @@ -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); } diff --git a/ext/aalib/gstaasink.c b/ext/aalib/gstaasink.c index 688a46e89..98db71bb2 100644 --- a/ext/aalib/gstaasink.c +++ b/ext/aalib/gstaasink.c @@ -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); diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index 10db6a26d..593ac65bc 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -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, diff --git a/ext/esd/esdmon.c b/ext/esd/esdmon.c index 6611c3f54..e2a91ed43 100644 --- a/ext/esd/esdmon.c +++ b/ext/esd/esdmon.c @@ -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, diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c index 087527091..1595467a8 100644 --- a/ext/esd/esdsink.c +++ b/ext/esd/esdsink.c @@ -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); diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 7b88d6be9..62b39bbc9 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -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, diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index d68d49b93..637b8a62f 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -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); diff --git a/ext/flac/gstflactag.c b/ext/flac/gstflactag.c index be37a2633..5a155f244 100644 --- a/ext/flac/gstflactag.c +++ b/ext/flac/gstflactag.c @@ -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; diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.c b/ext/gdk_pixbuf/gstgdkpixbuf.c index 0e0a30c86..1034de657 100644 --- a/ext/gdk_pixbuf/gstgdkpixbuf.c +++ b/ext/gdk_pixbuf/gstgdkpixbuf.c @@ -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; diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index 741184d67..9c9af7507 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -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, diff --git a/ext/jpeg/gstjpegenc.c b/ext/jpeg/gstjpegenc.c index bac5a7c1c..2d1a431f3 100644 --- a/ext/jpeg/gstjpegenc.c +++ b/ext/jpeg/gstjpegenc.c @@ -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, diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index b6e97120d..ff2711fce 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -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) { diff --git a/ext/libpng/gstpngenc.c b/ext/libpng/gstpngenc.c index 0c1f77234..74cb4938a 100644 --- a/ext/libpng/gstpngenc.c +++ b/ext/libpng/gstpngenc.c @@ -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); diff --git a/ext/mikmod/gstmikmod.c b/ext/mikmod/gstmikmod.c index d820f5ef4..d624f49ec 100644 --- a/ext/mikmod/gstmikmod.c +++ b/ext/mikmod/gstmikmod.c @@ -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); diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c index 3c7f19a72..4264e8130 100644 --- a/ext/pango/gsttextoverlay.c +++ b/ext/pango/gsttextoverlay.c @@ -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); diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c index e2538dab0..0bf5c83b6 100644 --- a/ext/raw1394/gstdv1394src.c +++ b/ext/raw1394/gstdv1394src.c @@ -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; diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index a8ce3e322..5e249a73b 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -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, - 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, 16, diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index 901dc42dc..14cee352d 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -52,7 +52,7 @@ static void gst_speexenc_class_init (GstSpeexEnc *klass); static void gst_speexenc_init (GstSpeexEnc *speexenc); static void gst_speexenc_chain (GstPad *pad,GstData *_data); -static GstPadLinkReturn gst_speexenc_sinkconnect (GstPad *pad, const GstCaps2 *caps); +static GstPadLinkReturn gst_speexenc_sinkconnect (GstPad *pad, const GstCaps *caps); static GstElementClass *parent_class = NULL; static guint gst_speexenc_signals[LAST_SIGNAL] = { 0 }; @@ -156,17 +156,17 @@ gst_speexenc_init (GstSpeexEnc *speexenc) } static GstPadLinkReturn -gst_speexenc_sinkconnect (GstPad *pad, const GstCaps2 *caps) +gst_speexenc_sinkconnect (GstPad *pad, const GstCaps *caps) { GstSpeexEnc *speexenc; GstStructure *structure; speexenc = GST_SPEEXENC (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", &speexenc->rate); if (gst_pad_try_set_caps (speexenc->srcpad, - gst_caps2_new_simple ("audio/x-speex", + gst_caps_new_simple ("audio/x-speex", "rate", G_TYPE_INT, speexenc->rate, "channels", G_TYPE_INT, 1, NULL))) @@ -205,7 +205,7 @@ gst_speexenc_chain (GstPad *pad, GstData *_data) if (!GST_PAD_CAPS (speexenc->srcpad)) { if (!gst_pad_try_set_caps (speexenc->srcpad, - gst_caps2_new_simple ("audio/x-speex", + gst_caps_new_simple ("audio/x-speex", "rate", G_TYPE_INT, speexenc->rate, "channels", G_TYPE_INT, 1, NULL))) diff --git a/gst/audiofx/audiowsincband.c b/gst/audiofx/audiowsincband.c index d9d608d71..775290530 100644 --- a/gst/audiofx/audiowsincband.c +++ b/gst/audiofx/audiowsincband.c @@ -105,7 +105,7 @@ static void gst_bpwsinc_get_property (GObject * object, guint prop_id, static void gst_bpwsinc_chain (GstPad * pad, GstData *_data); static GstPadLinkReturn - gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps2 * caps); + gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps * caps); static GstElementClass *parent_class = NULL; /*static guint gst_bpwsinc_signals[LAST_SIGNAL] = { 0 }; */ @@ -195,7 +195,7 @@ gst_bpwsinc_init (GstBPWSinc * filter) } static GstPadLinkReturn -gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps2 * caps) +gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps * caps) { int i = 0; double sum = 0.0; diff --git a/gst/audiofx/audiowsinclimit.c b/gst/audiofx/audiowsinclimit.c index d549db525..603d8775e 100644 --- a/gst/audiofx/audiowsinclimit.c +++ b/gst/audiofx/audiowsinclimit.c @@ -102,7 +102,7 @@ static void gst_lpwsinc_get_property (GObject * object, guint prop_id, static void gst_lpwsinc_chain (GstPad * pad, GstData *_data); static GstPadLinkReturn - gst_lpwsinc_sink_connect (GstPad * pad, const GstCaps2 * caps); + gst_lpwsinc_sink_connect (GstPad * pad, const GstCaps * caps); static GstElementClass *parent_class = NULL; /*static guint gst_lpwsinc_signals[LAST_SIGNAL] = { 0 }; */ @@ -186,7 +186,7 @@ gst_lpwsinc_init (GstLPWSinc * filter) } static GstPadLinkReturn -gst_lpwsinc_sink_connect (GstPad * pad, const GstCaps2 * caps) +gst_lpwsinc_sink_connect (GstPad * pad, const GstCaps * caps) { int i = 0; double sum = 0.0; diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index 9001e50a6..d4f506442 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -150,7 +150,7 @@ gst_auparse_chain (GstPad *pad, GstData *_data) GstAuParse *auparse; gchar *data; glong size; - GstCaps2 *tempcaps; + GstCaps *tempcaps; gint law, depth; gboolean sign; @@ -238,11 +238,11 @@ gst_auparse_chain (GstPad *pad, GstData *_data) } if (law) { - tempcaps = gst_caps2_new_simple ("audio/x-alaw", + tempcaps = gst_caps_new_simple ("audio/x-alaw", "rate", G_TYPE_INT, auparse->frequency, "channels", G_TYPE_INT, auparse->channels, NULL); } else { - tempcaps = gst_caps2_new_simple ("audio/x-raw-int", + tempcaps = gst_caps_new_simple ("audio/x-raw-int", "endianness", G_TYPE_INT, G_BIG_ENDIAN, "rate", G_TYPE_INT, auparse->frequency, "channels", G_TYPE_INT, auparse->channels, diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index f7aa5b3b1..04c5c8c9d 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -129,7 +129,7 @@ gst_avi_demux_base_init (GstAviDemuxClass *klass) ); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstPadTemplate *videosrctempl, *audiosrctempl; - GstCaps2 *audcaps, *vidcaps; + GstCaps *audcaps, *vidcaps; audcaps = gst_riff_create_audio_template_caps (); audiosrctempl = gst_pad_template_new ("audio_%02d", @@ -138,7 +138,7 @@ gst_avi_demux_base_init (GstAviDemuxClass *klass) audcaps); vidcaps = gst_riff_create_video_template_caps (); - gst_caps2_append (vidcaps, gst_riff_create_iavs_template_caps ()); + gst_caps_append (vidcaps, gst_riff_create_iavs_template_caps ()); videosrctempl = gst_pad_template_new ("video_%02d", GST_PAD_SRC, GST_PAD_SOMETIMES, @@ -162,7 +162,7 @@ gst_avi_demux_class_init (GstAviDemuxClass *klass) g_object_class_install_property (gobject_class, ARG_STREAMINFO, g_param_spec_boxed ("streaminfo", "Streaminfo", "Streaminfo", - GST_TYPE_CAPS2, G_PARAM_READABLE)); + GST_TYPE_CAPS, G_PARAM_READABLE)); GST_DEBUG_CATEGORY_INIT (avidemux_debug, "avidemux", 0, "Demuxer for AVI streams"); @@ -222,7 +222,7 @@ gst_avi_demux_reset (GstAviDemux *avi) avi->seek_offset = (guint64) -1; - gst_caps2_replace (&avi->streaminfo, NULL); + gst_caps_replace (&avi->streaminfo, NULL); } static void @@ -230,8 +230,8 @@ gst_avi_demux_streaminfo (GstAviDemux *avi) { /* compression formats are added later - a bit hacky */ - gst_caps2_replace (&avi->streaminfo, - gst_caps2_new_simple ("application/x-gst-streaminfo", NULL)); + gst_caps_replace (&avi->streaminfo, + gst_caps_new_simple ("application/x-gst-streaminfo", NULL)); /*g_object_notify(G_OBJECT(avi), "streaminfo");*/ } @@ -772,7 +772,7 @@ gst_avi_demux_add_stream (GstAviDemux *avi) guint32 tag; gst_riff_strh *strh; gchar *name = NULL, *padname = NULL; - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; GstPadTemplate *templ = NULL; GstPad *pad; avi_stream_context *stream; diff --git a/gst/avi/gstavidemux.h b/gst/avi/gstavidemux.h index 83b027f4e..15eec1f37 100644 --- a/gst/avi/gstavidemux.h +++ b/gst/avi/gstavidemux.h @@ -114,7 +114,7 @@ typedef struct _GstAviDemux { guint64 last_seek; /* info */ - GstCaps2 *streaminfo; + GstCaps *streaminfo; } GstAviDemux; typedef struct _GstAviDemuxClass { diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c index 25aec91dd..d67a86279 100644 --- a/gst/avi/gstavimux.c +++ b/gst/avi/gstavimux.c @@ -280,7 +280,7 @@ gst_avimux_init (GstAviMux *avimux) } static GstPadLinkReturn -gst_avimux_vidsinkconnect (GstPad *pad, const GstCaps2 *vscaps) +gst_avimux_vidsinkconnect (GstPad *pad, const GstCaps *vscaps) { GstAviMux *avimux; GstStructure *structure; @@ -293,7 +293,7 @@ gst_avimux_vidsinkconnect (GstPad *pad, const GstCaps2 *vscaps) GST_DEBUG ("avimux: video sinkconnect triggered on %s", gst_pad_get_name (pad)); - structure = gst_caps2_get_nth_cap (vscaps, 0); + structure = gst_caps_get_structure (vscaps, 0); mimetype = gst_structure_get_name (structure); /* global */ @@ -384,7 +384,7 @@ gst_avimux_vidsinkconnect (GstPad *pad, const GstCaps2 *vscaps) } static GstPadLinkReturn -gst_avimux_audsinkconnect (GstPad *pad, const GstCaps2 *vscaps) +gst_avimux_audsinkconnect (GstPad *pad, const GstCaps *vscaps) { GstAviMux *avimux; GstStructure *structure; @@ -396,7 +396,7 @@ gst_avimux_audsinkconnect (GstPad *pad, const GstCaps2 *vscaps) GST_DEBUG ("avimux: audio sinkconnect triggered on %s", gst_pad_get_name (pad)); - structure = gst_caps2_get_nth_cap (vscaps, 0); + structure = gst_caps_get_structure (vscaps, 0); mimetype = gst_structure_get_name (structure); /* we want these for all */ diff --git a/gst/cutter/gstcutter.c b/gst/cutter/gstcutter.c index 4eecdb496..831149393 100644 --- a/gst/cutter/gstcutter.c +++ b/gst/cutter/gstcutter.c @@ -125,7 +125,7 @@ gst_cutter_base_init (gpointer g_class) } static GstPadLinkReturn -gst_cutter_link (GstPad *pad, const GstCaps2*caps) +gst_cutter_link (GstPad *pad, const GstCaps*caps) { GstCutter *filter; GstPad *otherpad; @@ -450,7 +450,7 @@ GST_PLUGIN_DEFINE ( void gst_cutter_get_caps (GstPad *pad, GstCutter* filter) { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; GstStructure *structure; caps = GST_PAD_CAPS (pad); @@ -458,7 +458,7 @@ gst_cutter_get_caps (GstPad *pad, GstCutter* filter) g_assert (caps != NULL); if (caps == NULL) printf ("WARNING: get_caps: Could not get caps of pad !\n"); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); gst_structure_get_int (structure, "width", &filter->width); filter->max_sample = gst_audio_highest_sample_value (pad); filter->have_caps = TRUE; diff --git a/gst/debug/efence.c b/gst/debug/efence.c index 7f1b400b2..d46218f8d 100644 --- a/gst/debug/efence.c +++ b/gst/debug/efence.c @@ -61,7 +61,7 @@ GST_STATIC_PAD_TEMPLATE ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS2_ANY + GST_STATIC_CAPS_ANY ); static GstStaticPadTemplate gst_efence_src_factory = @@ -69,7 +69,7 @@ GST_STATIC_PAD_TEMPLATE ( "src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS2_ANY + GST_STATIC_CAPS_ANY ); static void gst_efence_base_init (gpointer g_class); @@ -102,7 +102,7 @@ void *gst_fenced_buffer_alloc(GstBuffer *buffer, unsigned int length, GstBuffer *gst_fenced_buffer_new(void); static GstPadLinkReturn -gst_efence_link (GstPad *pad, const GstCaps2 *caps) +gst_efence_link (GstPad *pad, const GstCaps *caps) { GstEFence *filter; GstPad *otherpad; diff --git a/gst/effectv/gstaging.c b/gst/effectv/gstaging.c index eb6395e95..294117df2 100644 --- a/gst/effectv/gstaging.c +++ b/gst/effectv/gstaging.c @@ -166,14 +166,14 @@ gst_agingtv_class_init (GstAgingTVClass * klass) } static GstPadLinkReturn -gst_agingtv_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_agingtv_sinkconnect (GstPad * pad, const GstCaps * caps) { GstAgingTV *filter; GstStructure *structure; filter = GST_AGINGTV (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", &filter->width); gst_structure_get_int (structure, "height", &filter->height); diff --git a/gst/effectv/gstdice.c b/gst/effectv/gstdice.c index bfb87c809..c2c2de73f 100644 --- a/gst/effectv/gstdice.c +++ b/gst/effectv/gstdice.c @@ -171,14 +171,14 @@ gst_dicetv_class_init (GstDiceTVClass * klass) } static GstPadLinkReturn -gst_dicetv_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_dicetv_sinkconnect (GstPad * pad, const GstCaps * caps) { GstDiceTV *filter; GstStructure *structure; filter = GST_DICETV (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", &filter->width); gst_structure_get_int (structure, "height", &filter->height); diff --git a/gst/effectv/gstedge.c b/gst/effectv/gstedge.c index c9021a927..200de6711 100644 --- a/gst/effectv/gstedge.c +++ b/gst/effectv/gstedge.c @@ -145,14 +145,14 @@ gst_edgetv_class_init (GstEdgeTVClass * klass) } static GstPadLinkReturn -gst_edgetv_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_edgetv_sinkconnect (GstPad * pad, const GstCaps * caps) { GstEdgeTV *filter; GstStructure *structure; filter = GST_EDGETV (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", &filter->width); gst_structure_get_int (structure, "height", &filter->height); diff --git a/gst/effectv/gstquark.c b/gst/effectv/gstquark.c index 4376e89db..6d51bc5c8 100644 --- a/gst/effectv/gstquark.c +++ b/gst/effectv/gstquark.c @@ -168,7 +168,7 @@ gst_quarktv_class_init (GstQuarkTVClass * klass) } static GstPadLinkReturn -gst_quarktv_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_quarktv_sinkconnect (GstPad * pad, const GstCaps * caps) { GstQuarkTV *filter; gint i; @@ -176,7 +176,7 @@ gst_quarktv_sinkconnect (GstPad * pad, const GstCaps2 * caps) filter = GST_QUARKTV (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", &filter->width); gst_structure_get_int (structure, "height", &filter->height); diff --git a/gst/effectv/gstrev.c b/gst/effectv/gstrev.c index 0060f4101..bca245d21 100644 --- a/gst/effectv/gstrev.c +++ b/gst/effectv/gstrev.c @@ -183,14 +183,14 @@ gst_revtv_class_init (GstRevTVClass * klass) } static GstPadLinkReturn -gst_revtv_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_revtv_sinkconnect (GstPad * pad, const GstCaps * caps) { GstRevTV *filter; GstStructure *structure; filter = GST_REVTV (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", &filter->width); gst_structure_get_int (structure, "height", &filter->height); diff --git a/gst/effectv/gstshagadelic.c b/gst/effectv/gstshagadelic.c index d1b77b209..22948b578 100644 --- a/gst/effectv/gstshagadelic.c +++ b/gst/effectv/gstshagadelic.c @@ -154,7 +154,7 @@ gst_shagadelictv_class_init (GstShagadelicTVClass * klass) } static GstPadLinkReturn -gst_shagadelictv_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_shagadelictv_sinkconnect (GstPad * pad, const GstCaps * caps) { GstShagadelicTV *filter; gint area; @@ -162,7 +162,7 @@ gst_shagadelictv_sinkconnect (GstPad * pad, const GstCaps2 * caps) filter = GST_SHAGADELICTV (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", &filter->width); gst_structure_get_int (structure, "height", &filter->height); diff --git a/gst/effectv/gstvertigo.c b/gst/effectv/gstvertigo.c index ffbdebad0..2d2866447 100644 --- a/gst/effectv/gstvertigo.c +++ b/gst/effectv/gstvertigo.c @@ -188,7 +188,7 @@ gst_vertigotv_reset_handler (GstElement *element) static GstPadLinkReturn -gst_vertigotv_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_vertigotv_sinkconnect (GstPad * pad, const GstCaps * caps) { GstVertigoTV *filter; gint area; @@ -196,7 +196,7 @@ gst_vertigotv_sinkconnect (GstPad * pad, const GstCaps2 * caps) filter = GST_VERTIGOTV (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", &filter->width); gst_structure_get_int (structure, "height", &filter->height); diff --git a/gst/effectv/gstwarp.c b/gst/effectv/gstwarp.c index 89b597b2b..036485364 100644 --- a/gst/effectv/gstwarp.c +++ b/gst/effectv/gstwarp.c @@ -160,13 +160,13 @@ gst_warptv_class_init (GstWarpTVClass * klass) } static GstPadLinkReturn -gst_warptv_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_warptv_sinkconnect (GstPad * pad, const GstCaps * caps) { GstWarpTV *filter; GstStructure *structure; filter = GST_WARPTV (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", &filter->width); gst_structure_get_int (structure, "height", &filter->height); diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index 3fb0598c8..ca8933944 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -430,7 +430,7 @@ gst_flxdec_loop (GstElement *element) GstBuffer *buf; GstBuffer *databuf; guchar *data, *chunk; - GstCaps2 *caps; + GstCaps *caps; GstFlxDec *flxdec; FlxHeader *flxh; @@ -484,8 +484,8 @@ gst_flxdec_loop (GstElement *element) flxdec->frame_time = flxh->speed * GST_MSECOND; } - caps = gst_caps2_from_string (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32); - gst_caps2_set_simple (caps, + caps = gst_caps_from_string (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32); + gst_caps_set_simple (caps, "width", G_TYPE_INT, flxh->width, "height", G_TYPE_INT, flxh->height, "framerate", G_TYPE_DOUBLE, GST_SECOND/flxdec->frame_time, NULL); diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c index 5c4e4e54b..d892f4c6d 100644 --- a/gst/goom/gstgoom.c +++ b/gst/goom/gstgoom.c @@ -112,8 +112,8 @@ static GstElementStateReturn static void gst_goom_chain (GstPad *pad, GstData *_data); -static GstPadLinkReturn gst_goom_sinkconnect (GstPad *pad, const GstCaps2 *caps); -static GstPadLinkReturn gst_goom_srcconnect (GstPad *pad, const GstCaps2 *caps); +static GstPadLinkReturn gst_goom_sinkconnect (GstPad *pad, const GstCaps *caps); +static GstPadLinkReturn gst_goom_srcconnect (GstPad *pad, const GstCaps *caps); static GstElementClass *parent_class = NULL; @@ -202,14 +202,14 @@ gst_goom_dispose (GObject *object) } static GstPadLinkReturn -gst_goom_sinkconnect (GstPad *pad, const GstCaps2 *caps) +gst_goom_sinkconnect (GstPad *pad, const GstCaps *caps) { GstGOOM *goom; GstStructure *structure; goom = GST_GOOM (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", &goom->channels); @@ -217,14 +217,14 @@ gst_goom_sinkconnect (GstPad *pad, const GstCaps2 *caps) } static GstPadLinkReturn -gst_goom_srcconnect (GstPad *pad, const GstCaps2 *caps) +gst_goom_srcconnect (GstPad *pad, const GstCaps *caps) { GstGOOM *goom; GstStructure *structure; goom = GST_GOOM (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", &goom->width); gst_structure_get_int (structure, "height", &goom->height); diff --git a/gst/law/alaw-decode.c b/gst/law/alaw-decode.c index 4960949e1..001089481 100644 --- a/gst/law/alaw-decode.c +++ b/gst/law/alaw-decode.c @@ -80,22 +80,22 @@ static gint alaw_to_s16(guint8 a_val) } static GstPadLinkReturn -alawdec_link (GstPad *pad, const GstCaps2 *caps) +alawdec_link (GstPad *pad, const GstCaps *caps) { - GstCaps2* tempcaps; + GstCaps* tempcaps; gint rate, channels; GstStructure *structure; gboolean ret; GstALawDec* alawdec = GST_ALAWDEC (GST_OBJECT_PARENT (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "rate", &rate); ret &= gst_structure_get_int (structure, "channels", &channels); if (!ret) return GST_PAD_LINK_REFUSED; - tempcaps = gst_caps2_new_simple ( "audio/x-raw-int", + tempcaps = gst_caps_new_simple ( "audio/x-raw-int", "depth", G_TYPE_INT, 16, "width", G_TYPE_INT, 16, "signed", G_TYPE_BOOLEAN, TRUE, diff --git a/gst/law/alaw-encode.c b/gst/law/alaw-encode.c index 2a408d1ea..6efdb64fd 100644 --- a/gst/law/alaw-encode.c +++ b/gst/law/alaw-encode.c @@ -120,23 +120,23 @@ static GstElementClass *parent_class = NULL; /*static guint gst_stereo_signals[LAST_SIGNAL] = { 0 }; */ static GstPadLinkReturn -alawenc_link (GstPad *pad, const GstCaps2 *caps) +alawenc_link (GstPad *pad, const GstCaps *caps) { - GstCaps2* tempcaps; + GstCaps* tempcaps; gint rate, channels; GstStructure *structure; gboolean ret; GstALawEnc* alawenc = GST_ALAWENC (GST_OBJECT_PARENT (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "rate", &rate); ret &= gst_structure_get_int (structure, "channels", &channels); if (!ret) return GST_PAD_LINK_REFUSED; - tempcaps = gst_caps2_new_simple ("audio/x-alaw", + tempcaps = gst_caps_new_simple ("audio/x-alaw", "depth", G_TYPE_INT, 8, "width", G_TYPE_INT, 8, "signed", G_TYPE_BOOLEAN, FALSE, diff --git a/gst/law/alaw.c b/gst/law/alaw.c index 7824af8fe..be0559bbb 100644 --- a/gst/law/alaw.c +++ b/gst/law/alaw.c @@ -4,19 +4,19 @@ #include "alaw-encode.h" #include "alaw-decode.h" -static GstCaps2* +static GstCaps* alaw_factory (void) { - return gst_caps2_new_simple ("audio/x-alaw", + return gst_caps_new_simple ("audio/x-alaw", "rate", GST_TYPE_INT_RANGE, 8000, 192000, "channels", GST_TYPE_INT_RANGE, 1, 2, NULL); } -static GstCaps2* +static GstCaps* linear_factory (void) { - return gst_caps2_new_simple ("audio/x-raw-int", + return gst_caps_new_simple ("audio/x-raw-int", "width", G_TYPE_INT, 16, "depth", G_TYPE_INT, 16, "endianness", G_TYPE_INT, G_BYTE_ORDER, @@ -32,7 +32,7 @@ GstPadTemplate *alawdec_src_template, *alawdec_sink_template; static gboolean plugin_init (GstPlugin *plugin) { - GstCaps2* alaw_caps, *linear_caps; + GstCaps* alaw_caps, *linear_caps; alaw_caps = alaw_factory (); linear_caps = linear_factory (); diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c index a1b641bc9..d04a6ed4b 100644 --- a/gst/law/mulaw-decode.c +++ b/gst/law/mulaw-decode.c @@ -59,21 +59,21 @@ static GstElementClass *parent_class = NULL; static GstPadLinkReturn -mulawdec_link (GstPad *pad, const GstCaps2 *caps) +mulawdec_link (GstPad *pad, const GstCaps *caps) { - GstCaps2* tempcaps; + GstCaps* tempcaps; gint rate, channels; GstStructure *structure; gboolean ret; GstMuLawDec* mulawdec = GST_MULAWDEC (GST_OBJECT_PARENT (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "rate", &rate); ret = gst_structure_get_int (structure, "channels", &channels); if (!ret) return GST_PAD_LINK_REFUSED; - tempcaps = gst_caps2_new_simple ("audio/x-mulaw", + tempcaps = gst_caps_new_simple ("audio/x-mulaw", "depth", G_TYPE_INT, 16, "width", G_TYPE_INT, 16, "signed", G_TYPE_BOOLEAN, TRUE, diff --git a/gst/law/mulaw-encode.c b/gst/law/mulaw-encode.c index 7a1836963..b15815a18 100644 --- a/gst/law/mulaw-encode.c +++ b/gst/law/mulaw-encode.c @@ -58,21 +58,21 @@ static GstElementClass *parent_class = NULL; /*static guint gst_stereo_signals[LAST_SIGNAL] = { 0 }; */ static GstPadLinkReturn -mulawenc_link (GstPad *pad, const GstCaps2 *caps) +mulawenc_link (GstPad *pad, const GstCaps *caps) { - GstCaps2* tempcaps; + GstCaps* tempcaps; gint rate, channels; GstStructure *structure; gboolean ret; GstMuLawEnc* mulawenc = GST_MULAWENC (GST_OBJECT_PARENT (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "rate", &rate); ret = gst_structure_get_int (structure, "channels", &channels); if (!ret) return GST_PAD_LINK_REFUSED; - tempcaps = gst_caps2_new_simple ("audio/x-mulaw", + tempcaps = gst_caps_new_simple ("audio/x-mulaw", "depth", G_TYPE_INT, 8, "width", G_TYPE_INT, 8, "signed", G_TYPE_BOOLEAN, FALSE, diff --git a/gst/law/mulaw.c b/gst/law/mulaw.c index d88ad13ac..2aae63cd7 100644 --- a/gst/law/mulaw.c +++ b/gst/law/mulaw.c @@ -4,19 +4,19 @@ #include "mulaw-encode.h" #include "mulaw-decode.h" -static GstCaps2* +static GstCaps* mulaw_factory (void) { - return gst_caps2_new_simple ("audio/x-mulaw", + return gst_caps_new_simple ("audio/x-mulaw", "rate", GST_TYPE_INT_RANGE, 8000, 192000, "channels", GST_TYPE_INT_RANGE, 1, 2, NULL); } -static GstCaps2* +static GstCaps* linear_factory (void) { - return gst_caps2_new_simple ("audio/x-raw-int", + return gst_caps_new_simple ("audio/x-raw-int", "width", G_TYPE_INT, 16, "depth", G_TYPE_INT, 16, "endianness", G_TYPE_INT, G_BYTE_ORDER, @@ -32,7 +32,7 @@ GstPadTemplate *mulawdec_src_template, *mulawdec_sink_template; static gboolean plugin_init (GstPlugin *plugin) { - GstCaps2* mulaw_caps, *linear_caps; + GstCaps* mulaw_caps, *linear_caps; mulaw_caps = mulaw_factory (); linear_caps = linear_factory (); diff --git a/gst/level/gstlevel.c b/gst/level/gstlevel.c index 15ae884b6..e81828aa6 100644 --- a/gst/level/gstlevel.c +++ b/gst/level/gstlevel.c @@ -105,7 +105,7 @@ gst_level_get_type (void) } static GstPadLinkReturn -gst_level_link (GstPad *pad, const GstCaps2 *caps) +gst_level_link (GstPad *pad, const GstCaps *caps) { GstLevel *filter; GstPad *otherpad; @@ -127,7 +127,7 @@ gst_level_link (GstPad *pad, const GstCaps2 *caps) filter->num_samples = 0; - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "rate", &filter->rate); ret &= gst_structure_get_int (structure, "width", &filter->width); ret &= gst_structure_get_int (structure, "channels", &filter->channels); diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index b3b8e6270..af66fbfc8 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -90,22 +90,22 @@ static void gst_matroska_demux_get_property (GObject *object, GParamSpec *pspec); /* caps functions */ -static GstCaps2 *gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext +static GstCaps *gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *videocontext, const gchar *codec_id, gpointer data, guint size); -static GstCaps2 *gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext +static GstCaps *gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext, const gchar *codec_id, gpointer data, guint size); -static GstCaps2 *gst_matroska_demux_complex_caps (GstMatroskaTrackComplexContext +static GstCaps *gst_matroska_demux_complex_caps (GstMatroskaTrackComplexContext *complexcontext, const gchar *codec_id, gpointer data, guint size); -static GstCaps2 *gst_matroska_demux_subtitle_caps (GstMatroskaTrackSubtitleContext +static GstCaps *gst_matroska_demux_subtitle_caps (GstMatroskaTrackSubtitleContext *subtitlecontext, const gchar *codec_id, gpointer data, @@ -249,8 +249,8 @@ gst_matroska_demux_reset (GstElement *element) /* reset media info */ - gst_caps2_replace (&demux->metadata, NULL); - gst_caps2_replace (&demux->streaminfo, NULL); + gst_caps_replace (&demux->metadata, NULL); + gst_caps_replace (&demux->streaminfo, NULL); g_free (demux->writing_app); demux->writing_app = NULL; @@ -309,7 +309,7 @@ gst_matroska_demux_add_stream (GstMatroskaDemux *demux) GstEbmlRead *ebml = GST_EBML_READ (demux); GstMatroskaTrackContext *context; GstPadTemplate *templ = NULL; - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; gchar *padname = NULL; gboolean res = TRUE; guint32 id; @@ -2154,16 +2154,16 @@ gst_matroska_demux_loop (GstElement *element) } #if 0 -static GstCaps2 * +static GstCaps * gst_matroska_demux_vfw_caps (guint32 codec_fcc, gst_riff_strf_vids *vids) { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; switch (codec_fcc) { case GST_MAKE_FOURCC('I','4','2','0'): case GST_MAKE_FOURCC('Y','U','Y','2'): - caps = gst_caps2_new_simple ("video/x-raw-yuv", + caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC, codec_fcc, NULL); break; @@ -2171,16 +2171,16 @@ gst_matroska_demux_vfw_caps (guint32 codec_fcc, case GST_MAKE_FOURCC('J','P','E','G'): /* generic (mostly RGB) MJPEG */ case GST_MAKE_FOURCC('P','I','X','L'): /* Miro/Pinnacle fourccs */ case GST_MAKE_FOURCC('V','I','X','L'): /* Miro/Pinnacle fourccs */ - caps = gst_caps2_new_simple ("video/x-jpeg", NULL); + caps = gst_caps_new_simple ("video/x-jpeg", NULL); break; case GST_MAKE_FOURCC('H','F','Y','U'): - caps = gst_caps2_new_simple ("video/x-huffyuv", NULL); + caps = gst_caps_new_simple ("video/x-huffyuv", NULL); break; case GST_MAKE_FOURCC('M','P','E','G'): case GST_MAKE_FOURCC('M','P','G','I'): - caps = gst_caps2_new_simple ("video/mpeg", + caps = gst_caps_new_simple ("video/mpeg", "systemstream", G_TYPE_BOOLEAN, FALSE, "mpegversion", G_TYPE_BOOLEAN, 1, NULL); break; @@ -2192,61 +2192,61 @@ gst_matroska_demux_vfw_caps (guint32 codec_fcc, case GST_MAKE_FOURCC('V','D','O','W'): case GST_MAKE_FOURCC('V','I','V','O'): case GST_MAKE_FOURCC('x','2','6','3'): - caps = gst_caps2_new_simple ("video/x-h263", NULL); + caps = gst_caps_new_simple ("video/x-h263", NULL); break; case GST_MAKE_FOURCC('D','I','V','3'): case GST_MAKE_FOURCC('D','I','V','4'): case GST_MAKE_FOURCC('D','I','V','5'): - caps = gst_caps2_new_simple ("video/x-divx", + caps = gst_caps_new_simple ("video/x-divx", "divxversion", G_TYPE_INT, 3, NULL); break; case GST_MAKE_FOURCC('d','i','v','x'): case GST_MAKE_FOURCC('D','I','V','X'): case GST_MAKE_FOURCC('D','X','5','0'): - caps = gst_caps2_new_simple ("video/x-divx", + caps = gst_caps_new_simple ("video/x-divx", "divxversion", G_TYPE_INT, 5, NULL); break; case GST_MAKE_FOURCC('X','V','I','D'): case GST_MAKE_FOURCC('x','v','i','d'): - caps = gst_caps2_new_simple ("video/x-xvid", NULL); + caps = gst_caps_new_simple ("video/x-xvid", NULL); break; case GST_MAKE_FOURCC('M','P','G','4'): - caps = gst_caps2_new_simple ("video/x-msmpeg", + caps = gst_caps_new_simple ("video/x-msmpeg", "msmpegversion", G_TYPE_INT, 41, NULL); break; case GST_MAKE_FOURCC('M','P','4','2'): - caps = gst_caps2_new_simple ("video/x-msmpeg", + caps = gst_caps_new_simple ("video/x-msmpeg", "msmpegversion", G_TYPE_INT, 42, NULL); break; case GST_MAKE_FOURCC('M','P','4','3'): - caps = gst_caps2_new_simple ("video/x-msmpeg", + caps = gst_caps_new_simple ("video/x-msmpeg", "msmpegversion", G_TYPE_INT, 43, NULL); break; case GST_MAKE_FOURCC('3','I','V','1'): case GST_MAKE_FOURCC('3','I','V','2'): - caps = gst_caps2_new_simple ("video/x-3ivx", NULL); + caps = gst_caps_new_simple ("video/x-3ivx", NULL); break; case GST_MAKE_FOURCC('D','V','S','D'): case GST_MAKE_FOURCC('d','v','s','d'): - caps = gst_caps2_new_simple ("video/x-dv", + caps = gst_caps_new_simple ("video/x-dv", "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); break; case GST_MAKE_FOURCC('W','M','V','1'): - caps = gst_caps2_new_simple ("video/x-wmv", + caps = gst_caps_new_simple ("video/x-wmv", "wmvversion", G_TYPE_INT, 1, NULL); break; case GST_MAKE_FOURCC('W','M','V','2'): - caps = gst_caps2_new_simple ("video/x-wmv", + caps = gst_caps_new_simple ("video/x-wmv", "wmvversion", G_TYPE_INT, 2, NULL); break; @@ -2261,7 +2261,7 @@ gst_matroska_demux_vfw_caps (guint32 codec_fcc, } #endif -static GstCaps2 * +static GstCaps * gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *videocontext, const gchar *codec_id, gpointer data, @@ -2269,7 +2269,7 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *videocontext, { GstMatroskaTrackContext *context = (GstMatroskaTrackContext *) videocontext; - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC)) { gst_riff_strf_vids *vids = NULL; @@ -2320,18 +2320,18 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *videocontext, return NULL; } - caps = gst_caps2_new_simple ("video/x-raw-yuv", + caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC, fourcc, NULL); } else { - caps = gst_caps2_from_string ("video/x-raw-yuv, " + caps = gst_caps_from_string ("video/x-raw-yuv, " "format = (fourcc) { I420, YUY2, YV12 }"); } } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_SP)) { - caps = gst_caps2_new_simple ("video/x-divx", + caps = gst_caps_new_simple ("video/x-divx", "divxversion", G_TYPE_INT, 4, NULL); } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_ASP) || !strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_AP)) { - caps = gst_caps2_new_full ( + caps = gst_caps_new_full ( gst_structure_new ("video/x-divx", "divxversion", G_TYPE_INT, 5, NULL), gst_structure_new ("video/x-xvid", NULL), @@ -2340,7 +2340,7 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *videocontext, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL), NULL); } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MSMPEG4V3)) { - caps = gst_caps2_new_full ( + caps = gst_caps_new_full ( gst_structure_new ("video/x-divx", "divxversion", G_TYPE_INT, 3, NULL), gst_structure_new ("video/x-msmpeg", @@ -2357,11 +2357,11 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *videocontext, else g_assert (0); - caps = gst_caps2_new_simple ("video/mpeg", + caps = gst_caps_new_simple ("video/mpeg", "systemstream", G_TYPE_BOOLEAN, FALSE, "mpegversion", G_TYPE_INT, mpegversion, NULL); } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MJPEG)) { - caps = gst_caps2_new_simple ("video/x-jpeg", NULL); + caps = gst_caps_new_simple ("video/x-jpeg", NULL); } else { GST_WARNING ("Unknown codec '%s', cannot build Caps", codec_id); @@ -2372,8 +2372,8 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *videocontext, int i; GstStructure *structure; - for (i=0;i<gst_caps2_get_n_structures(caps);i++){ - structure = gst_caps2_get_nth_cap (caps, i); + for (i=0;i<gst_caps_get_size(caps);i++){ + structure = gst_caps_get_structure (caps, i); if (videocontext != NULL) { if (videocontext->pixel_width > 0 && videocontext->pixel_height > 0) { @@ -2428,20 +2428,20 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *videocontext, } #if 0 -static GstCaps2 * +static GstCaps * gst_matroskademux_acm_caps (guint16 codec_id, gst_riff_strf_auds *auds) { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; switch (codec_id) { case GST_RIFF_WAVE_FORMAT_MPEGL3: /* mp3 */ - caps = gst_caps2_new_simple ("audio/mpeg", + caps = gst_caps_new_simple ("audio/mpeg", "layer", G_TYPE_INT, 3, NULL); break; case GST_RIFF_WAVE_FORMAT_MPEGL12: /* mp1 or mp2 */ - caps = gst_caps2_new_simple ("audio/mpeg", + caps = gst_caps_new_simple ("audio/mpeg", "layer", G_TYPE_INT, 2, NULL); break; @@ -2451,13 +2451,13 @@ gst_matroskademux_acm_caps (guint16 codec_id, gint ch = GUINT16_FROM_LE (auds->channels); gint ws = GUINT16_FROM_LE (auds->size); - caps = gst_caps2_new_simple ("audio/x-raw-int", + caps = gst_caps_new_simple ("audio/x-raw-int", "endianness", G_TYPE_INT, G_LITTLE_ENDIAN, "width", G_TYPE_INT, ba * 8 / ch, "depth", G_TYPE_INT, ws, "signed", G_TYPE_BOOLEAN, ws != 8, NULL); } else { - caps = gst_caps2_from_string ("audio/x-raw-int, " + caps = gst_caps_from_string ("audio/x-raw-int, " "endianness = (int) LITTLE_ENDIAN, " "signed = (boolean) { TRUE, FALSE }, " "depth = (int) { 8, 16 }, " @@ -2472,7 +2472,7 @@ gst_matroskademux_acm_caps (guint16 codec_id, g_warning ("invalid depth (%d) of mulaw audio, overwriting.", auds->size); } - caps = gst_caps2_new_simple ("audio/x-mulaw", NULL); + caps = gst_caps_new_simple ("audio/x-mulaw", NULL); break; case GST_RIFF_WAVE_FORMAT_ALAW: @@ -2480,7 +2480,7 @@ gst_matroskademux_acm_caps (guint16 codec_id, g_warning ("invalid depth (%d) of alaw audio, overwriting.", auds->size); } - caps = gst_caps2_new_simple ("audio/x-alaw", NULL); + caps = gst_caps_new_simple ("audio/x-alaw", NULL); break; case GST_RIFF_WAVE_FORMAT_VORBIS1: /* ogg/vorbis mode 1 */ @@ -2489,11 +2489,11 @@ gst_matroskademux_acm_caps (guint16 codec_id, case GST_RIFF_WAVE_FORMAT_VORBIS1PLUS: /* ogg/vorbis mode 1+ */ case GST_RIFF_WAVE_FORMAT_VORBIS2PLUS: /* ogg/vorbis mode 2+ */ case GST_RIFF_WAVE_FORMAT_VORBIS3PLUS: /* ogg/vorbis mode 3+ */ - caps = gst_caps2_new_simple ("audio/x-vorbis", NULL); + caps = gst_caps_new_simple ("audio/x-vorbis", NULL); break; case GST_RIFF_WAVE_FORMAT_A52: - caps = gst_caps2_new_simple ("audio/x-ac3", NULL); + caps = gst_caps_new_simple ("audio/x-ac3", NULL); break; default: @@ -2507,7 +2507,7 @@ gst_matroskademux_acm_caps (guint16 codec_id, } #endif -static GstCaps2 * +static GstCaps * gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext, const gchar *codec_id, gpointer data, @@ -2515,7 +2515,7 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext, { GstMatroskaTrackContext *context = (GstMatroskaTrackContext *) audiocontext; - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L1) || !strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L2) || @@ -2531,7 +2531,7 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext, else g_assert (0); - caps = gst_caps2_new_simple ("audio/mpeg", + caps = gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, 1, "systemstream", G_TYPE_BOOLEAN, FALSE, "layer", G_TYPE_INT, layer, NULL); @@ -2547,33 +2547,33 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext, g_assert (0); if (context != NULL) { - caps = gst_caps2_new_simple ("audio/x-raw-int", + caps = gst_caps_new_simple ("audio/x-raw-int", "width", G_TYPE_INT, audiocontext->bitdepth, "depth", G_TYPE_INT, audiocontext->bitdepth, "signed", G_TYPE_BOOLEAN, audiocontext->bitdepth == 8, NULL); } else { - caps = gst_caps2_from_string ("audio/x-raw-int, " + caps = gst_caps_from_string ("audio/x-raw-int, " "signed = (boolean) { TRUE, FALSE }, " "depth = (int) { 8, 16 }, " "width = (int) { 8, 16 }"); } - gst_caps2_set_simple (caps, "endianness", G_TYPE_INT, endianness, NULL); + gst_caps_set_simple (caps, "endianness", G_TYPE_INT, endianness, NULL); } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_PCM_FLOAT)) { - caps = gst_caps2_new_simple ("audio/x-raw-float", + caps = gst_caps_new_simple ("audio/x-raw-float", "endianness", G_TYPE_INT, G_BYTE_ORDER, "buffer-frames", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL); if (audiocontext != NULL) { - gst_caps2_set_simple (caps, + gst_caps_set_simple (caps, "width", G_TYPE_INT, audiocontext->bitdepth, NULL); } else { - gst_caps2_set_simple (caps, + gst_caps_set_simple (caps, "width", GST_TYPE_INT_RANGE, 32, 64, NULL); } } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_AC3) || !strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_DTS)) { - caps = gst_caps2_new_simple ("audio/x-ac3", NULL); + caps = gst_caps_new_simple ("audio/x-ac3", NULL); } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_VORBIS)) { - caps = gst_caps2_new_simple ("audio/x-vorbis", NULL); + caps = gst_caps_new_simple ("audio/x-vorbis", NULL); } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_ACM)) { gst_riff_strf_auds *auds = NULL; @@ -2607,7 +2607,7 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext, else g_assert (0); - caps = gst_caps2_new_simple ("audio/mpeg", + caps = gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, mpegversion, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); } else { @@ -2620,8 +2620,8 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext, GstStructure *structure; int i; - for (i=0; i<gst_caps2_get_n_structures(caps); i++){ - structure = gst_caps2_get_nth_cap (caps, i); + for (i=0; i<gst_caps_get_size(caps); i++){ + structure = gst_caps_get_structure (caps, i); if (audiocontext != NULL) { if (audiocontext->samplerate > 0 && audiocontext->channels > 0) { @@ -2642,26 +2642,26 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext, return caps; } -static GstCaps2 * +static GstCaps * gst_matroska_demux_complex_caps (GstMatroskaTrackComplexContext *complexcontext, const gchar *codec_id, gpointer data, guint size) { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; //.. return caps; } -static GstCaps2 * +static GstCaps * gst_matroska_demux_subtitle_caps (GstMatroskaTrackSubtitleContext *subtitlecontext, const gchar *codec_id, gpointer data, guint size) { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; //.. @@ -2715,7 +2715,7 @@ gboolean gst_matroska_demux_plugin_init (GstPlugin *plugin) { gint i; - GstCaps2 *videosrccaps, *audiosrccaps, *subtitlesrccaps, *temp; + GstCaps *videosrccaps, *audiosrccaps, *subtitlesrccaps, *temp; const gchar *video_id[] = { GST_MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC, GST_MATROSKA_CODEC_ID_VIDEO_UNCOMPRESSED, @@ -2757,36 +2757,36 @@ gst_matroska_demux_plugin_init (GstPlugin *plugin) return FALSE; /* video src template */ - videosrccaps = gst_caps2_new_empty (); + videosrccaps = gst_caps_new_empty (); for (i = 0; video_id[i] != NULL; i++) { temp = gst_matroska_demux_video_caps (NULL, video_id[i], NULL, 0); - gst_caps2_append (videosrccaps, temp); + gst_caps_append (videosrccaps, temp); } for (i = 0; complex_id[i] != NULL; i++) { temp = gst_matroska_demux_complex_caps (NULL, video_id[i], NULL, 0); - gst_caps2_append (videosrccaps, temp); + gst_caps_append (videosrccaps, temp); } videosrctempl = gst_pad_template_new ("video_%02d", GST_PAD_SRC, GST_PAD_SOMETIMES, videosrccaps); - audiosrccaps = gst_caps2_new_empty (); + audiosrccaps = gst_caps_new_empty (); /* audio src template */ for (i = 0; audio_id[i] != NULL; i++) { temp = gst_matroska_demux_audio_caps (NULL, audio_id[i], NULL, 0); - gst_caps2_append (audiosrccaps, temp); + gst_caps_append (audiosrccaps, temp); } audiosrctempl = gst_pad_template_new ("audio_%02d", GST_PAD_SRC, GST_PAD_SOMETIMES, audiosrccaps); - subtitlesrccaps = gst_caps2_new_empty (); + subtitlesrccaps = gst_caps_new_empty (); /* subtitle src template */ for (i = 0; subtitle_id[i] != NULL; i++) { temp = gst_matroska_demux_subtitle_caps (NULL, subtitle_id[i], NULL, 0); - gst_caps2_append (subtitlesrccaps, temp); + gst_caps_append (subtitlesrccaps, temp); } subtitlesrctempl = gst_pad_template_new ("subtitle_%02d", GST_PAD_SRC, diff --git a/gst/matroska/matroska-demux.h b/gst/matroska/matroska-demux.h index 28eb93d6e..e393a52af 100644 --- a/gst/matroska/matroska-demux.h +++ b/gst/matroska/matroska-demux.h @@ -66,8 +66,8 @@ typedef struct _GstMatroskaDemux { GstClock *clock; /* metadata */ - GstCaps2 *metadata; - GstCaps2 *streaminfo; + GstCaps *metadata; + GstCaps *streaminfo; gchar *muxing_app, *writing_app; gint64 created; diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index cb244f51a..b3f6ed4da 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -55,7 +55,7 @@ GST_STATIC_PAD_TEMPLATE ( "video_%d", GST_PAD_SINK, GST_PAD_REQUEST, - GST_STATIC_CAPS2_ANY + GST_STATIC_CAPS_ANY ); static GstStaticPadTemplate audiosink_templ = @@ -63,7 +63,7 @@ GST_STATIC_PAD_TEMPLATE ( "audio_%d", GST_PAD_SINK, GST_PAD_REQUEST, - GST_STATIC_CAPS2_ANY + GST_STATIC_CAPS_ANY ); static GstStaticPadTemplate subtitlesink_templ = @@ -71,7 +71,7 @@ GST_STATIC_PAD_TEMPLATE ( "subtitle_%d", GST_PAD_SINK, GST_PAD_REQUEST, - GST_STATIC_CAPS2_ANY + GST_STATIC_CAPS_ANY ); /* gobject magic foo */ @@ -168,7 +168,7 @@ gst_matroska_mux_class_init (GstMatroskaMuxClass *klass) g_object_class_install_property (gobject_class, ARG_METADATA, g_param_spec_boxed ("metadata", "Metadata", "Metadata", - GST_TYPE_CAPS2, G_PARAM_READWRITE)); + GST_TYPE_CAPS, G_PARAM_READWRITE)); parent_class = g_type_class_ref (GST_TYPE_EBML_WRITE); @@ -239,8 +239,8 @@ gst_matroska_mux_reset (GstElement *element) mux->num_v_streams = 0; /* reset media info (to default) */ - gst_caps2_replace (&mux->metadata, - gst_caps2_new_simple ("application/x-gst-metadata", + gst_caps_replace (&mux->metadata, + gst_caps_new_simple ("application/x-gst-metadata", "application", G_TYPE_STRING, "", "date", G_TYPE_STRING, "", NULL)); @@ -255,7 +255,7 @@ gst_matroska_mux_reset (GstElement *element) } static GstPadLinkReturn -gst_matroska_mux_video_pad_link (GstPad *pad, const GstCaps2 *caps) +gst_matroska_mux_video_pad_link (GstPad *pad, const GstCaps *caps) { GstMatroskaTrackContext *context = NULL; GstMatroskaTrackVideoContext *videocontext; @@ -279,7 +279,7 @@ gst_matroska_mux_video_pad_link (GstPad *pad, const GstCaps2 *caps) videocontext = (GstMatroskaTrackVideoContext *) context; /* gst -> matroska ID'ing */ - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); mimetype = gst_structure_get_name (structure); @@ -373,7 +373,7 @@ gst_matroska_mux_video_pad_link (GstPad *pad, const GstCaps2 *caps) static GstPadLinkReturn gst_matroska_mux_audio_pad_link (GstPad *pad, - const GstCaps2 *caps) + const GstCaps *caps) { GstMatroskaTrackContext *context = NULL; GstMatroskaTrackAudioContext *audiocontext; @@ -394,7 +394,7 @@ gst_matroska_mux_audio_pad_link (GstPad *pad, g_assert (context->type == GST_MATROSKA_TRACK_TYPE_AUDIO); audiocontext = (GstMatroskaTrackAudioContext *) context; - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); mimetype = gst_structure_get_name (structure); /* general setup */ @@ -472,7 +472,7 @@ gst_matroska_mux_audio_pad_link (GstPad *pad, static GstPadLinkReturn gst_matroska_mux_subtitle_pad_link (GstPad *pad, - const GstCaps2 *caps) + const GstCaps *caps) { /* Consider this as boilerplate code for now. There is * no single subtitle creation element in GStreamer, @@ -659,11 +659,11 @@ gst_matroska_mux_start (GstMatroskaMux *mux) gst_ebml_write_float (ebml, GST_MATROSKA_ID_DURATION, 0); gst_ebml_write_utf8 (ebml, GST_MATROSKA_ID_MUXINGAPP, "GStreamer"); if (mux->metadata && - gst_structure_has_field (gst_caps2_get_nth_cap(mux->metadata,0), + gst_structure_has_field (gst_caps_get_structure(mux->metadata,0), "application")) { const gchar *app; - app = gst_structure_get_string (gst_caps2_get_nth_cap(mux->metadata, 0), + app = gst_structure_get_string (gst_caps_get_structure(mux->metadata, 0), "application"); if (app && app[0]) { gst_ebml_write_utf8 (ebml, GST_MATROSKA_ID_WRITINGAPP, app); @@ -911,7 +911,7 @@ gst_matroska_mux_set_property (GObject *object, switch (prop_id) { case ARG_METADATA: - gst_caps2_replace (&mux->metadata, + gst_caps_replace (&mux->metadata, g_value_get_boxed (value)); break; default: diff --git a/gst/matroska/matroska-mux.h b/gst/matroska/matroska-mux.h index 3efb6f89d..119237c99 100644 --- a/gst/matroska/matroska-mux.h +++ b/gst/matroska/matroska-mux.h @@ -62,7 +62,7 @@ typedef struct _GstMatroskaMux { num_v_streams, num_a_streams, num_t_streams; /* metadata - includes writing_app and creation_time */ - GstCaps2 *metadata; + GstCaps *metadata; /* state */ GstMatroskaMuxState state; diff --git a/gst/median/gstmedian.c b/gst/median/gstmedian.c index 5f091264d..719ed8d83 100644 --- a/gst/median/gstmedian.c +++ b/gst/median/gstmedian.c @@ -137,14 +137,14 @@ gst_median_class_init (GstMedianClass *klass) } static gboolean -gst_median_sinkconnect (GstPad *pad, const GstCaps2 *caps) +gst_median_sinkconnect (GstPad *pad, const GstCaps *caps) { GstMedian *filter; GstStructure *structure; filter = GST_MEDIAN (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", &filter->width); gst_structure_get_int (structure, "height", &filter->height); diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c index ffe37fef4..37ab9f2cd 100644 --- a/gst/monoscope/gstmonoscope.c +++ b/gst/monoscope/gstmonoscope.c @@ -105,9 +105,9 @@ static void gst_monoscope_init (GstMonoscope *monoscope); static void gst_monoscope_chain (GstPad *pad, GstData *_data); static GstPadLinkReturn - gst_monoscope_sinkconnect (GstPad *pad, const GstCaps2 *caps); + gst_monoscope_sinkconnect (GstPad *pad, const GstCaps *caps); static GstPadLinkReturn - gst_monoscope_srcconnect (GstPad *pad, const GstCaps2 *caps); + gst_monoscope_srcconnect (GstPad *pad, const GstCaps *caps); static GstElementClass *parent_class = NULL; @@ -182,7 +182,7 @@ gst_monoscope_init (GstMonoscope *monoscope) } static GstPadLinkReturn -gst_monoscope_sinkconnect (GstPad *pad, const GstCaps2 *caps) +gst_monoscope_sinkconnect (GstPad *pad, const GstCaps *caps) { GstMonoscope *monoscope; monoscope = GST_MONOSCOPE (gst_pad_get_parent (pad)); @@ -193,9 +193,9 @@ gst_monoscope_sinkconnect (GstPad *pad, const GstCaps2 *caps) static GstPadLinkReturn gst_monoscope_negotiate (GstMonoscope *monoscope) { - GstCaps2 *caps; + GstCaps *caps; - caps = gst_caps2_new_simple ("video/x-raw-rgb", + 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, @@ -210,13 +210,13 @@ gst_monoscope_negotiate (GstMonoscope *monoscope) } static GstPadLinkReturn -gst_monoscope_srcconnect (GstPad *pad, const GstCaps2 *caps) +gst_monoscope_srcconnect (GstPad *pad, const GstCaps *caps) { GstPadLinkReturn ret; GstMonoscope *monoscope = GST_MONOSCOPE (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_int (structure, "width", &monoscope->width); gst_structure_get_int (structure, "height", &monoscope->height); diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 2bbe5819c..78ac6cd31 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -64,7 +64,7 @@ struct _QtDemuxSample { struct _QtDemuxStream { guint32 subtype; - GstCaps2 *caps; + GstCaps *caps; GstPad *pad; int n_samples; QtDemuxSample *samples; @@ -114,7 +114,7 @@ GST_STATIC_PAD_TEMPLATE ( "sink", GST_PAD_SINK, GST_PAD_SOMETIMES, - GST_STATIC_CAPS2_ANY + GST_STATIC_CAPS_ANY ); static GstStaticPadTemplate gst_qtdemux_videosrc_template = @@ -122,7 +122,7 @@ GST_STATIC_PAD_TEMPLATE ( "audio_%02d", GST_PAD_SRC, GST_PAD_SOMETIMES, - GST_STATIC_CAPS2_ANY + GST_STATIC_CAPS_ANY ); static GstStaticPadTemplate gst_qtdemux_audiosrc_template = @@ -130,7 +130,7 @@ GST_STATIC_PAD_TEMPLATE ( "video_%02d", GST_PAD_SRC, GST_PAD_SOMETIMES, - GST_STATIC_CAPS2_ANY + GST_STATIC_CAPS_ANY ); static GstElementClass *parent_class = NULL; @@ -147,8 +147,8 @@ static void qtdemux_parse(GstQTDemux *qtdemux, GNode *node, void *buffer, int le static QtNodeType *qtdemux_type_get(guint32 fourcc); static void qtdemux_node_dump(GstQTDemux *qtdemux, GNode *node); static void qtdemux_parse_tree(GstQTDemux *qtdemux); -static GstCaps2 *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc); -static GstCaps2 *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc); +static GstCaps *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc); +static GstCaps *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc); static GType gst_qtdemux_get_type (void) { @@ -208,7 +208,7 @@ static gboolean plugin_init (GstPlugin *plugin) { #if 0 - GstCaps2 *audiocaps = NULL, *videocaps = NULL, *temp; + GstCaps *audiocaps = NULL, *videocaps = NULL, *temp; const guint32 audio_fcc[] = { /* FILLME */ 0, @@ -496,7 +496,7 @@ static void gst_qtdemux_loop_header (GstElement *element) if(stream->subtype == GST_MAKE_FOURCC('v','i','d','e')){ float fps = 1. * GST_SECOND / stream->samples[stream->sample_index].duration; if (fps != stream->fps) { - gst_caps2_set_simple (stream->caps, "framerate", G_TYPE_DOUBLE, fps, + gst_caps_set_simple (stream->caps, "framerate", G_TYPE_DOUBLE, fps, NULL); stream->fps = fps; gst_pad_try_set_caps(stream->pad, stream->caps); @@ -517,7 +517,7 @@ static void gst_qtdemux_loop_header (GstElement *element) } -static GstCaps2 *gst_qtdemux_src_getcaps(GstPad *pad) +static GstCaps *gst_qtdemux_src_getcaps(GstPad *pad) { GstQTDemux *qtdemux; QtDemuxStream *stream; @@ -529,13 +529,13 @@ static GstCaps2 *gst_qtdemux_src_getcaps(GstPad *pad) g_return_val_if_fail(GST_IS_QTDEMUX(qtdemux), NULL); stream = GST_PAD_ELEMENT_PRIVATE (pad); - return gst_caps2_copy(stream->caps); + return gst_caps_copy(stream->caps); } #if 0 /* This function doesn't do anything useful, but might be useful later */ static GstPadLinkReturn -gst_qtdemux_src_link(GstPad *pad, GstCaps2 *caps) +gst_qtdemux_src_link(GstPad *pad, GstCaps *caps) { GstQTDemux *qtdemux; QtDemuxStream *stream; @@ -571,7 +571,7 @@ void gst_qtdemux_add_stream(GstQTDemux *qtdemux, QtDemuxStream *stream) g_strdup_printf ("video_%02d", qtdemux->n_video_streams)); stream->fps = 1. * GST_SECOND / stream->samples[0].duration; if(stream->caps){ - gst_caps2_set_simple(stream->caps, + gst_caps_set_simple(stream->caps, "width", G_TYPE_INT, stream->width, "height", G_TYPE_INT, stream->height, "framerate", G_TYPE_DOUBLE, stream->fps, NULL); @@ -582,7 +582,7 @@ void gst_qtdemux_add_stream(GstQTDemux *qtdemux, QtDemuxStream *stream) gst_static_pad_template_get(&gst_qtdemux_audiosrc_template), g_strdup_printf ("audio_%02d", qtdemux->n_audio_streams)); if(stream->caps){ - gst_caps2_set_simple(stream->caps, + gst_caps_set_simple(stream->caps, "rate", G_TYPE_INT, (int)stream->rate, "channels", G_TYPE_INT, stream->n_channels, NULL); } @@ -1324,7 +1324,7 @@ static void qtdemux_parse_trak(GstQTDemux *qtdemux, GNode *trak) stream->caps = qtdemux_video_caps(qtdemux, QTDEMUX_FOURCC_GET(stsd->data+offset+4)); - g_print("caps %s\n",gst_caps2_to_string(stream->caps)); + g_print("caps %s\n",gst_caps_to_string(stream->caps)); }else if(stream->subtype == FOURCC_soun){ int version; @@ -1352,7 +1352,7 @@ static void qtdemux_parse_trak(GstQTDemux *qtdemux, GNode *trak) stream->caps = qtdemux_audio_caps(qtdemux, QTDEMUX_FOURCC_GET(stsd->data+16+4)); - g_print("caps %s\n",gst_caps2_to_string(stream->caps)); + g_print("caps %s\n",gst_caps_to_string(stream->caps)); }else{ g_print("unknown subtype\n"); return; @@ -1518,28 +1518,28 @@ done2: } -static GstCaps2 *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc) +static GstCaps *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc) { switch(fourcc){ case GST_MAKE_FOURCC('j','p','e','g'): /* JPEG */ - return gst_caps2_from_string ("image/jpeg"); + return gst_caps_from_string ("image/jpeg"); case GST_MAKE_FOURCC('m','j','p','a'): /* Motion-JPEG (format A) */ - return gst_caps2_from_string ("image/jpeg"); + return gst_caps_from_string ("image/jpeg"); case GST_MAKE_FOURCC('m','j','p','b'): /* Motion-JPEG (format B) */ - return gst_caps2_from_string ("image/jpeg"); + return gst_caps_from_string ("image/jpeg"); case GST_MAKE_FOURCC('S','V','Q','3'): - return gst_caps2_from_string ("video/x-svq, " + return gst_caps_from_string ("video/x-svq, " "svqversion = (int) 3"); case GST_MAKE_FOURCC('s','v','q','i'): case GST_MAKE_FOURCC('S','V','Q','1'): - return gst_caps2_from_string ("video/x-svq, " + return gst_caps_from_string ("video/x-svq, " "svqversion = (int) 1"); case GST_MAKE_FOURCC('r','a','w',' '): /* uncompressed RGB */ - return gst_caps2_from_string ("video/x-raw-rgb, " + return gst_caps_from_string ("video/x-raw-rgb, " "endianness = (int) BIG_ENDIAN"); /*"bpp", GST_PROPS_INT(x), "depth", GST_PROPS_INT(x), @@ -1548,26 +1548,26 @@ static GstCaps2 *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc) "blue_mask", GST_PROPS_INT(x), FIXME! */ case GST_MAKE_FOURCC('Y','u','v','2'): /* uncompressed YUV2 */ - return gst_caps2_from_string ("video/x-raw-yuv, " + return gst_caps_from_string ("video/x-raw-yuv, " "format = (fourcc) YUY2"); case GST_MAKE_FOURCC('m','p','e','g'): /* MPEG */ - return gst_caps2_from_string ("video/mpeg, " + return gst_caps_from_string ("video/mpeg, " "systemstream = (boolean) false, " "mpegversion = (int) 1"); case GST_MAKE_FOURCC('g','i','f',' '): - return gst_caps2_from_string ("image/gif"); + return gst_caps_from_string ("image/gif"); case GST_MAKE_FOURCC('h','2','6','3'): /* H.263 */ /* ffmpeg uses the height/width props, don't know why */ - return gst_caps2_from_string ("video/x-h263"); + return gst_caps_from_string ("video/x-h263"); case GST_MAKE_FOURCC('m','p','4','v'): /* MPEG-4 */ - return gst_caps2_from_string ("video/mpeg, " + return gst_caps_from_string ("video/mpeg, " "mpegversion = (int) 4, " "systemstream = (boolean) false"); case GST_MAKE_FOURCC('3','I','V','1'): - return gst_caps2_from_string ("video/x-3ivx"); + return gst_caps_from_string ("video/x-3ivx"); case GST_MAKE_FOURCC('r','p','z','a'): case GST_MAKE_FOURCC('c','v','i','d'): /* Cinepak */ @@ -1582,91 +1582,91 @@ static GstCaps2 *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc) } } -static GstCaps2 *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc) +static GstCaps *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc) { switch(fourcc){ case GST_MAKE_FOURCC('N','O','N','E'): - return NULL; /*gst_caps2_from_string ("audio/raw");*/ + return NULL; /*gst_caps_from_string ("audio/raw");*/ case GST_MAKE_FOURCC('r','a','w',' '): /* FIXME */ - return gst_caps2_from_string ("audio/x-raw-int, " + return gst_caps_from_string ("audio/x-raw-int, " "width = (int) 8, " "depth = (int) 8, " "signed = (boolean) true"); case GST_MAKE_FOURCC('t','w','o','s'): /* FIXME */ - return gst_caps2_from_string ("audio/x-raw-int, " + return gst_caps_from_string ("audio/x-raw-int, " "width = (int) 16, " "depth = (int) 16, " "endianness = (int) G_BIG_ENDIAN, " "signed = (boolean) true"); case GST_MAKE_FOURCC('s','o','w','t'): /* FIXME */ - return gst_caps2_from_string ("audio/x-raw-int, " + return gst_caps_from_string ("audio/x-raw-int, " "width = (int) 16, " "depth = (int) 16, " "endianness = (int) G_LITTLE_ENDIAN, " "signed = (boolean) true"); case GST_MAKE_FOURCC('f','l','6','4'): - return gst_caps2_from_string ("audio/x-raw-float, " + return gst_caps_from_string ("audio/x-raw-float, " "width = (int) 64, " "endianness = (int) G_BIG_ENDIAN"); case GST_MAKE_FOURCC('f','l','3','2'): - return gst_caps2_from_string ("audio/x-raw-float, " + return gst_caps_from_string ("audio/x-raw-float, " "width = (int) 32, " "endianness = (int) G_BIG_ENDIAN"); case GST_MAKE_FOURCC('i','n','2','4'): /* FIXME */ - return gst_caps2_from_string ("audio/x-raw-int, " + return gst_caps_from_string ("audio/x-raw-int, " "width = (int) 24, " "depth = (int) 32, " "endianness = (int) G_BIG_ENDIAN, " "signed = (boolean) true"); case GST_MAKE_FOURCC('i','n','3','2'): /* FIXME */ - return gst_caps2_from_string ("audio/x-raw-int, " + return gst_caps_from_string ("audio/x-raw-int, " "width = (int) 32, " "depth = (int) 32, " "endianness = (int) G_BIG_ENDIAN, " "signed = (boolean) true"); case GST_MAKE_FOURCC('u','l','a','w'): /* FIXME */ - return gst_caps2_from_string ("audio/x-mulaw"); + return gst_caps_from_string ("audio/x-mulaw"); case GST_MAKE_FOURCC('a','l','a','w'): /* FIXME */ - return gst_caps2_from_string ("audio/x-alaw"); + return gst_caps_from_string ("audio/x-alaw"); case 0x6d730002: /* Microsoft ADPCM-ACM code 2 */ - return gst_caps2_from_string ("audio/x-adpcm, " + return gst_caps_from_string ("audio/x-adpcm, " "layout = (string) microsoft"); case 0x6d730011: /* FIXME DVI/Intel IMA ADPCM/ACM code 17 */ - return gst_caps2_from_string ("audio/x-adpcm, " + return gst_caps_from_string ("audio/x-adpcm, " "layout = (string) quicktime"); case 0x6d730055: /* MPEG layer 3, CBR only (pre QT4.1) */ case 0x5500736d: case GST_MAKE_FOURCC('.','m','p','3'): /* MPEG layer 3, CBR & VBR (QT4.1 and later) */ - return gst_caps2_from_string ("audio/mpeg, " + return gst_caps_from_string ("audio/mpeg, " "layer = (int) 3"); case GST_MAKE_FOURCC('M','A','C','3'): /* MACE 3:1 */ - return gst_caps2_from_string ("audio/x-mace, " + return gst_caps_from_string ("audio/x-mace, " "maceversion = (int) 3"); case GST_MAKE_FOURCC('M','A','C','6'): /* MACE 6:1 */ - return gst_caps2_from_string ("audio/x-mace, " + return gst_caps_from_string ("audio/x-mace, " "maceversion = (int) 6"); case GST_MAKE_FOURCC('O','g','g','V'): /* Ogg Vorbis */ - return gst_caps2_from_string ("application/ogg"); + return gst_caps_from_string ("application/ogg"); case GST_MAKE_FOURCC('d','v','c','a'): /* DV audio */ - return gst_caps2_from_string ("audio/x-dv"); + return gst_caps_from_string ("audio/x-dv"); case GST_MAKE_FOURCC('m','p','4','a'): /* MPEG-4 AAC */ - return gst_caps2_from_string ("audio/mpeg, " + return gst_caps_from_string ("audio/mpeg, " "mpegversion = (int) 4"); case GST_MAKE_FOURCC('q','t','v','r'): /* ? */ diff --git a/gst/rtp/gstrtpL16depay.c b/gst/rtp/gstrtpL16depay.c index 34e2be8c0..16d128c6a 100644 --- a/gst/rtp/gstrtpL16depay.c +++ b/gst/rtp/gstrtpL16depay.c @@ -170,11 +170,11 @@ gst_rtpL16parse_ntohs (GstBuffer *buf) void gst_rtpL16_caps_nego (GstRtpL16Parse *rtpL16parse) { - GstCaps2 *caps; + GstCaps *caps; - caps = gst_caps2_copy(gst_static_caps2_get (&gst_rtpL16parse_src_template.static_caps)); + caps = gst_caps_copy(gst_static_caps_get (&gst_rtpL16parse_src_template.static_caps)); - gst_caps2_set_simple (caps, + gst_caps_set_simple (caps, "rate", G_TYPE_INT, rtpL16parse->frequency, "channel", G_TYPE_INT, rtpL16parse->channels, NULL); diff --git a/gst/rtp/gstrtpL16enc.c b/gst/rtp/gstrtpL16enc.c index 543b32b57..45d6a95ab 100644 --- a/gst/rtp/gstrtpL16enc.c +++ b/gst/rtp/gstrtpL16enc.c @@ -75,7 +75,7 @@ static void gst_rtpL16enc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpL16enc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstPadLinkReturn gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps2 * caps); +static GstPadLinkReturn gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps * caps); static GstElementStateReturn gst_rtpL16enc_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -154,7 +154,7 @@ gst_rtpL16enc_init (GstRtpL16Enc * rtpL16enc) } static GstPadLinkReturn -gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps * caps) { GstRtpL16Enc *rtpL16enc; GstStructure *structure; @@ -162,7 +162,7 @@ gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps2 * caps) rtpL16enc = GST_RTP_L16_ENC (gst_pad_get_parent (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "rate", &rtpL16enc->frequency); ret &= gst_structure_get_int (structure, "channels", &rtpL16enc->channels); diff --git a/gst/rtp/gstrtpL16parse.c b/gst/rtp/gstrtpL16parse.c index 34e2be8c0..16d128c6a 100644 --- a/gst/rtp/gstrtpL16parse.c +++ b/gst/rtp/gstrtpL16parse.c @@ -170,11 +170,11 @@ gst_rtpL16parse_ntohs (GstBuffer *buf) void gst_rtpL16_caps_nego (GstRtpL16Parse *rtpL16parse) { - GstCaps2 *caps; + GstCaps *caps; - caps = gst_caps2_copy(gst_static_caps2_get (&gst_rtpL16parse_src_template.static_caps)); + caps = gst_caps_copy(gst_static_caps_get (&gst_rtpL16parse_src_template.static_caps)); - gst_caps2_set_simple (caps, + gst_caps_set_simple (caps, "rate", G_TYPE_INT, rtpL16parse->frequency, "channel", G_TYPE_INT, rtpL16parse->channels, NULL); diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c index 543b32b57..45d6a95ab 100644 --- a/gst/rtp/gstrtpL16pay.c +++ b/gst/rtp/gstrtpL16pay.c @@ -75,7 +75,7 @@ static void gst_rtpL16enc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpL16enc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstPadLinkReturn gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps2 * caps); +static GstPadLinkReturn gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps * caps); static GstElementStateReturn gst_rtpL16enc_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -154,7 +154,7 @@ gst_rtpL16enc_init (GstRtpL16Enc * rtpL16enc) } static GstPadLinkReturn -gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps * caps) { GstRtpL16Enc *rtpL16enc; GstStructure *structure; @@ -162,7 +162,7 @@ gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps2 * caps) rtpL16enc = GST_RTP_L16_ENC (gst_pad_get_parent (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "rate", &rtpL16enc->frequency); ret &= gst_structure_get_int (structure, "channels", &rtpL16enc->channels); diff --git a/gst/rtp/gstrtpgsmdepay.c b/gst/rtp/gstrtpgsmdepay.c index 967574a66..8f1b301ab 100644 --- a/gst/rtp/gstrtpgsmdepay.c +++ b/gst/rtp/gstrtpgsmdepay.c @@ -160,9 +160,9 @@ gst_rtpgsmparse_ntohs (GstBuffer *buf) void gst_rtpgsm_caps_nego (GstRtpGSMParse *rtpgsmparse) { - GstCaps2 *caps; + GstCaps *caps; - caps = gst_caps2_new_simple ("audio/x-gsm", + caps = gst_caps_new_simple ("audio/x-gsm", "rate", G_TYPE_INT, rtpgsmparse->frequency); gst_pad_try_set_caps (rtpgsmparse->srcpad, caps); diff --git a/gst/rtp/gstrtpgsmenc.c b/gst/rtp/gstrtpgsmenc.c index dcef57419..495e43673 100644 --- a/gst/rtp/gstrtpgsmenc.c +++ b/gst/rtp/gstrtpgsmenc.c @@ -72,7 +72,7 @@ static void gst_rtpgsmenc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpgsmenc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstPadLinkReturn gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps2 * caps); +static GstPadLinkReturn gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps * caps); static GstElementStateReturn gst_rtpgsmenc_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -150,7 +150,7 @@ gst_rtpgsmenc_init (GstRtpGSMEnc * rtpgsmenc) } static GstPadLinkReturn -gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps * caps) { GstRtpGSMEnc *rtpgsmenc; GstStructure *structure; @@ -158,7 +158,7 @@ gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps2 * caps) rtpgsmenc = GST_RTP_GSM_ENC (gst_pad_get_parent (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "rate", &rtpgsmenc->frequency); if (!ret) return GST_PAD_LINK_REFUSED; diff --git a/gst/rtp/gstrtpgsmparse.c b/gst/rtp/gstrtpgsmparse.c index 967574a66..8f1b301ab 100644 --- a/gst/rtp/gstrtpgsmparse.c +++ b/gst/rtp/gstrtpgsmparse.c @@ -160,9 +160,9 @@ gst_rtpgsmparse_ntohs (GstBuffer *buf) void gst_rtpgsm_caps_nego (GstRtpGSMParse *rtpgsmparse) { - GstCaps2 *caps; + GstCaps *caps; - caps = gst_caps2_new_simple ("audio/x-gsm", + caps = gst_caps_new_simple ("audio/x-gsm", "rate", G_TYPE_INT, rtpgsmparse->frequency); gst_pad_try_set_caps (rtpgsmparse->srcpad, caps); diff --git a/gst/rtp/gstrtpgsmpay.c b/gst/rtp/gstrtpgsmpay.c index dcef57419..495e43673 100644 --- a/gst/rtp/gstrtpgsmpay.c +++ b/gst/rtp/gstrtpgsmpay.c @@ -72,7 +72,7 @@ static void gst_rtpgsmenc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpgsmenc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstPadLinkReturn gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps2 * caps); +static GstPadLinkReturn gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps * caps); static GstElementStateReturn gst_rtpgsmenc_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -150,7 +150,7 @@ gst_rtpgsmenc_init (GstRtpGSMEnc * rtpgsmenc) } static GstPadLinkReturn -gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps2 * caps) +gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps * caps) { GstRtpGSMEnc *rtpgsmenc; GstStructure *structure; @@ -158,7 +158,7 @@ gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps2 * caps) rtpgsmenc = GST_RTP_GSM_ENC (gst_pad_get_parent (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "rate", &rtpgsmenc->frequency); if (!ret) return GST_PAD_LINK_REFUSED; diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c index ebd5d3f12..fffc4caa4 100644 --- a/gst/smpte/gstsmpte.c +++ b/gst/smpte/gstsmpte.c @@ -230,7 +230,7 @@ gst_smpte_update_mask (GstSMPTE *smpte, gint type, gint depth, gint width, gint } static gboolean -gst_smpte_sinkconnect (GstPad *pad, const GstCaps2 *caps) +gst_smpte_sinkconnect (GstPad *pad, const GstCaps *caps) { GstSMPTE *smpte; GstStructure *structure; @@ -238,7 +238,7 @@ gst_smpte_sinkconnect (GstPad *pad, const GstCaps2 *caps) smpte = GST_SMPTE (gst_pad_get_parent (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "width", &smpte->width); ret &= gst_structure_get_int (structure, "height", &smpte->height); @@ -362,10 +362,10 @@ gst_smpte_loop (GstElement *element) outbuf = gst_buffer_new_and_alloc (smpte->width * smpte->height * 3); if (!GST_PAD_CAPS (smpte->srcpad)) { - GstCaps2 *caps; - caps = gst_caps2_copy (gst_static_caps2_get ( + GstCaps *caps; + caps = gst_caps_copy (gst_static_caps_get ( &gst_smpte_src_template.static_caps)); - gst_caps2_set_simple (caps, + gst_caps_set_simple (caps, "width", G_TYPE_INT, smpte->width, "height", G_TYPE_INT, smpte->height, "framerate", G_TYPE_DOUBLE, smpte->fps, NULL); diff --git a/gst/udp/gstudpsink.c b/gst/udp/gstudpsink.c index b25d44266..4773d2919 100644 --- a/gst/udp/gstudpsink.c +++ b/gst/udp/gstudpsink.c @@ -150,7 +150,7 @@ gst_udpsink_class_init (GstUDPSink *klass) static GstPadLinkReturn -gst_udpsink_sink_link (GstPad *pad, const GstCaps2 *caps) +gst_udpsink_sink_link (GstPad *pad, const GstCaps *caps) { GstUDPSink *udpsink; struct sockaddr_in serv_addr; @@ -182,7 +182,7 @@ gst_udpsink_sink_link (GstPad *pad, const GstCaps2 *caps) doc = xmlNewDoc ("1.0"); doc->xmlRootNode = xmlNewDocNode (doc, NULL, "NewCaps", NULL); - gst_caps2_save_thyself (caps, doc->xmlRootNode); + gst_caps_save_thyself (caps, doc->xmlRootNode); switch (udpsink->control) { case CONTROL_UDP: diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index f8fa1eb2f..ce6362ec9 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -203,7 +203,7 @@ gst_udpsrc_get (GstPad *pad) int fdread; struct sockaddr addr; xmlDocPtr doc; - GstCaps2 *caps; + GstCaps *caps; buf = g_malloc (1024*10); @@ -233,7 +233,7 @@ gst_udpsrc_get (GstPad *pad) buf[ret] = '\0'; doc = xmlParseMemory(buf, ret); - caps = gst_caps2_load_thyself(doc->xmlRootNode); + caps = gst_caps_load_thyself(doc->xmlRootNode); /* foward the connect, we don't signal back the result here... */ gst_pad_proxy_link (udpsrc->srcpad, caps); diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c index b8bece149..ab975a238 100644 --- a/gst/videocrop/gstvideocrop.c +++ b/gst/videocrop/gstvideocrop.c @@ -107,7 +107,7 @@ static void gst_video_crop_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static GstPadLinkReturn - gst_video_crop_sink_link (GstPad *pad, const GstCaps2 *caps); + gst_video_crop_sink_link (GstPad *pad, const GstCaps *caps); static void gst_video_crop_chain (GstPad *pad, GstData *_data); static GstElementStateReturn @@ -262,14 +262,14 @@ gst_video_crop_get_property (GObject *object, guint prop_id, GValue *value, GPar } static GstPadLinkReturn -gst_video_crop_sink_link (GstPad *pad, const GstCaps2 *caps) +gst_video_crop_sink_link (GstPad *pad, const GstCaps *caps) { GstVideoCrop *video_crop; GstStructure *structure; gboolean ret; video_crop = GST_VIDEO_CROP (gst_pad_get_parent (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "width", &video_crop->width); ret &= gst_structure_get_int (structure, "height", &video_crop->height); diff --git a/gst/videofilter/gstvideofilter.c b/gst/videofilter/gstvideofilter.c index 4597f5ed5..86ab15a0f 100644 --- a/gst/videofilter/gstvideofilter.c +++ b/gst/videofilter/gstvideofilter.c @@ -47,7 +47,7 @@ static void gst_videofilter_set_property (GObject *object, guint prop_id, const static void gst_videofilter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gst_videofilter_chain (GstPad *pad, GstData *_data); -GstCaps2 * gst_videofilter_class_get_capslist(GstVideofilterClass *klass); +GstCaps * gst_videofilter_class_get_capslist(GstVideofilterClass *klass); static void gst_videofilter_setup(GstVideofilter *videofilter); static GstElementClass *parent_class = NULL; @@ -139,28 +139,28 @@ static GstStructure *gst_videofilter_format_get_structure(GstVideofilterFormat * return structure; } -GstCaps2 * gst_videofilter_class_get_capslist(GstVideofilterClass *klass) +GstCaps * gst_videofilter_class_get_capslist(GstVideofilterClass *klass) { - GstCaps2 *caps; + GstCaps *caps; GstStructure *structure; int i; - caps = gst_caps2_new_empty(); + caps = gst_caps_new_empty(); for(i=0;i<klass->formats->len;i++){ structure = gst_videofilter_format_get_structure(g_ptr_array_index(klass->formats,i)); - gst_caps2_append_cap (caps, structure); + gst_caps_append_structure (caps, structure); } return caps; } -static GstCaps2 * +static GstCaps * gst_videofilter_sink_getcaps (GstPad *pad) { GstVideofilter *videofilter; GstVideofilterClass *klass; - GstCaps2 *caps; - GstCaps2 *peercaps; + GstCaps *caps; + GstCaps *peercaps; int i; GST_DEBUG("gst_videofilter_sink_getcaps"); @@ -176,29 +176,29 @@ gst_videofilter_sink_getcaps (GstPad *pad) /* Look through our list of caps and find those that match with * the peer's formats. Create a list of them. */ /* FIXME optimize if peercaps == NULL */ - caps = gst_caps2_new_empty (); + caps = gst_caps_new_empty (); for(i=0;i<klass->formats->len;i++){ - GstCaps2 *icaps; - GstCaps2 *fromcaps; + GstCaps *icaps; + GstCaps *fromcaps; - fromcaps = gst_caps2_new_full (gst_videofilter_format_get_structure ( + fromcaps = gst_caps_new_full (gst_videofilter_format_get_structure ( g_ptr_array_index (klass->formats,i))); - icaps = gst_caps2_intersect (fromcaps, peercaps); + icaps = gst_caps_intersect (fromcaps, peercaps); if(icaps != NULL){ - gst_caps2_append (caps, fromcaps); + gst_caps_append (caps, fromcaps); } else { - gst_caps2_free (fromcaps); + gst_caps_free (fromcaps); } - if(icaps) gst_caps2_free (icaps); + if(icaps) gst_caps_free (icaps); } - gst_caps2_free (peercaps); + gst_caps_free (peercaps); return caps; } static GstPadLinkReturn -gst_videofilter_src_link (GstPad *pad, const GstCaps2 *caps) +gst_videofilter_src_link (GstPad *pad, const GstCaps *caps) { GstVideofilter *videofilter; GstStructure *structure; @@ -207,7 +207,7 @@ gst_videofilter_src_link (GstPad *pad, const GstCaps2 *caps) GST_DEBUG("gst_videofilter_src_link"); videofilter = GST_VIDEOFILTER (gst_pad_get_parent (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); videofilter->format = gst_videofilter_find_format_by_caps (videofilter,caps); g_return_val_if_fail(videofilter->format, GST_PAD_LINK_REFUSED); @@ -226,7 +226,7 @@ gst_videofilter_src_link (GstPad *pad, const GstCaps2 *caps) } static GstPadLinkReturn -gst_videofilter_sink_link (GstPad *pad, const GstCaps2 *caps) +gst_videofilter_sink_link (GstPad *pad, const GstCaps *caps) { GstVideofilter *videofilter; GstPadLinkReturn ret; @@ -235,7 +235,7 @@ gst_videofilter_sink_link (GstPad *pad, const GstCaps2 *caps) GST_DEBUG("gst_videofilter_sink_link"); videofilter = GST_VIDEOFILTER (gst_pad_get_parent (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); videofilter->format = gst_videofilter_find_format_by_caps (videofilter,caps); g_return_val_if_fail(videofilter->format, GST_PAD_LINK_REFUSED); @@ -391,7 +391,7 @@ void gst_videofilter_set_output_size(GstVideofilter *videofilter, int width, int height) { int ret; - GstCaps2 *srccaps; + GstCaps *srccaps; GstStructure *structure; g_return_if_fail(GST_IS_VIDEOFILTER(videofilter)); @@ -402,8 +402,8 @@ void gst_videofilter_set_output_size(GstVideofilter *videofilter, videofilter->to_buf_size = (videofilter->to_width * videofilter->to_height * videofilter->format->depth)/8; - srccaps = gst_caps2_copy(gst_pad_get_caps(videofilter->srcpad)); - structure = gst_caps2_get_nth_cap (srccaps, 0); + srccaps = gst_caps_copy(gst_pad_get_caps(videofilter->srcpad)); + structure = gst_caps_get_structure (srccaps, 0); gst_structure_set (structure, "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, NULL); @@ -447,7 +447,7 @@ static void gst_videofilter_setup(GstVideofilter *videofilter) } GstVideofilterFormat *gst_videofilter_find_format_by_caps(GstVideofilter *videofilter, - const GstCaps2 *caps) + const GstCaps *caps) { int i; GstVideofilterClass *klass; @@ -464,10 +464,10 @@ GstVideofilterFormat *gst_videofilter_find_format_by_caps(GstVideofilter *videof structure = gst_videofilter_format_get_structure(format); if(structure){ - GstCaps2 *format_caps; - format_caps = gst_caps2_new_full (structure, NULL); - ret = gst_caps2_is_always_compatible (caps, format_caps); - gst_caps2_free (format_caps); + GstCaps *format_caps; + format_caps = gst_caps_new_full (structure, NULL); + ret = gst_caps_is_always_compatible (caps, format_caps); + gst_caps_free (format_caps); if (ret) return format; } diff --git a/gst/videofilter/gstvideofilter.h b/gst/videofilter/gstvideofilter.h index f8443d9e4..9ec7593e5 100644 --- a/gst/videofilter/gstvideofilter.h +++ b/gst/videofilter/gstvideofilter.h @@ -95,8 +95,8 @@ int gst_videofilter_get_input_height(GstVideofilter *videofilter); void gst_videofilter_set_output_size(GstVideofilter *videofilter, int width, int height); GstVideofilterFormat *gst_videofilter_find_format_by_caps(GstVideofilter *filter, - const GstCaps2 *caps); -GstCaps2 *gst_videofilter_class_get_capslist(GstVideofilterClass *videofilterclass); + const GstCaps *caps); +GstCaps *gst_videofilter_class_get_capslist(GstVideofilterClass *videofilterclass); void gst_videofilter_class_add_format(GstVideofilterClass *videofilterclass, GstVideofilterFormat *format); diff --git a/gst/videoflip/gstvideoflip.c b/gst/videoflip/gstvideoflip.c index 43d03b130..0f20f47b9 100644 --- a/gst/videoflip/gstvideoflip.c +++ b/gst/videoflip/gstvideoflip.c @@ -55,7 +55,7 @@ static void gst_videoflip_set_property (GObject *object, guint prop_id, const G static void gst_videoflip_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gst_videoflip_chain (GstPad *pad, GstData *_data); -static GstCaps2 * gst_videoflip_get_capslist(void); +static GstCaps * gst_videoflip_get_capslist(void); static GstElementClass *parent_class = NULL; @@ -88,12 +88,12 @@ static GstPadTemplate * gst_videoflip_src_template_factory(void) { /* well, actually RGB too, but since there's no RGB format anyway */ - GstCaps2 *caps = gst_caps2_from_string ("video/x-raw-yuv, " + GstCaps *caps = gst_caps_from_string ("video/x-raw-yuv, " "width = (int) [ 0, MAX ], " "height = (int) [ 0, MAX ], " "framerate = (double) [ 0, MAX ]"); - caps = gst_caps2_intersect(caps, gst_videoflip_get_capslist ()); + caps = gst_caps_intersect(caps, gst_videoflip_get_capslist ()); return gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, caps); } @@ -101,12 +101,12 @@ gst_videoflip_src_template_factory(void) static GstPadTemplate * gst_videoflip_sink_template_factory(void) { - GstCaps2 *caps = gst_caps2_from_string ("video/x-raw-yuv, " + GstCaps *caps = gst_caps_from_string ("video/x-raw-yuv, " "width = (int) [ 0, MAX ], " "height = (int) [ 0, MAX ], " "framerate = (double) [ 0, MAX ]"); - caps = gst_caps2_intersect(caps, gst_videoflip_get_capslist ()); + caps = gst_caps_intersect(caps, gst_videoflip_get_capslist ()); return gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps); } @@ -166,30 +166,30 @@ gst_videoflip_class_init (GstVideoflipClass *klass) } -static GstCaps2 * +static GstCaps * gst_videoflip_get_capslist(void) { - GstCaps2 *caps; + GstCaps *caps; GstStructure *structure; int i; - caps = gst_caps2_new_empty (); + caps = gst_caps_new_empty (); for(i=0;i<videoflip_n_formats;i++){ structure = videoflip_get_cap (videoflip_formats + i); - gst_caps2_append_cap (caps, structure); + gst_caps_append_structure (caps, structure); } return caps; } -static GstCaps2 * +static GstCaps * gst_videoflip_sink_getcaps (GstPad *pad) { GstVideoflip *videoflip; - GstCaps2 *capslist = NULL; - GstCaps2 *peercaps; - GstCaps2 *sizecaps; - GstCaps2 *caps; + GstCaps *capslist = NULL; + GstCaps *peercaps; + GstCaps *sizecaps; + GstCaps *caps; int i; GST_DEBUG ("gst_videoflip_sink_getcaps"); @@ -207,28 +207,28 @@ gst_videoflip_sink_getcaps (GstPad *pad) /* Look through our list of caps and find those that match with * the peer's formats. Create a list of them. */ for(i=0;i<videoflip_n_formats;i++){ - GstCaps2 *fromcaps = gst_caps2_new_full(videoflip_get_cap( + GstCaps *fromcaps = gst_caps_new_full(videoflip_get_cap( videoflip_formats + i), NULL); - if(gst_caps2_is_always_compatible(fromcaps, peercaps)){ - gst_caps2_append(capslist, fromcaps); + if(gst_caps_is_always_compatible(fromcaps, peercaps)){ + gst_caps_append(capslist, fromcaps); } } - gst_caps2_free (peercaps); + gst_caps_free (peercaps); - sizecaps = gst_caps2_from_string ("video/x-raw-yuv, " + sizecaps = gst_caps_from_string ("video/x-raw-yuv, " "width = (int) [ 0, MAX ], " "height = (int) [ 0, MAX ], " "framerate = (double) [ 0, MAX ]"); - caps = gst_caps2_intersect(capslist, sizecaps); - gst_caps2_free (sizecaps); + caps = gst_caps_intersect(capslist, sizecaps); + gst_caps_free (sizecaps); return caps; } static GstPadLinkReturn -gst_videoflip_src_link (GstPad *pad, const GstCaps2 *caps) +gst_videoflip_src_link (GstPad *pad, const GstCaps *caps) { GstVideoflip *videoflip; GstStructure *structure; @@ -237,7 +237,7 @@ gst_videoflip_src_link (GstPad *pad, const GstCaps2 *caps) GST_DEBUG ("gst_videoflip_src_link"); videoflip = GST_VIDEOFLIP (gst_pad_get_parent (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); videoflip->format = videoflip_find_by_caps (caps); g_return_val_if_fail(videoflip->format, GST_PAD_LINK_REFUSED); @@ -251,7 +251,7 @@ gst_videoflip_src_link (GstPad *pad, const GstCaps2 *caps) } static GstPadLinkReturn -gst_videoflip_sink_link (GstPad *pad, const GstCaps2 *caps) +gst_videoflip_sink_link (GstPad *pad, const GstCaps *caps) { GstVideoflip *videoflip; GstStructure *structure; @@ -260,7 +260,7 @@ gst_videoflip_sink_link (GstPad *pad, const GstCaps2 *caps) GST_DEBUG ("gst_videoflip_sink_link"); videoflip = GST_VIDEOFLIP (gst_pad_get_parent (pad)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); videoflip->format = videoflip_find_by_caps (caps); g_return_val_if_fail(videoflip->format, GST_PAD_LINK_REFUSED); diff --git a/gst/videoflip/videoflip.c b/gst/videoflip/videoflip.c index f162bc777..7956165da 100644 --- a/gst/videoflip/videoflip.c +++ b/gst/videoflip/videoflip.c @@ -71,7 +71,7 @@ videoflip_get_cap(struct videoflip_format_struct *format) } struct videoflip_format_struct * -videoflip_find_by_caps(const GstCaps2 *caps) +videoflip_find_by_caps(const GstCaps *caps) { int i; @@ -80,15 +80,15 @@ videoflip_find_by_caps(const GstCaps2 *caps) g_return_val_if_fail(caps != NULL, NULL); for (i = 0; i < videoflip_n_formats; i++){ - GstCaps2 *c; + GstCaps *c; - c = gst_caps2_new_full (videoflip_get_cap (videoflip_formats + i), NULL); + c = gst_caps_new_full (videoflip_get_cap (videoflip_formats + i), NULL); if(c){ - if(gst_caps2_is_always_compatible(caps, c)){ - gst_caps2_free(c); + if(gst_caps_is_always_compatible(caps, c)){ + gst_caps_free(c); return videoflip_formats + i; } - gst_caps2_free(c); + gst_caps_free(c); } } diff --git a/gst/videoflip/videoflip.h b/gst/videoflip/videoflip.h index 6d76b084b..e912fe986 100644 --- a/gst/videoflip/videoflip.h +++ b/gst/videoflip/videoflip.h @@ -39,7 +39,7 @@ extern int videoflip_n_formats; GstStructure *videoflip_get_cap(struct videoflip_format_struct *format); -struct videoflip_format_struct *videoflip_find_by_caps(const GstCaps2 *caps); +struct videoflip_format_struct *videoflip_find_by_caps(const GstCaps *caps); #endif diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c index 9b6515a15..769c95ea5 100644 --- a/gst/wavenc/gstwavenc.c +++ b/gst/wavenc/gstwavenc.c @@ -241,14 +241,14 @@ gst_wavenc_setup (GstWavEnc *wavenc) } static GstPadLinkReturn -gst_wavenc_sinkconnect (GstPad *pad, const GstCaps2 *caps) +gst_wavenc_sinkconnect (GstPad *pad, const GstCaps *caps) { GstWavEnc *wavenc; GstStructure *structure; wavenc = GST_WAVENC (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", &wavenc->channels); gst_structure_get_int (structure, "rate", &wavenc->rate); @@ -409,7 +409,7 @@ write_cues (GstWavEnc *wavenc) point_string = g_string_sized_new (CUEPOINT_SIZE); for (c = cue_list, num_cues = 0; c; c = c->next, num_cues++) { - GstCaps2 *cue_caps = c->data; + GstCaps *cue_caps = c->data; guint32 pos; gst_props_get (cue_caps->properties, "position", &pos, NULL); @@ -456,7 +456,7 @@ write_labels (GstWavEnc *wavenc) int i; for (p = caps, i = 1; p; p = p->next, i++) { - GstCaps2 *ltxt_caps = p->data; + GstCaps *ltxt_caps = p->data; GString *ltxt; char *label = NULL; int len, req, j; @@ -498,7 +498,7 @@ write_labels (GstWavEnc *wavenc) int i; for (p = caps, i = 1; p; p = p->next, i++) { - GstCaps2 *labl_caps = p->data; + GstCaps *labl_caps = p->data; GString *labl; char *label = NULL; int len, req, j; @@ -534,7 +534,7 @@ write_labels (GstWavEnc *wavenc) int i; for (p = caps, i = 1; p; p = p->next, i++) { - GstCaps2 *note_caps = p->data; + GstCaps *note_caps = p->data; GString *note; char *label = NULL; int len, req, j; diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index aa66fb083..4de89bb35 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -73,7 +73,7 @@ GST_STATIC_PAD_TEMPLATE ( "wavparse_src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS2_ANY + GST_STATIC_CAPS_ANY ); #if 0 GST_STATIC_CAPS ( @@ -241,7 +241,7 @@ gst_wavparse_parse_adtl (GstWavParse *wavparse, char *label_name; GstProps *props; GstPropsEntry *entry; - GstCaps2 *new_caps; + GstCaps *new_caps; GList *caps = NULL; props = wavparse->metadata->properties; @@ -570,7 +570,7 @@ gst_wavparse_parse_cues (GstWavParse *wavparse, points = (struct _gst_riff_cuepoints *) tempdata; for (i = 0; i < cue.cuepoints; i++) { - GstCaps2 *caps; + GstCaps *caps; caps = gst_caps_new ("cues", "application/x-gst-metadata", @@ -592,7 +592,7 @@ static void gst_wavparse_parse_fmt (GstWavParse *wavparse) { GstWavParseFormat *format; - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; guint8 *fmtdata; GstByteStream *bs = wavparse->bs; guint32 got_bytes; diff --git a/sys/oss/gstosselement.c b/sys/oss/gstosselement.c index 12e961fab..ea5860a84 100644 --- a/sys/oss/gstosselement.c +++ b/sys/oss/gstosselement.c @@ -486,12 +486,12 @@ gst_ossformat_get (gint law, gint endianness, gboolean sign, gint width, gint de } gboolean -gst_osselement_parse_caps (GstOssElement *oss, const GstCaps2 *caps) +gst_osselement_parse_caps (GstOssElement *oss, const GstCaps *caps) { gint bps, format; GstStructure *structure; - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); gst_structure_get_int (structure, "width", &oss->width); gst_structure_get_int (structure, "depth", &oss->depth); @@ -531,12 +531,12 @@ G_STMT_START { \ } G_STMT_END gboolean -gst_osselement_merge_fixed_caps (GstOssElement *oss, GstCaps2 *caps) +gst_osselement_merge_fixed_caps (GstOssElement *oss, GstCaps *caps) { gint bps, format; GstStructure *structure; - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); /* peel off fixed stuff from the caps */ gst_structure_get_int (structure, "law", &oss->law); diff --git a/sys/oss/gstosselement.h b/sys/oss/gstosselement.h index ac570470d..e14765b98 100644 --- a/sys/oss/gstosselement.h +++ b/sys/oss/gstosselement.h @@ -101,9 +101,9 @@ GType gst_osselement_get_type (void); /* some useful functions */ gboolean gst_osselement_parse_caps (GstOssElement *oss, - const GstCaps2 *caps); + const GstCaps *caps); gboolean gst_osselement_merge_fixed_caps (GstOssElement *oss, - GstCaps2 *caps); + GstCaps *caps); gboolean gst_osselement_sync_parms (GstOssElement *oss); void gst_osselement_reset (GstOssElement *oss); diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c index bc7acfeae..b1402b295 100644 --- a/sys/oss/gstosssink.c +++ b/sys/oss/gstosssink.c @@ -58,7 +58,7 @@ static gboolean gst_osssink_query (GstElement *element, GstQueryType type, static gboolean gst_osssink_sink_query (GstPad *pad, GstQueryType type, GstFormat *format, gint64 *value); -static GstPadLinkReturn gst_osssink_sinkconnect (GstPad *pad, const GstCaps2 *caps); +static GstPadLinkReturn gst_osssink_sinkconnect (GstPad *pad, const GstCaps *caps); static void gst_osssink_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); @@ -215,7 +215,7 @@ gst_osssink_init (GstOssSink *osssink) static GstPadLinkReturn -gst_osssink_sinkconnect (GstPad *pad, const GstCaps2 *caps) +gst_osssink_sinkconnect (GstPad *pad, const GstCaps *caps) { GstOssSink *osssink = GST_OSSSINK (gst_pad_get_parent (pad)); diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c index 86c680988..1edba80f6 100644 --- a/sys/oss/gstosssrc.c +++ b/sys/oss/gstosssrc.c @@ -77,7 +77,7 @@ static void gst_osssrc_class_init (GstOssSrcClass *klass); static void gst_osssrc_init (GstOssSrc *osssrc); static void gst_osssrc_dispose (GObject *object); -static GstPadLinkReturn gst_osssrc_srcconnect (GstPad *pad, const GstCaps2 *caps); +static GstPadLinkReturn gst_osssrc_srcconnect (GstPad *pad, const GstCaps *caps); static const GstFormat* gst_osssrc_get_formats (GstPad *pad); static gboolean gst_osssrc_convert (GstPad *pad, GstFormat src_format, gint64 src_value, @@ -202,7 +202,7 @@ gst_osssrc_dispose (GObject *object) } static GstPadLinkReturn -gst_osssrc_srcconnect (GstPad *pad, const GstCaps2 *caps) +gst_osssrc_srcconnect (GstPad *pad, const GstCaps *caps) { GstOssSrc *src; @@ -221,7 +221,7 @@ static gboolean gst_osssrc_negotiate (GstPad *pad) { GstOssSrc *src; - GstCaps2 *allowed; + GstCaps *allowed; src = GST_OSSSRC(gst_pad_get_parent (pad)); @@ -235,7 +235,7 @@ gst_osssrc_negotiate (GstPad *pad) /* set caps on src pad */ if (gst_pad_try_set_caps (src->srcpad, - gst_caps2_new_simple("audio/x-raw-int", + gst_caps_new_simple("audio/x-raw-int", "endianness", G_TYPE_INT, GST_OSSELEMENT (src)->endianness, "signed", G_TYPE_BOOLEAN, GST_OSSELEMENT (src)->sign, "width", G_TYPE_INT, GST_OSSELEMENT (src)->width, diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 35da20782..c560e00e6 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -70,8 +70,8 @@ static gboolean gst_v4l2src_srcconvert (GstPad *pad, GstFormat *dest_format, gint64 *dest_value); static GstPadLinkReturn gst_v4l2src_srcconnect (GstPad *pad, - const GstCaps2 *caps); -static GstCaps2 * gst_v4l2src_getcaps (GstPad *pad); + const GstCaps *caps); +static GstCaps * gst_v4l2src_getcaps (GstPad *pad); static GstData * gst_v4l2src_get (GstPad *pad); /* get/set params */ @@ -644,7 +644,7 @@ gst_v4l2_caps_to_v4l2fourcc (GstV4l2Src *v4l2src, static GstPadLinkReturn gst_v4l2src_srcconnect (GstPad *pad, - const GstCaps2 *vscapslist) + const GstCaps *vscapslist) { GstV4l2Src *v4l2src; GstV4l2Element *v4l2element; @@ -655,7 +655,7 @@ gst_v4l2src_srcconnect (GstPad *pad, v4l2src = GST_V4L2SRC(gst_pad_get_parent (pad)); v4l2element = GST_V4L2ELEMENT(v4l2src); - structure = gst_caps2_get_nth_cap (vscapslist, 0); + structure = gst_caps_get_structure (vscapslist, 0); /* clean up if we still haven't cleaned up our previous * capture session */ @@ -685,11 +685,11 @@ gst_v4l2src_srcconnect (GstPad *pad, } -static GstCaps2 * +static GstCaps * gst_v4l2src_getcaps (GstPad *pad) { GstV4l2Src *v4l2src = GST_V4L2SRC(gst_pad_get_parent (pad)); - GstCaps2 *caps; + GstCaps *caps; gint i; struct v4l2_fmtdesc *format; int min_w, max_w, min_h, max_h; @@ -699,7 +699,7 @@ gst_v4l2src_getcaps (GstPad *pad) } /* build our own capslist */ - caps = gst_caps2_new_empty(); + caps = gst_caps_new_empty(); for (i=0;i<g_list_length(v4l2src->formats);i++) { GstStructure *structure; @@ -722,7 +722,7 @@ gst_v4l2src_getcaps (GstPad *pad) "framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE, NULL); - gst_caps2_append_cap (caps, structure); + gst_caps_append_structure (caps, structure); } return caps; |