From fcf64e926b1c9ce2ea3d95da68ebd71930ed73e5 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 21 Dec 2003 23:24:26 +0000 Subject: Global change from "caps2" to "caps" Original commit message from CVS: Global change from "caps2" to "caps" --- ext/ffmpeg/gstffmpegcodecmap.c | 108 +++++++++++++++++++-------------------- ext/ffmpeg/gstffmpegcodecmap.h | 10 ++-- ext/ffmpeg/gstffmpegcolorspace.c | 24 ++++----- ext/ffmpeg/gstffmpegdec.c | 10 ++-- ext/ffmpeg/gstffmpegdemux.c | 18 +++---- ext/ffmpeg/gstffmpegenc.c | 10 ++-- ext/ffmpeg/gstffmpegmux.c | 16 +++--- 7 files changed, 98 insertions(+), 98 deletions(-) diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c index 9969194..b344142 100644 --- a/ext/ffmpeg/gstffmpegcodecmap.c +++ b/ext/ffmpeg/gstffmpegcodecmap.c @@ -38,14 +38,14 @@ #define GST_FF_VID_CAPS_NEW(mimetype, props...) \ (context != NULL) ? \ - gst_caps2_new_simple (mimetype, \ + gst_caps_new_simple (mimetype, \ "width", G_TYPE_INT, context->width, \ "height", G_TYPE_INT, context->height, \ "framerate", G_TYPE_DOUBLE, 1. * context->frame_rate / \ context->frame_rate_base, \ ##props, NULL) \ : \ - gst_caps2_new_simple (mimetype, \ + gst_caps_new_simple (mimetype, \ "width", GST_TYPE_INT_RANGE, 16, 4096, \ "height", GST_TYPE_INT_RANGE, 16, 4096, \ "framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE, \ @@ -56,12 +56,12 @@ #define GST_FF_AUD_CAPS_NEW(mimetype, props...) \ (context != NULL) ? \ - gst_caps2_new_simple (mimetype, \ + gst_caps_new_simple (mimetype, \ "rate", G_TYPE_INT, context->sample_rate, \ "channels", G_TYPE_INT, context->channels, \ ##props, NULL) \ : \ - gst_caps2_new_simple (mimetype, \ + gst_caps_new_simple (mimetype, \ ##props, NULL) /* Convert a FFMPEG codec ID and optional AVCodecContext @@ -71,16 +71,16 @@ * CodecID is primarily meant for compressed data GstCaps! */ -GstCaps2 * +GstCaps * gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, AVCodecContext *context) { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; switch (codec_id) { case CODEC_ID_MPEG1VIDEO: /* this caps doesn't need width/height/framerate */ - caps = gst_caps2_new_simple ("video/mpeg", + caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, 1, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); @@ -132,13 +132,13 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, "mpegversion", G_TYPE_INT, 4, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); - gst_caps2_append(caps, + gst_caps_append(caps, GST_FF_VID_CAPS_NEW ("video/x-divx", "divxversion", GST_TYPE_INT_RANGE, 4, 5, NULL)); - gst_caps2_append(caps, + gst_caps_append(caps, GST_FF_VID_CAPS_NEW ("video/x-xvid")); - gst_caps2_append(caps, + gst_caps_append(caps, GST_FF_VID_CAPS_NEW ("video/x-3ivx")); break; @@ -163,7 +163,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, caps = GST_FF_VID_CAPS_NEW ("video/x-msmpeg", "msmpegversion", G_TYPE_INT, 43, NULL); - gst_caps2_append(caps, + gst_caps_append(caps, GST_FF_VID_CAPS_NEW ("video/x-divx", "divxversion", G_TYPE_INT, 3, NULL)); @@ -253,7 +253,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_VP3: caps = GST_FF_VID_CAPS_NEW ("video/x-vp3"); - gst_caps2_append(caps, + gst_caps_append(caps, GST_FF_VID_CAPS_NEW ("video/x-theora")); break; @@ -395,7 +395,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, } if (caps != NULL) { - char *str = gst_caps2_to_string (caps); + char *str = gst_caps_to_string (caps); GST_DEBUG ("caps for codec_id=%d: %s", codec_id, str); g_free(str); } else { @@ -412,11 +412,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, * See below for usefullness */ -static GstCaps2 * +static GstCaps * gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext *context) { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; int bpp = 0, depth = 0, endianness = 0; gulong g_mask = 0, r_mask = 0, b_mask = 0; @@ -491,7 +491,7 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, } if (caps != NULL) { - char *str = gst_caps2_to_string (caps); + char *str = gst_caps_to_string (caps); GST_DEBUG ("caps for pix_fmt=%d: %s", pix_fmt, str); g_free(str); } else { @@ -508,11 +508,11 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, * See below for usefullness */ -static GstCaps2 * +static GstCaps * gst_ffmpeg_smpfmt_to_caps (enum SampleFormat sample_fmt, AVCodecContext *context) { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; int bpp = 0; gboolean signedness = FALSE; @@ -538,7 +538,7 @@ gst_ffmpeg_smpfmt_to_caps (enum SampleFormat sample_fmt, } if (caps != NULL) { - char *str = gst_caps2_to_string (caps); + char *str = gst_caps_to_string (caps); GST_DEBUG ("caps for sample_fmt=%d: %s", sample_fmt, str); g_free(str); } else { @@ -555,25 +555,25 @@ gst_ffmpeg_smpfmt_to_caps (enum SampleFormat sample_fmt, * CodecType is primarily meant for uncompressed data GstCaps! */ -GstCaps2 * +GstCaps * gst_ffmpeg_codectype_to_caps (enum CodecType codec_type, AVCodecContext *context) { - GstCaps2 *caps; + GstCaps *caps; switch (codec_type) { case CODEC_TYPE_VIDEO: if (context) { caps = gst_ffmpeg_pixfmt_to_caps (context->pix_fmt, context); } else { - GstCaps2 *temp; + GstCaps *temp; enum PixelFormat i; - caps = gst_caps2_new_empty (); + caps = gst_caps_new_empty (); for (i = 0; i < PIX_FMT_NB; i++) { temp = gst_ffmpeg_pixfmt_to_caps (i, NULL); if (temp != NULL) { - gst_caps2_append (caps, temp); + gst_caps_append (caps, temp); } } } @@ -583,14 +583,14 @@ gst_ffmpeg_codectype_to_caps (enum CodecType codec_type, if (context) { caps = gst_ffmpeg_smpfmt_to_caps (context->sample_fmt, context); } else { - GstCaps2 *temp; + GstCaps *temp; enum SampleFormat i; - caps = gst_caps2_new_empty (); + caps = gst_caps_new_empty (); for (i = 0; i <= SAMPLE_FMT_S16; i++) { temp = gst_ffmpeg_smpfmt_to_caps (i, NULL); if (temp != NULL) { - gst_caps2_append (caps, temp); + gst_caps_append (caps, temp); } } } @@ -610,14 +610,14 @@ gst_ffmpeg_codectype_to_caps (enum CodecType codec_type, * when needed. */ static void -gst_ffmpeg_caps_to_extradata (const GstCaps2 *caps, +gst_ffmpeg_caps_to_extradata (const GstCaps *caps, AVCodecContext *context) { GstStructure *structure; const gchar *mimetype; - g_return_if_fail (gst_caps2_get_n_structures (caps) == 1); - structure = gst_caps2_get_nth_cap (caps, 0); + g_return_if_fail (gst_caps_get_size (caps) == 1); + structure = gst_caps_get_structure (caps, 0); mimetype = gst_structure_get_name (structure); @@ -670,15 +670,15 @@ gst_ffmpeg_caps_to_extradata (const GstCaps2 *caps, */ static void -gst_ffmpeg_caps_to_smpfmt (const GstCaps2 *caps, +gst_ffmpeg_caps_to_smpfmt (const GstCaps *caps, AVCodecContext *context) { GstStructure *structure; gint depth = 0, width = 0, endianness = 0; gboolean signedness = FALSE; - g_return_if_fail (gst_caps2_get_n_structures (caps) == 1); - structure = gst_caps2_get_nth_cap (caps, 0); + g_return_if_fail (gst_caps_get_size (caps) == 1); + structure = gst_caps_get_structure (caps, 0); if (gst_structure_get_int (structure, "width", &width) && gst_structure_get_int (structure, "depth", &depth) && @@ -706,14 +706,14 @@ gst_ffmpeg_caps_to_smpfmt (const GstCaps2 *caps, */ static void -gst_ffmpeg_caps_to_pixfmt (const GstCaps2 *caps, +gst_ffmpeg_caps_to_pixfmt (const GstCaps *caps, AVCodecContext *context) { GstStructure *structure; gdouble fps; - g_return_if_fail (gst_caps2_get_n_structures (caps) == 1); - structure = gst_caps2_get_nth_cap (caps, 0); + g_return_if_fail (gst_caps_get_size (caps) == 1); + structure = gst_caps_get_structure (caps, 0); gst_structure_get_int (structure, "width", &context->width); gst_structure_get_int (structure, "height", &context->height); @@ -796,7 +796,7 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps2 *caps, void gst_ffmpeg_caps_to_codectype (enum CodecType type, - const GstCaps2 *caps, + const GstCaps *caps, AVCodecContext *context) { if (context == NULL) @@ -827,47 +827,47 @@ gst_ffmpeg_caps_to_codectype (enum CodecType type, * media type anyway */ -GstCaps2 * +GstCaps * gst_ffmpeg_formatid_to_caps (const gchar *format_name) { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; if (!strcmp (format_name, "mpeg")) { - caps = gst_caps2_new_simple ("video/mpeg", + caps = gst_caps_new_simple ("video/mpeg", "systemstream", G_TYPE_BOOLEAN, TRUE, NULL); } else if (!strcmp (format_name, "mpegts")) { - caps = gst_caps2_new_simple ("video/mpegts", + caps = gst_caps_new_simple ("video/mpegts", "systemstream", G_TYPE_BOOLEAN, TRUE, NULL); } else if (!strcmp (format_name, "rm")) { - caps = gst_caps2_new_simple ("ffmpeg_rm", "audio/x-pn-realvideo", + caps = gst_caps_new_simple ("ffmpeg_rm", "audio/x-pn-realvideo", "systemstream", G_TYPE_BOOLEAN, TRUE, NULL); } else if (!strcmp (format_name, "asf")) { - caps = gst_caps2_new_simple ("video/x-ms-asf", + caps = gst_caps_new_simple ("video/x-ms-asf", NULL); } else if (!strcmp (format_name, "avi")) { - caps = gst_caps2_new_simple ("video/x-msvideo", + caps = gst_caps_new_simple ("video/x-msvideo", NULL); } else if (!strcmp (format_name, "wav")) { - caps = gst_caps2_new_simple ("video/x-wav", + caps = gst_caps_new_simple ("video/x-wav", NULL); } else if (!strcmp (format_name, "swf")) { - caps = gst_caps2_new_simple ("application/x-shockwave-flash", + caps = gst_caps_new_simple ("application/x-shockwave-flash", NULL); } else if (!strcmp (format_name, "au")) { - caps = gst_caps2_new_simple ("audio/x-au", + caps = gst_caps_new_simple ("audio/x-au", NULL); } else if (!strcmp (format_name, "mov")) { - caps = gst_caps2_new_simple ("video/quicktime", + caps = gst_caps_new_simple ("video/quicktime", NULL); } else if (!strcmp (format_name, "dv")) { - caps = gst_caps2_new_simple ("video/x-dv", + caps = gst_caps_new_simple ("video/x-dv", "systemstream", G_TYPE_BOOLEAN, TRUE, NULL); } else if (!strcmp (format_name, "4xm")) { - caps = gst_caps2_new_simple ("video/x-4xm", + caps = gst_caps_new_simple ("video/x-4xm", NULL); } else { /* unknown! */ @@ -884,7 +884,7 @@ gst_ffmpeg_formatid_to_caps (const gchar *format_name) */ enum CodecID -gst_ffmpeg_caps_to_codecid (const GstCaps2 *caps, +gst_ffmpeg_caps_to_codecid (const GstCaps *caps, AVCodecContext *context) { enum CodecID id = CODEC_ID_NONE; @@ -893,8 +893,8 @@ gst_ffmpeg_caps_to_codecid (const GstCaps2 *caps, gboolean video = FALSE, audio = FALSE; /* we want to be sure! */ g_return_val_if_fail (caps != NULL, CODEC_ID_NONE); - g_return_val_if_fail (gst_caps2_get_n_structures (caps) == 1, CODEC_ID_NONE); - structure = gst_caps2_get_nth_cap (caps, 0); + g_return_val_if_fail (gst_caps_get_size (caps) == 1, CODEC_ID_NONE); + structure = gst_caps_get_structure (caps, 0); mimetype = gst_structure_get_name (structure); @@ -1352,7 +1352,7 @@ gst_ffmpeg_caps_to_codecid (const GstCaps2 *caps, } if (id != CODEC_ID_NONE) { - char *str = gst_caps2_to_string (caps); + char *str = gst_caps_to_string (caps); GST_DEBUG ("The id=%d belongs to the caps %s", id, str); g_free(str); } diff --git a/ext/ffmpeg/gstffmpegcodecmap.h b/ext/ffmpeg/gstffmpegcodecmap.h index 5f587d4..f95c57f 100644 --- a/ext/ffmpeg/gstffmpegcodecmap.h +++ b/ext/ffmpeg/gstffmpegcodecmap.h @@ -31,7 +31,7 @@ * a certain CodecID for a pad with compressed data. */ -GstCaps2 * +GstCaps * gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, AVCodecContext *context); @@ -39,7 +39,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, * a certain CodecType for a pad with uncompressed data. */ -GstCaps2 * +GstCaps * gst_ffmpeg_codectype_to_caps (enum CodecType codec_type, AVCodecContext *context); @@ -49,7 +49,7 @@ gst_ffmpeg_codectype_to_caps (enum CodecType codec_type, */ enum CodecID -gst_ffmpeg_caps_to_codecid (const GstCaps2 *caps, +gst_ffmpeg_caps_to_codecid (const GstCaps *caps, AVCodecContext *context); /* caps_to_codectype () transforms a GstCaps that belongs to @@ -58,7 +58,7 @@ gst_ffmpeg_caps_to_codecid (const GstCaps2 *caps, void gst_ffmpeg_caps_to_codectype (enum CodecType type, - const GstCaps2 *caps, + const GstCaps *caps, AVCodecContext *context); /* _formatid_to_caps () is meant for muxers/demuxers, it @@ -67,7 +67,7 @@ gst_ffmpeg_caps_to_codectype (enum CodecType type, * caps belonging to that mux-format */ -GstCaps2 * +GstCaps * gst_ffmpeg_formatid_to_caps (const gchar *format_name); #endif /* __GST_FFMPEG_CODECMAP_H__ */ diff --git a/ext/ffmpeg/gstffmpegcolorspace.c b/ext/ffmpeg/gstffmpegcolorspace.c index 989ac48..f33bd05 100644 --- a/ext/ffmpeg/gstffmpegcolorspace.c +++ b/ext/ffmpeg/gstffmpegcolorspace.c @@ -97,7 +97,7 @@ static void gst_ffmpegcsp_init (GTypeInstance *instance, gpointer g_class); static GstPadLinkReturn gst_ffmpegcsp_connect (GstPad *pad, - const GstCaps2 *caps); + const GstCaps *caps); static GstPadLinkReturn gst_ffmpegcsp_try_connect (GstPad *pad, AVCodecContext *ctx, @@ -117,7 +117,7 @@ gst_ffmpegcsp_try_connect (GstPad *pad, AVCodecContext *ctx, double fps) { gint i, ret; GstFFMpegCsp *space; - GstCaps2 *caps; + GstCaps *caps; gboolean try_all = (ctx->pix_fmt != PIX_FMT_NB); space = GST_FFMPEG_CSP (gst_pad_get_parent (pad)); @@ -125,21 +125,21 @@ gst_ffmpegcsp_try_connect (GstPad *pad, AVCodecContext *ctx, double fps) /* loop over all possibilities and select the first one we can convert and * is accepted by the peer */ caps = gst_ffmpeg_codectype_to_caps (CODEC_TYPE_VIDEO, ctx); - for (i = 0; i < gst_caps2_get_n_structures (caps); i++) { - GstStructure *structure = gst_caps2_get_nth_cap (caps, i); - GstCaps2 *setcaps; + for (i = 0; i < gst_caps_get_size (caps); i++) { + GstStructure *structure = gst_caps_get_structure (caps, i); + GstCaps *setcaps; if (fps > 0) gst_structure_set (structure, "framerate", G_TYPE_DOUBLE, fps, NULL); - setcaps = gst_caps2_new_full (gst_structure_copy (structure), NULL); + setcaps = gst_caps_new_full (gst_structure_copy (structure), NULL); ret = gst_pad_try_set_caps (pad, setcaps); - gst_caps2_free (setcaps); + gst_caps_free (setcaps); if (ret >= 0) { if (ctx->pix_fmt == PIX_FMT_NB) gst_ffmpeg_caps_to_codectype (CODEC_TYPE_VIDEO, caps, ctx); - gst_caps2_free (caps); + gst_caps_free (caps); return ret; } @@ -154,7 +154,7 @@ gst_ffmpegcsp_try_connect (GstPad *pad, AVCodecContext *ctx, double fps) } static GstPadLinkReturn -gst_ffmpegcsp_connect (GstPad *pad, const GstCaps2 *caps) +gst_ffmpegcsp_connect (GstPad *pad, const GstCaps *caps) { AVCodecContext *ctx; GstFFMpegCsp *space; @@ -188,7 +188,7 @@ gst_ffmpegcsp_connect (GstPad *pad, const GstCaps2 *caps) return GST_PAD_LINK_REFUSED; } - if (!gst_structure_get_double (gst_caps2_get_nth_cap (caps, 0), + if (!gst_structure_get_double (gst_caps_get_structure (caps, 0), "framerate", &fps)) fps = 0; @@ -249,12 +249,12 @@ gst_ffmpegcsp_get_type (void) static void gst_ffmpegcsp_base_init (gpointer g_class) { - GstCaps2 *caps, *capscopy; + GstCaps *caps, *capscopy; GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); /* template caps */ caps = gst_ffmpeg_codectype_to_caps (CODEC_TYPE_VIDEO, NULL); - capscopy = gst_caps2_copy (caps); + capscopy = gst_caps_copy (caps); /* build templates */ gst_element_class_add_pad_template (element_class, diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index 5ad633e..710f139 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -59,7 +59,7 @@ typedef struct _GstFFMpegDecClassParams GstFFMpegDecClassParams; struct _GstFFMpegDecClassParams { AVCodec *in_plugin; - GstCaps2 *srccaps, *sinkcaps; + GstCaps *srccaps, *sinkcaps; }; #define GST_TYPE_FFMPEGDEC \ @@ -92,7 +92,7 @@ static void gst_ffmpegdec_init (GstFFMpegDec *ffmpegdec); static void gst_ffmpegdec_dispose (GObject *object); static GstPadLinkReturn gst_ffmpegdec_connect (GstPad *pad, - const GstCaps2 *caps); + const GstCaps *caps); static void gst_ffmpegdec_chain (GstPad *pad, GstData *data); @@ -206,7 +206,7 @@ gst_ffmpegdec_dispose (GObject *object) static GstPadLinkReturn gst_ffmpegdec_connect (GstPad *pad, - const GstCaps2 *caps) + const GstCaps *caps) { GstFFMpegDec *ffmpegdec = (GstFFMpegDec *)(gst_pad_get_parent (pad)); GstFFMpegDecClass *oclass = (GstFFMpegDecClass*)(G_OBJECT_GET_CLASS (ffmpegdec)); @@ -405,7 +405,7 @@ gst_ffmpegdec_chain (GstPad *pad, if (have_data) { if (!GST_PAD_CAPS (ffmpegdec->srcpad)) { - GstCaps2 *caps; + GstCaps *caps; caps = gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type, ffmpegdec->context); if (caps == NULL || @@ -473,7 +473,7 @@ gst_ffmpegdec_register (GstPlugin *plugin) while (in_plugin) { GstFFMpegDecClassParams *params; - GstCaps2 *srccaps, *sinkcaps; + GstCaps *srccaps, *sinkcaps; gchar *type_name; /* no quasi-codecs, please */ diff --git a/ext/ffmpeg/gstffmpegdemux.c b/ext/ffmpeg/gstffmpegdemux.c index d26aa0d..da76f3d 100644 --- a/ext/ffmpeg/gstffmpegdemux.c +++ b/ext/ffmpeg/gstffmpegdemux.c @@ -51,7 +51,7 @@ struct _GstFFMpegDemux { typedef struct _GstFFMpegDemuxClassParams { AVInputFormat *in_plugin; - GstCaps2 *sinkcaps, *videosrccaps, *audiosrccaps; + GstCaps *sinkcaps, *videosrccaps, *audiosrccaps; } GstFFMpegDemuxClassParams; typedef struct _GstFFMpegDemuxClass GstFFMpegDemuxClass; @@ -287,7 +287,7 @@ gst_ffmpegdemux_loop (GstElement *element) /* create the pad/stream if we didn't do so already */ if (st->codec_info_state == 0) { GstPadTemplate *templ = NULL; - GstCaps2 *caps; + GstCaps *caps; gchar *padname; gint num; @@ -398,7 +398,7 @@ gst_ffmpegdemux_register (GstPlugin *plugin) 0, (GInstanceInitFunc)gst_ffmpegdemux_init, }; - GstCaps2 *any_caps = gst_caps2_new_any (); + GstCaps *any_caps = gst_caps_new_any (); in_plugin = first_iformat; @@ -407,7 +407,7 @@ gst_ffmpegdemux_register (GstPlugin *plugin) while (in_plugin) { gchar *type_name, *typefind_name; gchar *p; - GstCaps2 *sinkcaps, *audiosrccaps, *videosrccaps; + GstCaps *sinkcaps, *audiosrccaps, *videosrccaps; /* Try to find the caps that belongs here */ sinkcaps = gst_ffmpeg_formatid_to_caps (in_plugin->name); @@ -421,19 +421,19 @@ gst_ffmpegdemux_register (GstPlugin *plugin) videosrccaps = NULL; for (in_codec = first_avcodec; in_codec != NULL; in_codec = in_codec->next) { - GstCaps2 *temp = gst_ffmpeg_codecid_to_caps (in_codec->id, NULL); + GstCaps *temp = gst_ffmpeg_codecid_to_caps (in_codec->id, NULL); if (!temp) { continue; } switch (in_codec->type) { case CODEC_TYPE_VIDEO: - gst_caps2_append (videosrccaps, temp); + gst_caps_append (videosrccaps, temp); break; case CODEC_TYPE_AUDIO: - gst_caps2_append (audiosrccaps, temp); + gst_caps_append (audiosrccaps, temp); break; default: - gst_caps2_free (temp); + gst_caps_free (temp); break; } } @@ -484,7 +484,7 @@ gst_ffmpegdemux_register (GstPlugin *plugin) next: in_plugin = in_plugin->next; } - gst_caps2_free (any_caps); + gst_caps_free (any_caps); g_hash_table_remove (global_plugins, GINT_TO_POINTER (0)); return TRUE; diff --git a/ext/ffmpeg/gstffmpegenc.c b/ext/ffmpeg/gstffmpegenc.c index d4549a9..72f6f3f 100644 --- a/ext/ffmpeg/gstffmpegenc.c +++ b/ext/ffmpeg/gstffmpegenc.c @@ -64,7 +64,7 @@ struct _GstFFMpegEncClass { typedef struct { AVCodec *in_plugin; - GstCaps2 *srccaps, *sinkcaps; + GstCaps *srccaps, *sinkcaps; } GstFFMpegEncClassParams; #define GST_TYPE_FFMPEGENC \ @@ -123,7 +123,7 @@ static void gst_ffmpegenc_init (GstFFMpegEnc *ffmpegenc); static void gst_ffmpegenc_dispose (GObject *object); static GstPadLinkReturn - gst_ffmpegenc_connect (GstPad *pad, const GstCaps2 *caps); + gst_ffmpegenc_connect (GstPad *pad, const GstCaps *caps); static void gst_ffmpegenc_chain_video (GstPad *pad, GstData *_data); static void gst_ffmpegenc_chain_audio (GstPad *pad, GstData *_data); @@ -282,9 +282,9 @@ gst_ffmpegenc_dispose (GObject *object) static GstPadLinkReturn gst_ffmpegenc_connect (GstPad *pad, - const GstCaps2 *caps) + const GstCaps *caps) { - GstCaps2 *other_caps; + GstCaps *other_caps; GstPadLinkReturn ret; enum PixelFormat pix_fmt; GstFFMpegEnc *ffmpegenc = (GstFFMpegEnc *) gst_pad_get_parent (pad); @@ -594,7 +594,7 @@ gst_ffmpegenc_register (GstPlugin *plugin) while (in_plugin) { gchar *type_name; - GstCaps2 *srccaps, *sinkcaps; + GstCaps *srccaps, *sinkcaps; GstFFMpegEncClassParams *params; /* no quasi codecs, please */ diff --git a/ext/ffmpeg/gstffmpegmux.c b/ext/ffmpeg/gstffmpegmux.c index 864b960..7e36c4f 100644 --- a/ext/ffmpeg/gstffmpegmux.c +++ b/ext/ffmpeg/gstffmpegmux.c @@ -51,7 +51,7 @@ struct _GstFFMpegMux { typedef struct _GstFFMpegMuxClassParams { AVOutputFormat *in_plugin; - GstCaps2 *srccaps, *videosinkcaps, *audiosinkcaps; + GstCaps *srccaps, *videosinkcaps, *audiosinkcaps; } GstFFMpegMuxClassParams; typedef struct _GstFFMpegMuxClass GstFFMpegMuxClass; @@ -96,7 +96,7 @@ static void gst_ffmpegmux_dispose (GObject *object); static GstPadLinkReturn gst_ffmpegmux_connect (GstPad *pad, - const GstCaps2 *caps); + const GstCaps *caps); static GstPad * gst_ffmpegmux_request_new_pad (GstElement *element, GstPadTemplate *templ, const gchar *name); @@ -272,7 +272,7 @@ gst_ffmpegmux_request_new_pad (GstElement *element, static GstPadLinkReturn gst_ffmpegmux_connect (GstPad *pad, - const GstCaps2 *caps) + const GstCaps *caps) { GstFFMpegMux *ffmpegmux = (GstFFMpegMux *)(gst_pad_get_parent (pad)); gint i; @@ -458,7 +458,7 @@ gst_ffmpegmux_register (GstPlugin *plugin) while (in_plugin) { gchar *type_name; gchar *p; - GstCaps2 *srccaps, *audiosinkcaps, *videosinkcaps; + GstCaps *srccaps, *audiosinkcaps, *videosinkcaps; /* Try to find the caps that belongs here */ srccaps = gst_ffmpeg_formatid_to_caps (in_plugin->name); @@ -472,19 +472,19 @@ gst_ffmpegmux_register (GstPlugin *plugin) videosinkcaps = NULL; for (in_codec = first_avcodec; in_codec != NULL; in_codec = in_codec->next) { - GstCaps2 *temp = gst_ffmpeg_codecid_to_caps (in_codec->id, NULL); + GstCaps *temp = gst_ffmpeg_codecid_to_caps (in_codec->id, NULL); if (!temp) { continue; } switch (in_codec->type) { case CODEC_TYPE_VIDEO: - gst_caps2_append (videosinkcaps, temp); + gst_caps_append (videosinkcaps, temp); break; case CODEC_TYPE_AUDIO: - gst_caps2_append (audiosinkcaps, temp); + gst_caps_append (audiosinkcaps, temp); break; default: - gst_caps2_free (temp); + gst_caps_free (temp); break; } } -- cgit v1.2.1