diff options
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/audio/audio.c | 16 | ||||
-rw-r--r-- | gst-libs/gst/audio/gstaudiofilter.c | 20 | ||||
-rw-r--r-- | gst-libs/gst/audio/gstaudiofilter.h | 4 | ||||
-rw-r--r-- | gst-libs/gst/media-info/media-info-priv.c | 16 | ||||
-rw-r--r-- | gst-libs/gst/media-info/media-info-priv.h | 8 | ||||
-rw-r--r-- | gst-libs/gst/media-info/media-info-test.c | 6 | ||||
-rw-r--r-- | gst-libs/gst/media-info/media-info.c | 4 | ||||
-rw-r--r-- | gst-libs/gst/media-info/media-info.h | 14 | ||||
-rw-r--r-- | gst-libs/gst/play/gstplay.c | 4 | ||||
-rw-r--r-- | gst-libs/gst/play/play.c | 4 | ||||
-rw-r--r-- | gst-libs/gst/play/play.old.c | 2 | ||||
-rw-r--r-- | gst-libs/gst/riff/riff-media.c | 96 | ||||
-rw-r--r-- | gst-libs/gst/riff/riff-media.h | 12 | ||||
-rw-r--r-- | gst-libs/gst/riff/riff-read.c | 12 | ||||
-rw-r--r-- | gst-libs/gst/riff/riff-read.h | 2 | ||||
-rw-r--r-- | gst-libs/gst/video/video.c | 8 |
16 files changed, 114 insertions, 114 deletions
diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c index f3c85a59..bec298e9 100644 --- a/gst-libs/gst/audio/audio.c +++ b/gst-libs/gst/audio/audio.c @@ -35,7 +35,7 @@ gst_audio_frame_byte_size (GstPad* pad) int width = 0; int channels = 0; - GstCaps2 *caps; + GstCaps *caps; GstStructure *structure; /* get caps of pad */ @@ -48,7 +48,7 @@ gst_audio_frame_byte_size (GstPad* pad) return 0; } - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); gst_structure_get_int (structure, "width", &width); gst_structure_get_int (structure, "channels", &channels); @@ -82,7 +82,7 @@ gst_audio_frame_rate (GstPad *pad) * returns 0 if failed, rate if success */ { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; gint rate; GstStructure *structure; @@ -96,7 +96,7 @@ gst_audio_frame_rate (GstPad *pad) return 0; } else { - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); gst_structure_get_int (structure, "rate", &rate); return rate; } @@ -117,7 +117,7 @@ gst_audio_length (GstPad* pad, GstBuffer* buf) double length; - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; GstStructure *structure; g_assert (GST_IS_BUFFER (buf)); @@ -132,7 +132,7 @@ gst_audio_length (GstPad* pad, GstBuffer* buf) } else { - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); bytes = GST_BUFFER_SIZE (buf); gst_structure_get_int (structure, "width", &width); gst_structure_get_int (structure, "channels", &channels); @@ -156,7 +156,7 @@ gst_audio_highest_sample_value (GstPad* pad) { gboolean is_signed = FALSE; gint width = 0; - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; GstStructure *structure; caps = GST_PAD_CAPS (pad); @@ -166,7 +166,7 @@ gst_audio_highest_sample_value (GstPad* pad) GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad)); } - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); gst_structure_get_int (structure, "width", &width); gst_structure_get_boolean (structure, "signed", &is_signed); diff --git a/gst-libs/gst/audio/gstaudiofilter.c b/gst-libs/gst/audio/gstaudiofilter.c index adbb9748..46e7c7de 100644 --- a/gst-libs/gst/audio/gstaudiofilter.c +++ b/gst-libs/gst/audio/gstaudiofilter.c @@ -48,7 +48,7 @@ static void gst_audiofilter_set_property (GObject *object, guint prop_id, const static void gst_audiofilter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gst_audiofilter_chain (GstPad *pad, GstData *_data); -GstCaps2 * gst_audiofilter_class_get_capslist(GstAudiofilterClass *klass); +GstCaps * gst_audiofilter_class_get_capslist(GstAudiofilterClass *klass); static GstElementClass *parent_class = NULL; @@ -105,11 +105,11 @@ static void gst_audiofilter_class_init (gpointer g_class, gpointer class_data) gobject_class->get_property = gst_audiofilter_get_property; } -static GstCaps2 * +static GstCaps * gst_audiofilter_getcaps (GstPad *pad) { GstAudiofilter *audiofilter; - GstCaps2 *othercaps; + GstCaps *othercaps; GstAudiofilterClass *audiofilter_class; GST_DEBUG("gst_audiofilter_sink_getcaps"); @@ -124,11 +124,11 @@ gst_audiofilter_getcaps (GstPad *pad) othercaps = gst_pad_get_allowed_caps (audiofilter->srcpad); } - return gst_caps2_intersect (othercaps, audiofilter_class->caps); + return gst_caps_intersect (othercaps, audiofilter_class->caps); } static GstPadLinkReturn -gst_audiofilter_link (GstPad *pad, const GstCaps2 *caps) +gst_audiofilter_link (GstPad *pad, const GstCaps *caps) { GstAudiofilter *audiofilter; GstPadLinkReturn ret; @@ -150,7 +150,7 @@ gst_audiofilter_link (GstPad *pad, const GstCaps2 *caps) if (link_ret != GST_PAD_LINK_OK) return link_ret; - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); if (strcmp (gst_structure_get_name (structure), "audio/x-raw-int") == 0) { ret = gst_structure_get_int (structure, "depth", &audiofilter->depth); @@ -287,19 +287,19 @@ gst_audiofilter_get_property (GObject *object, guint prop_id, GValue *value, GPa } void gst_audiofilter_class_add_pad_templates ( - GstAudiofilterClass *audiofilter_class, const GstCaps2 *caps) + GstAudiofilterClass *audiofilter_class, const GstCaps *caps) { GstElementClass *element_class = GST_ELEMENT_CLASS (audiofilter_class); - audiofilter_class->caps = gst_caps2_copy(caps); + audiofilter_class->caps = gst_caps_copy(caps); gst_element_class_add_pad_template (element_class, gst_pad_template_new("src", GST_PAD_SRC, GST_PAD_ALWAYS, - gst_caps2_copy(caps))); + gst_caps_copy(caps))); gst_element_class_add_pad_template (element_class, gst_pad_template_new("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - gst_caps2_copy(caps))); + gst_caps_copy(caps))); } static gboolean diff --git a/gst-libs/gst/audio/gstaudiofilter.h b/gst-libs/gst/audio/gstaudiofilter.h index f5bb7eaa..4723c329 100644 --- a/gst-libs/gst/audio/gstaudiofilter.h +++ b/gst-libs/gst/audio/gstaudiofilter.h @@ -68,7 +68,7 @@ struct _GstAudiofilter { struct _GstAudiofilterClass { GstElementClass parent_class; - GstCaps2 *caps; + GstCaps *caps; GstAudiofilterSetupFunc setup; GstAudiofilterInplaceFilterFunc filter_inplace; GstAudiofilterFilterFunc filter; @@ -76,7 +76,7 @@ struct _GstAudiofilterClass { GType gst_audiofilter_get_type(void); -void gst_audiofilter_class_add_pad_templates (GstAudiofilterClass *audiofilterclass, const GstCaps2 *caps); +void gst_audiofilter_class_add_pad_templates (GstAudiofilterClass *audiofilterclass, const GstCaps *caps); G_END_DECLS diff --git a/gst-libs/gst/media-info/media-info-priv.c b/gst-libs/gst/media-info/media-info-priv.c index b613ab86..c7f470ea 100644 --- a/gst-libs/gst/media-info/media-info-priv.c +++ b/gst-libs/gst/media-info/media-info-priv.c @@ -78,7 +78,7 @@ gmi_track_new (void) /* callbacks */ static void -have_type_callback (GstElement *typefind, GstCaps2 *type, GstMediaInfoPriv *priv) +have_type_callback (GstElement *typefind, GstCaps *type, GstMediaInfoPriv *priv) { priv->type = type; } @@ -136,13 +136,13 @@ gmi_reset (GstMediaInfo *info) if (priv->format) { GMI_DEBUG ("unreffing priv->format, error before this ?\n"); - gst_caps2_free (priv->format); + gst_caps_free (priv->format); priv->format = NULL; } if (priv->metadata) { GMI_DEBUG ("unreffing priv->metadata, error before this ?\n"); - gst_caps2_free (priv->metadata); + gst_caps_free (priv->metadata); priv->metadata = NULL; } if (priv->stream) @@ -193,12 +193,12 @@ gmi_seek_to_track (GstMediaInfo *info, long track) /* clear structs because of the seek */ if (priv->metadata) { - gst_caps2_free (priv->metadata); + gst_caps_free (priv->metadata); priv->metadata = NULL; } if (priv->streaminfo) { - gst_caps2_free (priv->streaminfo); + gst_caps_free (priv->streaminfo); priv->streaminfo = NULL; } return TRUE; @@ -293,7 +293,7 @@ gmi_clear_decoder (GstMediaInfo *info) /**** * typefind functions * find the type of a file and store it in the caps of the info - * FIXME: we might better return GstCaps2 instead of storing them + * FIXME: we might better return GstCaps instead of storing them * internally */ /* prepare for typefind, move from NULL to TYPEFIND */ @@ -304,7 +304,7 @@ gmip_find_type_pre (GstMediaInfoPriv *priv) if (priv->type) { /* we don't need to unref, this is done inside gsttypefind.c - gst_caps2_free (priv->type); + gst_caps_free (priv->type); */ priv->type = NULL; } @@ -578,7 +578,7 @@ gmip_find_track_streaminfo_post (GstMediaInfoPriv *priv) value_end -= value_start; /* FIXME: check units; this is in seconds */ - gst_caps2_set_simple (priv->streaminfo, + gst_caps_set_simple (priv->streaminfo, "length", G_TYPE_INT, (int) (value_end / 1E6), NULL); } } diff --git a/gst-libs/gst/media-info/media-info-priv.h b/gst-libs/gst/media-info/media-info-priv.h index 24da7333..0a7aa500 100644 --- a/gst-libs/gst/media-info/media-info-priv.h +++ b/gst-libs/gst/media-info/media-info-priv.h @@ -64,14 +64,14 @@ struct GstMediaInfoPriv GstElement *typefind; - GstCaps2 *type; + GstCaps *type; GstPad *decoder_pad; /* pad for querying decoded caps */ GstPad *source_pad; /* pad for querying encoded caps */ - GstCaps2 *format; - GstCaps2 *metadata; + GstCaps *format; + GstCaps *metadata; gint metadata_iters; - GstCaps2 *streaminfo; + GstCaps *streaminfo; GstElement *decoder; /* will be != NULL during collection */ gchar *source_element; /* type of element used as source */ diff --git a/gst-libs/gst/media-info/media-info-test.c b/gst-libs/gst/media-info/media-info-test.c index 8e0c1f72..5a73c8bd 100644 --- a/gst-libs/gst/media-info/media-info-test.c +++ b/gst-libs/gst/media-info/media-info-test.c @@ -27,11 +27,11 @@ info_print (GstMediaInfoStream *stream) g_print ("- track %d\n", i); track = (GstMediaInfoTrack *) p->data; g_print (" - metadata:\n"); - g_print ("%s\n", gst_caps2_to_string (track->metadata)); + g_print ("%s\n", gst_caps_to_string (track->metadata)); g_print (" - streaminfo:\n"); - g_print ("%s\n", gst_caps2_to_string (track->streaminfo)); + g_print ("%s\n", gst_caps_to_string (track->streaminfo)); g_print (" - format:\n"); - g_print ("%s\n", gst_caps2_to_string (track->format)); + g_print ("%s\n", gst_caps_to_string (track->format)); p = p->next; } } diff --git a/gst-libs/gst/media-info/media-info.c b/gst-libs/gst/media-info/media-info.c index d22bdbb4..e214e8e1 100644 --- a/gst-libs/gst/media-info/media-info.c +++ b/gst-libs/gst/media-info/media-info.c @@ -295,7 +295,7 @@ gst_media_info_read_idler (GstMediaInfo *info, GstMediaInfoStream **streamp) gmip_find_type_post (priv); GMI_DEBUG("finding out mime type\n"); mime = g_strdup (gst_structure_get_name ( - gst_caps2_get_nth_cap(priv->type, 0))); + gst_caps_get_structure(priv->type, 0))); GMI_DEBUG("found out mime type: %s\n", mime); decoder = gmi_get_decoder (info, mime); if (decoder == NULL) @@ -445,7 +445,7 @@ gst_media_info_read (GstMediaInfo *info, const char *location, guint16 flags) if (!gmip_find_type (priv)) return NULL; mime = g_strdup (gst_structure_get_name ( - gst_caps2_get_nth_cap(priv->type, 0))); + gst_caps_get_structure(priv->type, 0))); GMI_DEBUG("mime type: %s\n", mime); /* c) figure out decoder */ diff --git a/gst-libs/gst/media-info/media-info.h b/gst-libs/gst/media-info/media-info.h index 069bfd7c..d42a4af7 100644 --- a/gst-libs/gst/media-info/media-info.h +++ b/gst-libs/gst/media-info/media-info.h @@ -55,7 +55,7 @@ typedef struct gboolean seekable; gchar *mime; gchar *path; - GstCaps2 *caps; /* properties of the complete bitstream */ + GstCaps *caps; /* properties of the complete bitstream */ guint64 length_time; glong length_tracks; @@ -68,9 +68,9 @@ typedef struct * or one of a set of sequentially muxed streams */ typedef struct { - GstCaps2 *metadata; /* changeable metadata or tags */ - GstCaps2 *streaminfo; /* codec property stuff */ - GstCaps2 *format; /* properties of the logical stream */ + GstCaps *metadata; /* changeable metadata or tags */ + GstCaps *streaminfo; /* codec property stuff */ + GstCaps *format; /* properties of the logical stream */ guint64 length_time; @@ -80,7 +80,7 @@ typedef struct typedef struct { - GstCaps2 *caps; /* properties of the muxed concurrent stream */ + GstCaps *caps; /* properties of the muxed concurrent stream */ } GstMediaInfoConcurrent; #define GST_MEDIA_INFO_ERROR gst_media_info_error_quark () @@ -116,13 +116,13 @@ gboolean gst_media_info_read_many (GstMediaInfo *media_info, GList *locations, guint16 GST_MEDIA_INFO_FLAGS, GError **error); -GstCaps2 * gst_media_info_get_next (GstMediaInfo *media_info, +GstCaps * gst_media_info_get_next (GstMediaInfo *media_info, GError **error); /* * FIXME: reset ? gboolean gst_media_info_write (GstMediaInfo *media_info, const char *location, - GstCaps2 *media_info); + GstCaps *media_info); */ G_END_DECLS diff --git a/gst-libs/gst/play/gstplay.c b/gst-libs/gst/play/gstplay.c index e4c652a5..061f125c 100644 --- a/gst-libs/gst/play/gstplay.c +++ b/gst-libs/gst/play/gstplay.c @@ -909,13 +909,13 @@ gst_play_get_sink_element (GstPlay *play, } else { /* If not a src pad checking caps */ - const GstCaps2 *caps; + const GstCaps *caps; GstStructure *structure; gboolean has_video_cap = FALSE; gboolean has_audio_cap = FALSE; caps = gst_pad_get_caps (GST_PAD (pads->data)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); if (strcmp (gst_structure_get_name (structure), "audio/x-raw-int") == 0) { diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c index e4c652a5..061f125c 100644 --- a/gst-libs/gst/play/play.c +++ b/gst-libs/gst/play/play.c @@ -909,13 +909,13 @@ gst_play_get_sink_element (GstPlay *play, } else { /* If not a src pad checking caps */ - const GstCaps2 *caps; + const GstCaps *caps; GstStructure *structure; gboolean has_video_cap = FALSE; gboolean has_audio_cap = FALSE; caps = gst_pad_get_caps (GST_PAD (pads->data)); - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); if (strcmp (gst_structure_get_name (structure), "audio/x-raw-int") == 0) { diff --git a/gst-libs/gst/play/play.old.c b/gst-libs/gst/play/play.old.c index dd787001..513a3e12 100644 --- a/gst-libs/gst/play/play.old.c +++ b/gst-libs/gst/play/play.old.c @@ -910,7 +910,7 @@ gst_play_get_sink_element (GstPlay * play, gboolean has_video_cap = FALSE, has_audio_cap = FALSE; const char *media_type; - media_type = gst_structure_get_name (gst_caps2_get_nth_cap ( + media_type = gst_structure_get_name (gst_caps_get_structure ( gst_pad_get_caps (GST_PAD (pads->data)), 0)); if (strcmp (media_type, "audio/x-raw-int") == 0) { diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c index 79db9420..7c200896 100644 --- a/gst-libs/gst/riff/riff-media.c +++ b/gst-libs/gst/riff/riff-media.c @@ -26,17 +26,17 @@ #include "riff-ids.h" #include "riff-media.h" -GstCaps2 * +GstCaps * gst_riff_create_video_caps (guint32 codec_fcc, gst_riff_strh *strh, gst_riff_strf_vids *strf) { - 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; @@ -45,16 +45,16 @@ gst_riff_create_video_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); @@ -67,13 +67,13 @@ gst_riff_create_video_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; @@ -81,54 +81,54 @@ gst_riff_create_video_caps (guint32 codec_fcc, 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; @@ -142,20 +142,20 @@ gst_riff_create_video_caps (guint32 codec_fcc, if (strh != NULL) { gfloat fps = 1. * strh->rate / strh->scale; - gst_caps2_set_simple (caps, "framerate", G_TYPE_DOUBLE, fps, NULL); + gst_caps_set_simple (caps, "framerate", G_TYPE_DOUBLE, fps, NULL); } else { - gst_caps2_set_simple (caps, + gst_caps_set_simple (caps, "framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE, NULL); } if (strf != NULL) { - gst_caps2_set_simple (caps, + gst_caps_set_simple (caps, "width", G_TYPE_INT, strf->width, "height", G_TYPE_INT, strf->height, NULL); } else { - gst_caps2_set_simple (caps, + gst_caps_set_simple (caps, "width", GST_TYPE_INT_RANGE, 16, 4096, "height", GST_TYPE_INT_RANGE, 16, 4096, NULL); @@ -164,23 +164,23 @@ gst_riff_create_video_caps (guint32 codec_fcc, return caps; } -GstCaps2 * +GstCaps * gst_riff_create_audio_caps (guint16 codec_id, gst_riff_strh *strh, gst_riff_strf_auds *strf) { - 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", "mpegversion", G_TYPE_INT, 1, "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; @@ -191,14 +191,14 @@ gst_riff_create_audio_caps (guint16 codec_id, gint ch = GUINT16_FROM_LE (strf->channels); gint ws = GUINT16_FROM_LE (strf->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, (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 }, " "width = (int) { 8, 16 }, " @@ -211,7 +211,7 @@ gst_riff_create_audio_caps (guint16 codec_id, GST_WARNING ("invalid depth (%d) of mulaw audio, overwriting.", strf->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: @@ -219,7 +219,7 @@ gst_riff_create_audio_caps (guint16 codec_id, GST_WARNING ("invalid depth (%d) of alaw audio, overwriting.", strf->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 */ @@ -228,11 +228,11 @@ gst_riff_create_audio_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: @@ -242,12 +242,12 @@ gst_riff_create_audio_caps (guint16 codec_id, } if (strf != NULL) { - gst_caps2_set_simple (caps, + gst_caps_set_simple (caps, "rate", G_TYPE_INT, strf->rate, "channels", G_TYPE_INT, strf->channels, NULL); } else { - gst_caps2_set_simple (caps, + gst_caps_set_simple (caps, "rate", GST_TYPE_INT_RANGE, 8000, 96000, "channels", GST_TYPE_INT_RANGE, 1, 2, NULL); @@ -256,18 +256,18 @@ gst_riff_create_audio_caps (guint16 codec_id, return caps; } -GstCaps2 * +GstCaps * gst_riff_create_iavs_caps (guint32 codec_fcc, gst_riff_strh *strh, gst_riff_strf_iavs *strf) { - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; switch (codec_fcc) { /* is this correct? */ 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, TRUE, NULL); default: @@ -283,7 +283,7 @@ gst_riff_create_iavs_caps (guint32 codec_fcc, * Functions below are for template caps. All is variable. */ -GstCaps2 * +GstCaps * gst_riff_create_video_template_caps (void) { guint32 tags[] = { @@ -307,19 +307,19 @@ gst_riff_create_video_template_caps (void) 0 }; guint i; - GstCaps2 *caps, *one; + GstCaps *caps, *one; - caps = gst_caps2_new_empty (); + caps = gst_caps_new_empty (); for (i = 0; tags[i] != 0; i++) { one = gst_riff_create_video_caps (tags[i], NULL, NULL); if (one) - gst_caps2_append (caps, one); + gst_caps_append (caps, one); } return caps; } -GstCaps2 * +GstCaps * gst_riff_create_audio_template_caps (void) { guint16 tags[] = { @@ -334,19 +334,19 @@ gst_riff_create_audio_template_caps (void) 0 }; guint i; - GstCaps2 *caps, *one; + GstCaps *caps, *one; - caps = gst_caps2_new_empty (); + caps = gst_caps_new_empty (); for (i = 0; tags[i] != 0; i++) { one = gst_riff_create_audio_caps (tags[i], NULL, NULL); if (one) - gst_caps2_append (caps, one); + gst_caps_append (caps, one); } return caps; } -GstCaps2 * +GstCaps * gst_riff_create_iavs_template_caps (void) { guint32 tags[] = { @@ -355,13 +355,13 @@ gst_riff_create_iavs_template_caps (void) 0 }; guint i; - GstCaps2 *caps, *one; + GstCaps *caps, *one; - caps = gst_caps2_new_empty (); + caps = gst_caps_new_empty (); for (i = 0; tags[i] != 0; i++) { one = gst_riff_create_iavs_caps (tags[i], NULL, NULL); if (one) - gst_caps2_append (caps, one); + gst_caps_append (caps, one); } return caps; diff --git a/gst-libs/gst/riff/riff-media.h b/gst-libs/gst/riff/riff-media.h index 1607fc3a..256ed947 100644 --- a/gst-libs/gst/riff/riff-media.h +++ b/gst-libs/gst/riff/riff-media.h @@ -32,13 +32,13 @@ G_BEGIN_DECLS * Create one caps. strh/strf can be NULL (for non-fixed caps). */ -GstCaps2 *gst_riff_create_video_caps (guint32 codec_fcc, +GstCaps *gst_riff_create_video_caps (guint32 codec_fcc, gst_riff_strh *strh, gst_riff_strf_vids *strf); -GstCaps2 *gst_riff_create_audio_caps (guint16 codec_id, +GstCaps *gst_riff_create_audio_caps (guint16 codec_id, gst_riff_strh *strh, gst_riff_strf_auds *strf); -GstCaps2 *gst_riff_create_iavs_caps (guint32 codec_fcc, +GstCaps *gst_riff_create_iavs_caps (guint32 codec_fcc, gst_riff_strh *strh, gst_riff_strf_iavs *strf); @@ -46,9 +46,9 @@ GstCaps2 *gst_riff_create_iavs_caps (guint32 codec_fcc, * Create template caps (includes all known types). */ -GstCaps2 *gst_riff_create_video_template_caps (void); -GstCaps2 *gst_riff_create_audio_template_caps (void); -GstCaps2 *gst_riff_create_iavs_template_caps (void); +GstCaps *gst_riff_create_video_template_caps (void); +GstCaps *gst_riff_create_audio_template_caps (void); +GstCaps *gst_riff_create_iavs_template_caps (void); G_END_DECLS diff --git a/gst-libs/gst/riff/riff-read.c b/gst-libs/gst/riff/riff-read.c index 17daf024..815b3a7b 100644 --- a/gst-libs/gst/riff/riff-read.c +++ b/gst-libs/gst/riff/riff-read.c @@ -80,7 +80,7 @@ gst_riff_read_class_init (GstRiffReadClass *klass) g_object_class_install_property (gobject_class, ARG_METADATA, g_param_spec_boxed ("metadata", "Metadata", "Metadata", - GST_TYPE_CAPS2, G_PARAM_READABLE)); + GST_TYPE_CAPS, G_PARAM_READABLE)); parent_class = g_type_class_ref (GST_TYPE_ELEMENT); @@ -128,7 +128,7 @@ gst_riff_read_change_state (GstElement *element) riff->bs = gst_bytestream_new (riff->sinkpad); break; case GST_STATE_PAUSED_TO_READY: - gst_caps2_replace (&riff->metadata, NULL); + gst_caps_replace (&riff->metadata, NULL); gst_bytestream_destroy (riff->bs); while (riff->level) { GstRiffLevel *level = riff->level->data; @@ -714,7 +714,7 @@ gst_riff_read_info (GstRiffRead *riff) GstRiffLevel *level; GList *last; gchar *name, *type; - GstCaps2 *caps; + GstCaps *caps; /* What we're doing here is ugly (oh no!); we look * at our LIST tag size and assure that we do not @@ -726,7 +726,7 @@ gst_riff_read_info (GstRiffRead *riff) end = level->start + level->length; g_free (level); - caps = gst_caps2_new_simple ("application/x-gst-metadata", NULL); + caps = gst_caps_new_simple ("application/x-gst-metadata", NULL); while (gst_bytestream_tell (riff->bs) < end) { if (!gst_riff_peek_head (riff, &tag, NULL, NULL)) { @@ -816,14 +816,14 @@ gst_riff_read_info (GstRiffRead *riff) return FALSE; } - gst_caps2_set_simple (caps, type, G_TYPE_STRING, name, NULL); + gst_caps_set_simple (caps, type, G_TYPE_STRING, name, NULL); } else { gst_riff_read_skip (riff); } } /* let the world know about this wonderful thing */ - gst_caps2_replace (&riff->metadata, caps); + gst_caps_replace (&riff->metadata, caps); g_object_notify (G_OBJECT (riff), "metadata"); return TRUE; diff --git a/gst-libs/gst/riff/riff-read.h b/gst-libs/gst/riff/riff-read.h index cf8c379b..a0f92e3e 100644 --- a/gst-libs/gst/riff/riff-read.h +++ b/gst-libs/gst/riff/riff-read.h @@ -55,7 +55,7 @@ typedef struct _GstRiffRead { GList *level; /* metadata */ - GstCaps2 *metadata; + GstCaps *metadata; } GstRiffRead; typedef struct _GstRiffReadClass { diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c index 2fc54003..6d804a4d 100644 --- a/gst-libs/gst/video/video.c +++ b/gst-libs/gst/video/video.c @@ -30,7 +30,7 @@ gdouble gst_video_frame_rate (GstPad *pad) { gdouble fps = 0.; - GstCaps2 *caps; + GstCaps *caps; GstStructure *structure; /* get pad caps */ @@ -42,7 +42,7 @@ gst_video_frame_rate (GstPad *pad) return 0.; } - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); if (!gst_structure_get_double (structure, "framerate", &fps)){ g_warning ("gstvideo: failed to get framerate property of pad %s:%s", GST_ELEMENT_NAME (gst_pad_get_parent (pad)), @@ -62,7 +62,7 @@ gst_video_get_size (GstPad *pad, gint *width, gint *height) { - GstCaps2 *caps; + GstCaps *caps; GstStructure *structure; gboolean ret; @@ -79,7 +79,7 @@ gst_video_get_size (GstPad *pad, return FALSE; } - structure = gst_caps2_get_nth_cap (caps, 0); + structure = gst_caps_get_structure (caps, 0); ret = gst_structure_get_int (structure, "width", width); ret &= gst_structure_get_int (structure, "height", height); |