summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-12-21 23:24:38 +0000
committerDavid Schleef <ds@schleef.org>2003-12-21 23:24:38 +0000
commite6bf8ef80542ec04be641ef717181a8736db7808 (patch)
tree6c0eff24b2c87d9ce4e3169d08f183b853872fb7
parent76a6e90a42a3a2e8b7cea615253cfb16d63d72b0 (diff)
Global change from "caps2" to "caps"CAPS-ENDCAPS
Original commit message from CVS: Global change from "caps2" to "caps"
-rw-r--r--examples/seeking/vorbisfile.c14
-rw-r--r--ext/alsa/gstalsa.c50
-rw-r--r--ext/alsa/gstalsa.h6
-rw-r--r--ext/alsa/gstalsasrc.c14
-rw-r--r--ext/ogg/gstoggdemux.c14
-rw-r--r--ext/pango/gsttextoverlay.c6
-rw-r--r--ext/vorbis/vorbisenc.c14
-rw-r--r--ext/vorbis/vorbisfile.c30
-rw-r--r--gst-libs/gst/audio/audio.c16
-rw-r--r--gst-libs/gst/audio/gstaudiofilter.c20
-rw-r--r--gst-libs/gst/audio/gstaudiofilter.h4
-rw-r--r--gst-libs/gst/media-info/media-info-priv.c16
-rw-r--r--gst-libs/gst/media-info/media-info-priv.h8
-rw-r--r--gst-libs/gst/media-info/media-info-test.c6
-rw-r--r--gst-libs/gst/media-info/media-info.c4
-rw-r--r--gst-libs/gst/media-info/media-info.h14
-rw-r--r--gst-libs/gst/play/gstplay.c4
-rw-r--r--gst-libs/gst/play/play.c4
-rw-r--r--gst-libs/gst/play/play.old.c2
-rw-r--r--gst-libs/gst/riff/riff-media.c96
-rw-r--r--gst-libs/gst/riff/riff-media.h12
-rw-r--r--gst-libs/gst/riff/riff-read.c12
-rw-r--r--gst-libs/gst/riff/riff-read.h2
-rw-r--r--gst-libs/gst/video/gstvideofilter.c58
-rw-r--r--gst-libs/gst/video/gstvideofilter.h4
-rw-r--r--gst-libs/gst/video/video.c8
-rw-r--r--gst/adder/gstadder.c8
-rw-r--r--gst/audioconvert/gstaudioconvert.c18
-rw-r--r--gst/audioscale/gstaudioscale.c18
-rw-r--r--gst/sine/gstsinesrc.c30
-rw-r--r--gst/tags/gstvorbistag.c6
-rw-r--r--gst/tcp/gsttcpsink.c4
-rw-r--r--gst/tcp/gsttcpsrc.c4
-rw-r--r--gst/typefind/gsttypefindfunctions.c104
-rw-r--r--gst/videoscale/gstvideoscale.c28
-rw-r--r--gst/videotestsrc/gstvideotestsrc.c46
-rw-r--r--gst/volume/gstvolume.c6
-rw-r--r--sys/v4l/gstv4lmjpegsink.c6
-rw-r--r--sys/v4l/gstv4lmjpegsrc.c12
-rw-r--r--sys/v4l/gstv4lsrc.c38
-rw-r--r--sys/ximage/ximagesink.c20
-rw-r--r--sys/ximage/ximagesink.h2
-rw-r--r--sys/xvimage/xvimagesink.c44
-rw-r--r--sys/xvimage/xvimagesink.h4
-rw-r--r--tests/examples/seek/vorbisfile.c14
-rw-r--r--tests/old/examples/seek/vorbisfile.c14
46 files changed, 432 insertions, 432 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/alsa/gstalsa.c b/ext/alsa/gstalsa.c
index 63c7a107d..88ac2e654 100644
--- a/ext/alsa/gstalsa.c
+++ b/ext/alsa/gstalsa.c
@@ -431,13 +431,13 @@ gst_alsa_formats_match (GstAlsaFormat *one, GstAlsaFormat *two)
}
/* get props for a spec */
-static GstCaps2 *
+static GstCaps *
gst_alsa_get_caps_internal (snd_pcm_format_t format)
{
if (format == SND_PCM_FORMAT_A_LAW) {
- return gst_caps2_new_simple ("audio/x-alaw", NULL);
+ return gst_caps_new_simple ("audio/x-alaw", NULL);
} else if (format == SND_PCM_FORMAT_MU_LAW) {
- return gst_caps2_new_simple ("audio/x-mulaw", NULL);
+ return gst_caps_new_simple ("audio/x-mulaw", NULL);
} else if (snd_pcm_format_linear (format)) {
/* int */
GstStructure *structure = gst_structure_new ("audio/x-raw-int",
@@ -460,13 +460,13 @@ gst_alsa_get_caps_internal (snd_pcm_format_t format)
break;
}
}
- return gst_caps2_new_full (structure, NULL);
+ return gst_caps_new_full (structure, NULL);
} else if (snd_pcm_format_float (format)) {
/* no float with non-platform endianness */
if (!snd_pcm_format_cpu_endian (format))
return NULL;
- return gst_caps2_new_simple ("audio/x-raw-float",
+ return gst_caps_new_simple ("audio/x-raw-float",
"width", G_TYPE_INT, (gint) snd_pcm_format_width (format),
"endianness", G_TYPE_INT, G_BYTE_ORDER,
NULL);
@@ -506,10 +506,10 @@ add_channels (GstStructure *structure, gint min_rate, gint max_rate,
* @rate: allowed rates if < 0, else desired rate
* @channels: all allowed values for channels if < 0, else desired channels
*/
-GstCaps2 *
+GstCaps *
gst_alsa_caps (snd_pcm_format_t format, gint rate, gint channels)
{
- GstCaps2 *ret_caps;
+ GstCaps *ret_caps;
if (format != SND_PCM_FORMAT_UNKNOWN) {
/* there are some caps set already */
@@ -517,22 +517,22 @@ gst_alsa_caps (snd_pcm_format_t format, gint rate, gint channels)
/* we can never use a format we can't set caps for */
g_assert (ret_caps != NULL);
- g_assert (gst_caps2_get_n_structures (ret_caps) == 1);
+ g_assert (gst_caps_get_size (ret_caps) == 1);
- add_channels (gst_caps2_get_nth_cap (ret_caps, 0), rate, -1, channels, -1);
+ add_channels (gst_caps_get_structure (ret_caps, 0), rate, -1, channels, -1);
} else {
int i;
- GstCaps2 *temp;
+ GstCaps *temp;
- ret_caps = gst_caps2_new_empty ();
+ ret_caps = gst_caps_new_empty ();
for (i = 0; i <= SND_PCM_FORMAT_LAST; i++) {
temp = gst_alsa_get_caps_internal (i);
/* can be NULL, because not all alsa formats can be specified as caps */
if (temp != NULL) {
- g_assert (gst_caps2_get_n_structures (temp) == 1);
- add_channels (gst_caps2_get_nth_cap (temp, 0), rate, -1, channels, -1);
- gst_caps2_append (ret_caps, temp);
+ g_assert (gst_caps_get_size (temp) == 1);
+ add_channels (gst_caps_get_structure (temp, 0), rate, -1, channels, -1);
+ gst_caps_append (ret_caps, temp);
}
}
}
@@ -541,7 +541,7 @@ gst_alsa_caps (snd_pcm_format_t format, gint rate, gint channels)
}
/* Return better caps when device is open */
-GstCaps2 *
+GstCaps *
gst_alsa_get_caps (GstPad *pad)
{
GstAlsa *this;
@@ -550,7 +550,7 @@ gst_alsa_get_caps (GstPad *pad)
int i;
unsigned int min_rate, max_rate;
gint min_channels, max_channels;
- GstCaps2 *ret = NULL;
+ GstCaps *ret = NULL;
g_return_val_if_fail (pad != NULL, NULL);
@@ -586,12 +586,12 @@ gst_alsa_get_caps (GstPad *pad)
snd_pcm_hw_params_get_format_mask (hw_params, mask);
for (i = 0; i <= SND_PCM_FORMAT_LAST; i++) {
if (snd_pcm_format_mask_test (mask, i)) {
- GstCaps2 *caps = gst_alsa_get_caps_internal (i);
+ GstCaps *caps = gst_alsa_get_caps_internal (i);
/* we can never use a format we can't set caps for */
if (caps != NULL) {
- g_assert (gst_caps2_get_n_structures (caps) == 1);
- add_channels (gst_caps2_get_nth_cap (caps, 0), min_rate, max_rate, min_channels, max_channels);
- gst_caps2_append (ret, caps);
+ g_assert (gst_caps_get_size (caps) == 1);
+ add_channels (gst_caps_get_structure (caps, 0), min_rate, max_rate, min_channels, max_channels);
+ gst_caps_append (ret, caps);
}
}
}
@@ -601,7 +601,7 @@ gst_alsa_get_caps (GstPad *pad)
/* Negotiates the caps */
GstPadLinkReturn
-gst_alsa_link (GstPad *pad, const GstCaps2 *caps)
+gst_alsa_link (GstPad *pad, const GstCaps *caps)
{
GstAlsa *this;
GstAlsaFormat *format;
@@ -616,7 +616,7 @@ gst_alsa_link (GstPad *pad, const GstCaps2 *caps)
if (!gst_alsa_open_audio (this))
return GST_PAD_LINK_REFUSED;
- format = gst_alsa_get_format (gst_caps2_get_nth_cap (caps, 0));
+ format = gst_alsa_get_format (gst_caps_get_structure (caps, 0));
if (format == NULL)
return GST_PAD_LINK_REFUSED;
@@ -643,17 +643,17 @@ gst_alsa_link (GstPad *pad, const GstCaps2 *caps)
continue;
if (gst_pad_try_set_caps (this->pad[i], caps) == GST_PAD_LINK_REFUSED) {
if (this->format) {
- GstCaps2 *old = gst_alsa_caps (this->format->format, this->format->rate, this->format->channels);
+ GstCaps *old = gst_alsa_caps (this->format->format, this->format->rate, this->format->channels);
for (--i; i >= 0; i--) {
if (gst_pad_try_set_caps (this->pad[i], old) == GST_PAD_LINK_REFUSED) {
gst_element_error (GST_ELEMENT (this), "error resetting caps to sane value");
- gst_caps2_free (old);
+ gst_caps_free (old);
break;
} else {
/* FIXME: unset caps on pads somehow */
}
}
- gst_caps2_free (old);
+ gst_caps_free (old);
ret = GST_PAD_LINK_REFUSED;
goto out;
}
diff --git a/ext/alsa/gstalsa.h b/ext/alsa/gstalsa.h
index b43fa6538..ce6e7fbd9 100644
--- a/ext/alsa/gstalsa.h
+++ b/ext/alsa/gstalsa.h
@@ -171,9 +171,9 @@ GType gst_alsa_get_type (void);
void gst_alsa_set_eos (GstAlsa * this);
GstPadLinkReturn gst_alsa_link (GstPad * pad,
- const GstCaps2 * caps);
-GstCaps2 * gst_alsa_get_caps (GstPad * pad);
-GstCaps2 * gst_alsa_caps (snd_pcm_format_t format,
+ const GstCaps * caps);
+GstCaps * gst_alsa_get_caps (GstPad * pad);
+GstCaps * gst_alsa_caps (snd_pcm_format_t format,
gint rate,
gint channels);
diff --git a/ext/alsa/gstalsasrc.c b/ext/alsa/gstalsasrc.c
index eebcaca2e..781e70ac2 100644
--- a/ext/alsa/gstalsasrc.c
+++ b/ext/alsa/gstalsasrc.c
@@ -239,7 +239,7 @@ gst_alsa_src_adjust_rate (gint rate, gboolean aggressive)
static gboolean
gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
{
- GstCaps2 *all_caps, *caps;
+ GstCaps *all_caps, *caps;
GstStructure *structure, *walk;
gint channels, min_channels, max_channels;
gint rate, min_rate, max_rate;
@@ -251,7 +251,7 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
if (all_caps == NULL) return FALSE;
/* now intersect this with all caps of the peers... */
for (i = 0; i < GST_ELEMENT (src)->numpads; i++) {
- all_caps = gst_caps2_intersect (all_caps, gst_pad_get_caps (this->pad[i]));
+ all_caps = gst_caps_intersect (all_caps, gst_pad_get_caps (this->pad[i]));
if (all_caps == NULL) {
GST_DEBUG ("No compatible caps found in alsasrc (%s)", GST_ELEMENT_NAME (this));
return FALSE;
@@ -259,14 +259,14 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
}
/* construct caps */
- caps = gst_caps2_new_simple ("audio/x-raw-int",
+ caps = gst_caps_new_simple ("audio/x-raw-int",
NULL);
- g_assert (gst_caps2_get_n_structures (caps) == 1);
- structure = gst_caps2_get_nth_cap (caps, 0);
+ g_assert (gst_caps_get_size (caps) == 1);
+ structure = gst_caps_get_structure (caps, 0);
/* now try to find the best match */
- for (i = 0; i < gst_caps2_get_n_structures (all_caps); i++) {
- walk = gst_caps2_get_nth_cap (all_caps, i);
+ for (i = 0; i < gst_caps_get_size (all_caps); i++) {
+ walk = gst_caps_get_structure (all_caps, i);
if (!(gst_structure_get_int (walk, "signed", &sign) &&
gst_structure_get_int (walk, "width", &width) &&
gst_structure_get_int (walk, "depth", &depth))) {
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
index 657216020..df6eea45e 100644
--- a/ext/ogg/gstoggdemux.c
+++ b/ext/ogg/gstoggdemux.c
@@ -87,7 +87,7 @@ GST_STATIC_PAD_TEMPLATE (
"src",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static GstStaticPadTemplate ogg_demux_sink_template_factory =
@@ -132,7 +132,7 @@ static void gst_ogg_demux_push (GstOggDemux * ogg,
static void gst_ogg_pad_push (GstOggDemux * ogg,
GstOggPad * ogg_pad);
-static GstCaps2 * gst_ogg_type_find (ogg_packet * packet);
+static GstCaps * gst_ogg_type_find (ogg_packet * packet);
static GstElementClass *parent_class = NULL;
@@ -434,7 +434,7 @@ gst_ogg_pad_push (GstOggDemux *ogg, GstOggPad *pad)
break;
case 1: {
if (!pad->pad) {
- GstCaps2 *caps = gst_ogg_type_find (&packet);
+ GstCaps *caps = gst_ogg_type_find (&packet);
gchar *name = g_strdup_printf ("serial %d", pad->serial);
pad->pad = gst_pad_new_from_template (
@@ -514,7 +514,7 @@ gst_ogg_demux_change_state (GstElement *element)
typedef struct {
ogg_packet * packet;
guint best_probability;
- GstCaps2 * caps;
+ GstCaps * caps;
} OggTypeFind;
static guint8 *
ogg_find_peek (gpointer data, gint64 offset, guint size)
@@ -528,16 +528,16 @@ ogg_find_peek (gpointer data, gint64 offset, guint size)
}
}
static void
-ogg_find_suggest (gpointer data, guint probability, const GstCaps2 *caps)
+ogg_find_suggest (gpointer data, guint probability, const GstCaps *caps)
{
OggTypeFind *find = (OggTypeFind *) data;
if (probability > find->best_probability) {
- gst_caps2_replace (&find->caps, gst_caps2_copy (caps));
+ gst_caps_replace (&find->caps, gst_caps_copy (caps));
find->best_probability = probability;
}
}
-static GstCaps2 *
+static GstCaps *
gst_ogg_type_find (ogg_packet *packet)
{
GstTypeFind gst_find;
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/vorbis/vorbisenc.c b/ext/vorbis/vorbisenc.c
index ede308cc1..6ff6026cb 100644
--- a/ext/vorbis/vorbisenc.c
+++ b/ext/vorbis/vorbisenc.c
@@ -129,17 +129,17 @@ vorbisenc_get_type (void)
return vorbisenc_type;
}
-static GstCaps2*
+static GstCaps*
vorbis_caps_factory (void)
{
- return gst_caps2_new_simple ("application/ogg", NULL);
+ return gst_caps_new_simple ("application/ogg", NULL);
}
-static GstCaps2*
+static GstCaps*
raw_caps_factory (void)
{
return
- 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,
@@ -153,7 +153,7 @@ static void
gst_vorbisenc_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- GstCaps2 *raw_caps, *vorbis_caps;
+ GstCaps *raw_caps, *vorbis_caps;
raw_caps = raw_caps_factory ();
vorbis_caps = vorbis_caps_factory ();
@@ -213,14 +213,14 @@ gst_vorbisenc_class_init (VorbisEncClass * klass)
}
static GstPadLinkReturn
-gst_vorbisenc_sinkconnect (GstPad * pad, const GstCaps2 * caps)
+gst_vorbisenc_sinkconnect (GstPad * pad, const GstCaps * caps)
{
VorbisEnc *vorbisenc;
GstStructure *structure;
vorbisenc = GST_VORBISENC (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", &vorbisenc->channels);
gst_structure_get_int (structure, "rate", &vorbisenc->frequency);
diff --git a/ext/vorbis/vorbisfile.c b/ext/vorbis/vorbisfile.c
index ebbcd03d9..f43c8c71b 100644
--- a/ext/vorbis/vorbisfile.c
+++ b/ext/vorbis/vorbisfile.c
@@ -66,8 +66,8 @@ struct _VorbisFile {
guint64 offset;
gulong blocksize;
- GstCaps2 *metadata;
- GstCaps2 *streaminfo;
+ GstCaps *metadata;
+ GstCaps *streaminfo;
};
struct _VorbisFileClass {
@@ -175,16 +175,16 @@ vorbisfile_get_type (void)
return vorbisfile_type;
}
-static GstCaps2*
+static GstCaps*
vorbis_caps_factory (void)
{
- return gst_caps2_new_simple ("application/ogg", NULL);
+ return gst_caps_new_simple ("application/ogg", NULL);
}
-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,
@@ -194,10 +194,10 @@ raw_caps_factory (void)
NULL);
}
-static GstCaps2*
+static GstCaps*
raw_caps2_factory (void)
{
- return gst_caps2_new_simple ("audio/x-raw-float",
+ return gst_caps_new_simple ("audio/x-raw-float",
"width", G_TYPE_INT, 32,
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"rate", GST_TYPE_INT_RANGE, 11025, 48000,
@@ -210,7 +210,7 @@ static void
gst_vorbisfile_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- GstCaps2 *raw_caps, *vorbis_caps, *raw_caps2;
+ GstCaps *raw_caps, *vorbis_caps, *raw_caps2;
raw_caps = raw_caps_factory ();
raw_caps2 = raw_caps2_factory ();
@@ -219,7 +219,7 @@ gst_vorbisfile_base_init (gpointer g_class)
gst_vorbisdec_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK,
GST_PAD_ALWAYS,
vorbis_caps);
- gst_caps2_append (raw_caps2, raw_caps);
+ gst_caps_append (raw_caps2, raw_caps);
gst_vorbisdec_src_template = gst_pad_template_new ("src", GST_PAD_SRC,
GST_PAD_ALWAYS,
raw_caps2);
@@ -415,7 +415,7 @@ ov_callbacks vorbisfile_ov_callbacks =
};
#if 0
-/* retrieve the comment field (or tags) and put in metadata GstCaps2
+/* retrieve the comment field (or tags) and put in metadata GstCaps
* returns TRUE if caps could be set,
* FALSE if they couldn't be read somehow */
static gboolean
@@ -457,7 +457,7 @@ gst_vorbisfile_update_metadata (VorbisFile *vorbisfile, gint link)
return TRUE;
}
-/* retrieve logical stream properties and put them in streaminfo GstCaps2
+/* retrieve logical stream properties and put them in streaminfo GstCaps
* returns TRUE if caps could be set,
* FALSE if they couldn't be read somehow */
static gboolean
@@ -510,13 +510,13 @@ static gboolean
gst_vorbisfile_new_link (VorbisFile *vorbisfile, gint link)
{
vorbis_info *vi = ov_info (&vorbisfile->vf, link);
- GstCaps2 *caps;
+ GstCaps *caps;
gboolean res = TRUE;
/* new logical bitstream */
vorbisfile->current_link = link;
- caps = gst_caps2_new_simple ("audio/x-raw-int",
+ caps = 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,
@@ -528,7 +528,7 @@ gst_vorbisfile_new_link (VorbisFile *vorbisfile, gint link)
if (gst_pad_try_set_caps (vorbisfile->srcpad, caps) <= 0) {
res = FALSE;
}
- gst_caps2_free (caps);
+ gst_caps_free (caps);
return res;
}
diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c
index f3c85a59f..bec298e93 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 adbb97485..46e7c7de6 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 f5bb7eaa4..4723c329a 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 b613ab86c..c7f470eaa 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 24da73332..0a7aa5009 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 8e0c1f72e..5a73c8bd7 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 d22bdbb46..e214e8e10 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 069bfd7c0..d42a4af7b 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 e4c652a54..061f125c7 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 e4c652a54..061f125c7 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 dd787001b..513a3e12d 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 79db94202..7c200896c 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 1607fc3a3..256ed9479 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 17daf0241..815b3a7b6 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 cf8c379bc..a0f92e3e0 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/gstvideofilter.c b/gst-libs/gst/video/gstvideofilter.c
index 4597f5ed5..86ab15a0f 100644
--- a/gst-libs/gst/video/gstvideofilter.c
+++ b/gst-libs/gst/video/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-libs/gst/video/gstvideofilter.h b/gst-libs/gst/video/gstvideofilter.h
index f8443d9e4..9ec7593e5 100644
--- a/gst-libs/gst/video/gstvideofilter.h
+++ b/gst-libs/gst/video/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-libs/gst/video/video.c b/gst-libs/gst/video/video.c
index 2fc54003a..6d804a4d4 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);
diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c
index 238e432bb..bd79d380d 100644
--- a/gst/adder/gstadder.c
+++ b/gst/adder/gstadder.c
@@ -206,7 +206,7 @@ gst_adder_parse_caps (GstAdder *adder, GstStructure *structure)
}
static GstPadLinkReturn
-gst_adder_link (GstPad *pad, const GstCaps2 *caps)
+gst_adder_link (GstPad *pad, const GstCaps *caps)
{
GstAdder *adder;
const GList *sinkpads;
@@ -219,7 +219,7 @@ gst_adder_link (GstPad *pad, const GstCaps2 *caps)
adder = GST_ADDER (GST_PAD_PARENT (pad));
- if (!gst_adder_parse_caps (adder, gst_caps2_get_nth_cap (caps, 0)))
+ if (!gst_adder_parse_caps (adder, gst_caps_get_structure (caps, 0)))
return GST_PAD_LINK_REFUSED;
if (pad == adder->srcpad || gst_pad_try_set_caps (adder->srcpad, caps) > 0) {
@@ -524,7 +524,7 @@ gst_adder_loop (GstElement *element)
}
if (adder->format == GST_ADDER_FORMAT_UNSET) {
- GstCaps2 *caps = gst_caps2_from_string (GST_AUDIO_INT_PAD_TEMPLATE_CAPS);
+ GstCaps *caps = gst_caps_from_string (GST_AUDIO_INT_PAD_TEMPLATE_CAPS);
if (gst_pad_try_set_caps (adder->srcpad, caps) < 0) {
gst_element_error (GST_ELEMENT (adder),
@@ -533,7 +533,7 @@ gst_adder_loop (GstElement *element)
return;
}
- gst_adder_parse_caps (adder, gst_caps2_get_nth_cap(caps, 0));
+ gst_adder_parse_caps (adder, gst_caps_get_structure(caps, 0));
}
GST_BUFFER_TIMESTAMP (buf_out) = adder->timestamp;
diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c
index 22ca3bf15..3618fd239 100644
--- a/gst/audioconvert/gstaudioconvert.c
+++ b/gst/audioconvert/gstaudioconvert.c
@@ -29,7 +29,7 @@
#if 0
static void
-print_caps (GstCaps2 *caps)
+print_caps (GstCaps *caps)
{
GValue v = { 0, };
GValue s = { 0, };
@@ -121,7 +121,7 @@ static void gst_audio_convert_get_property (GObject *object, guint prop_id, GVa
/* gstreamer functions */
static void gst_audio_convert_chain (GstPad *pad, GstData *_data);
-static GstPadLinkReturn gst_audio_convert_link (GstPad *pad, const GstCaps2 *caps);
+static GstPadLinkReturn gst_audio_convert_link (GstPad *pad, const GstCaps *caps);
static GstElementStateReturn gst_audio_convert_change_state (GstElement *element);
/* actual work */
@@ -373,7 +373,7 @@ gst_audio_convert_chain (GstPad *pad, GstData *_data)
}
static GstPadLinkReturn
-gst_audio_convert_link (GstPad *pad, const GstCaps2 *caps)
+gst_audio_convert_link (GstPad *pad, const GstCaps *caps)
{
GstAudioConvert *this;
gint nr = 0;
@@ -389,7 +389,7 @@ gst_audio_convert_link (GstPad *pad, const GstCaps2 *caps)
nr = (pad == this->sink) ? 0 : (pad == this->src) ? 1 : -1;
g_assert (nr > -1);
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
ret = gst_structure_get_int (structure, "channels", &channels);
ret &= gst_structure_get_boolean (structure, "signed", &sign);
@@ -442,12 +442,12 @@ gst_audio_convert_change_state (GstElement *element)
/*** ACTUAL WORK **************************************************************/
-static GstCaps2 *
+static GstCaps *
make_caps (gint endianness, gboolean sign, gint depth, gint width, gint rate, gint channels)
{
- GstCaps2 *caps;
+ GstCaps *caps;
- caps = gst_caps2_new_simple ("audio/x-raw-int",
+ caps = gst_caps_new_simple ("audio/x-raw-int",
"signed", G_TYPE_BOOLEAN, sign,
"depth", G_TYPE_INT, depth,
"width", G_TYPE_INT, width * 8,
@@ -455,7 +455,7 @@ make_caps (gint endianness, gboolean sign, gint depth, gint width, gint rate, gi
"channels", G_TYPE_INT, channels, NULL);
if (width != 1) {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"endianness", G_TYPE_INT, endianness, NULL);
}
@@ -465,7 +465,7 @@ make_caps (gint endianness, gboolean sign, gint depth, gint width, gint rate, gi
static gboolean
gst_audio_convert_set_caps (GstPad *pad)
{
- GstCaps2 *caps;
+ GstCaps *caps;
gint nr;
GstPadLinkReturn ret;
GstAudioConvert *this;
diff --git a/gst/audioscale/gstaudioscale.c b/gst/audioscale/gstaudioscale.c
index 9f6626e52..6ce077bcc 100644
--- a/gst/audioscale/gstaudioscale.c
+++ b/gst/audioscale/gstaudioscale.c
@@ -157,12 +157,12 @@ gst_audioscale_class_init (AudioscaleClass *klass)
parent_class = g_type_class_ref(GST_TYPE_ELEMENT);
}
-static GstCaps2 *
+static GstCaps *
gst_audioscale_getcaps (GstPad *pad)
{
Audioscale *audioscale;
- GstCaps2 *peercaps;
- GstCaps2 *caps;
+ GstCaps *peercaps;
+ GstCaps *caps;
int i;
int n;
@@ -174,16 +174,16 @@ gst_audioscale_getcaps (GstPad *pad)
peercaps = gst_pad_get_allowed_caps (audioscale->srcpad);
}
- caps = gst_caps2_intersect (peercaps, gst_static_caps2_get (
+ caps = gst_caps_intersect (peercaps, gst_static_caps_get (
&gst_audioscale_sink_template.static_caps));
- if (gst_caps2_is_empty(caps)) return caps;
+ if (gst_caps_is_empty(caps)) return caps;
/* we do this hack, because the audioscale lib doesn't handle
* rate conversions larger than a factor of 2 */
- n = gst_caps2_get_n_structures (caps);
+ n = gst_caps_get_size (caps);
for (i=0;i<n;i++){
int rate_min, rate_max;
- GstStructure *structure = gst_caps2_get_nth_cap (caps, i);
+ GstStructure *structure = gst_caps_get_structure (caps, i);
const GValue *value;
value = gst_structure_get_value (structure, "rate");
@@ -207,7 +207,7 @@ gst_audioscale_getcaps (GstPad *pad)
}
static GstPadLinkReturn
-gst_audioscale_link (GstPad * pad, const GstCaps2 * caps)
+gst_audioscale_link (GstPad * pad, const GstCaps * caps)
{
Audioscale *audioscale;
resample_t *r;
@@ -229,7 +229,7 @@ gst_audioscale_link (GstPad * pad, const GstCaps2 * caps)
audioscale->passthru = FALSE;
- 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);
diff --git a/gst/sine/gstsinesrc.c b/gst/sine/gstsinesrc.c
index 22d7cf856..9c6dde929 100644
--- a/gst/sine/gstsinesrc.c
+++ b/gst/sine/gstsinesrc.c
@@ -82,7 +82,7 @@ static void gst_sinesrc_get_property (GObject *object,
GParamSpec *pspec);
static GstPadLinkReturn
gst_sinesrc_link (GstPad *pad,
- const GstCaps2 *caps);
+ const GstCaps *caps);
static GstElementStateReturn
gst_sinesrc_change_state (GstElement *element);
@@ -99,7 +99,7 @@ static gboolean gst_sinesrc_src_query (GstPad *pad,
gint64 *value);
static GstData* gst_sinesrc_get (GstPad *pad);
-static GstCaps2 * gst_sinesrc_src_fixate (GstPad *pad, const GstCaps2 *caps, gpointer user_data);
+static GstCaps * gst_sinesrc_src_fixate (GstPad *pad, const GstCaps *caps, gpointer user_data);
static GstElementClass *parent_class = NULL;
/*static guint gst_sinesrc_signals[LAST_SIGNAL] = { 0 }; */
@@ -217,26 +217,26 @@ gst_sinesrc_init (GstSineSrc *src)
}
-static GstCaps2 *
-gst_sinesrc_src_fixate (GstPad *pad, const GstCaps2 *caps,
+static GstCaps *
+gst_sinesrc_src_fixate (GstPad *pad, const GstCaps *caps,
gpointer user_data)
{
GstStructure *structure;
- GstCaps2 *newcaps;
+ GstCaps *newcaps;
- structure = gst_structure_copy (gst_caps2_get_nth_cap (caps, 0));
- newcaps = gst_caps2_new_full (structure, NULL);
+ structure = gst_structure_copy (gst_caps_get_structure (caps, 0));
+ newcaps = gst_caps_new_full (structure, NULL);
- if (gst_caps2_structure_fixate_field_nearest_int (structure, "rate", 44100)) {
+ if (gst_caps_structure_fixate_field_nearest_int (structure, "rate", 44100)) {
return newcaps;
}
- gst_caps2_free (newcaps);
+ gst_caps_free (newcaps);
return NULL;
}
static GstPadLinkReturn
-gst_sinesrc_link (GstPad *pad, const GstCaps2 *caps)
+gst_sinesrc_link (GstPad *pad, const GstCaps *caps)
{
GstSineSrc *sinesrc;
const GstStructure *structure;
@@ -245,7 +245,7 @@ gst_sinesrc_link (GstPad *pad, const GstCaps2 *caps)
GST_DEBUG ("gst_sinesrc_src_link");
sinesrc = GST_SINESRC (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", &sinesrc->samplerate);
@@ -497,7 +497,7 @@ gst_sinesrc_update_table_inc (GstSineSrc *src)
static gboolean
gst_sinesrc_force_caps (GstSineSrc *src)
{
- static GstStaticCaps2 static_caps = GST_STATIC_CAPS ("audio/x-raw-int, "
+ static GstStaticCaps static_caps = GST_STATIC_CAPS ("audio/x-raw-int, "
"endianness = (int) BYTE_ORDER, "
"signed = (boolean) true, "
"width = (int) 16, "
@@ -505,15 +505,15 @@ gst_sinesrc_force_caps (GstSineSrc *src)
"rate = (int) [ 8000, 48000 ], "
"channels = (int) 1"
);
- GstCaps2 *caps;
+ GstCaps *caps;
GstStructure *structure;
if (!src->newcaps)
return TRUE;
- caps = gst_caps2_copy (gst_static_caps2_get (&static_caps));
+ caps = gst_caps_copy (gst_static_caps_get (&static_caps));
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
gst_structure_set (structure, "rate", G_TYPE_INT, src->samplerate, NULL);
diff --git a/gst/tags/gstvorbistag.c b/gst/tags/gstvorbistag.c
index d7301a709..ce1b1e756 100644
--- a/gst/tags/gstvorbistag.c
+++ b/gst/tags/gstvorbistag.c
@@ -509,14 +509,14 @@ gst_vorbis_tag_chain (GstPad *pad, GstData *data)
if (tag->output == OUTPUT_UNKNOWN) {
/* caps nego */
do {
- if (gst_pad_try_set_caps (tag->srcpad, gst_caps2_new_simple (
+ if (gst_pad_try_set_caps (tag->srcpad, gst_caps_new_simple (
"audio/x-vorbis", NULL)) >= 0) {
tag->output = OUTPUT_DATA;
- } else if (gst_pad_try_set_caps (tag->srcpad, gst_caps2_new_simple (
+ } else if (gst_pad_try_set_caps (tag->srcpad, gst_caps_new_simple (
"application/x-gst-tags", NULL)) >= 0) {
tag->output = OUTPUT_TAGS;
} else {
- const GstCaps2 *caps = gst_static_caps2_get (
+ const GstCaps *caps = gst_static_caps_get (
&gst_vorbis_tag_src_template.static_caps);
if (gst_pad_recover_caps_error (tag->srcpad, caps))
continue;
diff --git a/gst/tcp/gsttcpsink.c b/gst/tcp/gsttcpsink.c
index 10eff4d62..50da3e2fd 100644
--- a/gst/tcp/gsttcpsink.c
+++ b/gst/tcp/gsttcpsink.c
@@ -146,7 +146,7 @@ gst_tcpsink_class_init (GstTCPSink *klass)
static GstPadLinkReturn
-gst_tcpsink_sink_link (GstPad *pad, const GstCaps2 *caps)
+gst_tcpsink_sink_link (GstPad *pad, const GstCaps *caps)
{
GstTCPSink *tcpsink;
struct sockaddr_in serv_addr;
@@ -191,7 +191,7 @@ gst_tcpsink_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);
if ((fd = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
perror("socket");
diff --git a/gst/tcp/gsttcpsrc.c b/gst/tcp/gsttcpsrc.c
index 099fc617d..6fa7a2ce3 100644
--- a/gst/tcp/gsttcpsrc.c
+++ b/gst/tcp/gsttcpsrc.c
@@ -213,7 +213,7 @@ gst_tcpsrc_get (GstPad *pad)
{
guchar *buf=NULL;
xmlDocPtr doc;
- GstCaps2 *caps;
+ GstCaps *caps;
switch (tcpsrc->control) {
case CONTROL_TCP:
@@ -235,7 +235,7 @@ gst_tcpsrc_get (GstPad *pad)
else {
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 (tcpsrc->srcpad, caps);
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c
index e28032027..188cf8843 100644
--- a/gst/typefind/gsttypefindfunctions.c
+++ b/gst/typefind/gsttypefindfunctions.c
@@ -38,8 +38,8 @@ GST_DEBUG_CATEGORY_STATIC (type_find_debug);
/*** text/plain ****************************************************************/
-static GstStaticCaps2 utf8_caps = GST_STATIC_CAPS ("text/plain");
-#define UTF8_CAPS gst_caps2_copy(gst_static_caps2_get(&utf8_caps))
+static GstStaticCaps utf8_caps = GST_STATIC_CAPS ("text/plain");
+#define UTF8_CAPS gst_caps_copy(gst_static_caps_get(&utf8_caps))
static void
utf8_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -68,8 +68,8 @@ utf8_type_find (GstTypeFind *tf, gpointer unused)
/*** text/uri-list ************************************************************/
-static GstStaticCaps2 uri_caps = GST_STATIC_CAPS ("text/uri-list");
-#define URI_CAPS gst_caps2_copy(gst_static_caps2_get(&uri_caps))
+static GstStaticCaps uri_caps = GST_STATIC_CAPS ("text/uri-list");
+#define URI_CAPS gst_caps_copy(gst_static_caps_get(&uri_caps))
#define BUFFER_SIZE 16 /* If the string is < 16 bytes we're screwed */
#define INC_BUFFER { \
pos++; \
@@ -130,8 +130,8 @@ uri_type_find (GstTypeFind *tf, gpointer unused)
/*** video/x-fli **************************************************************/
-static GstStaticCaps2 flx_caps = GST_STATIC_CAPS ("video/x-fli");
-#define FLX_CAPS gst_caps2_copy(gst_static_caps2_get(&flx_caps))
+static GstStaticCaps flx_caps = GST_STATIC_CAPS ("video/x-fli");
+#define FLX_CAPS gst_caps_copy(gst_static_caps_get(&flx_caps))
static void
flx_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -161,8 +161,8 @@ flx_type_find (GstTypeFind *tf, gpointer unused)
/*** application/x-id3 **************************************************************/
-static GstStaticCaps2 id3_caps = GST_STATIC_CAPS ("application/x-id3");
-#define ID3_CAPS gst_caps2_copy(gst_static_caps2_get(&id3_caps))
+static GstStaticCaps id3_caps = GST_STATIC_CAPS ("application/x-id3");
+#define ID3_CAPS gst_caps_copy(gst_static_caps_get(&id3_caps))
static void
id3_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -300,9 +300,9 @@ mp3_type_frame_length_from_header (guint32 header, guint *put_layer,
}
-static GstStaticCaps2 mp3_caps = GST_STATIC_CAPS ("audio/mpeg, "
+static GstStaticCaps mp3_caps = GST_STATIC_CAPS ("audio/mpeg, "
"mpegversion = (int) 1, layer = (int) [ 1, 3 ]");
-#define MP3_CAPS gst_caps2_copy(gst_static_caps2_get(&mp3_caps))
+#define MP3_CAPS gst_caps_copy(gst_static_caps_get(&mp3_caps))
/*
* random values for typefinding
* if no more data is available, we will return a probability of
@@ -387,10 +387,10 @@ mp3_type_find (GstTypeFind *tf, gpointer unused)
}
g_assert (probability <= GST_TYPE_FIND_MAXIMUM);
if (probability > 0) {
- GstCaps2 *caps;
+ GstCaps *caps;
g_assert (layer > 0);
caps = MP3_CAPS;
- gst_structure_set (gst_caps2_get_nth_cap (caps, 0), "layer",
+ gst_structure_set (gst_caps_get_structure (caps, 0), "layer",
G_TYPE_INT, layer, 0);
gst_type_find_suggest (tf, probability, caps);
}
@@ -405,9 +405,9 @@ mp3_type_find (GstTypeFind *tf, gpointer unused)
/*** video/mpeg systemstream **************************************************/
-static GstStaticCaps2 mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, "
+static GstStaticCaps mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, "
"systemstream = (boolean) true, mpegversion = (int) [ 1, 2 ]");
-#define MPEG_SYS_CAPS gst_caps2_copy(gst_static_caps2_get(&mpeg_sys_caps))
+#define MPEG_SYS_CAPS gst_caps_copy(gst_static_caps_get(&mpeg_sys_caps))
#define IS_MPEG_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \
(((guint8 *)data)[1] == 0x00) && \
(((guint8 *)data)[2] == 0x01) && \
@@ -428,9 +428,9 @@ mpeg2_sys_type_find (GstTypeFind *tf, gpointer unused)
if (data && IS_MPEG_HEADER (data)) {
if ((data[4] & 0xC0) == 0x40) {
/* type 2 */
- GstCaps2 *caps;
+ GstCaps *caps;
caps = MPEG_SYS_CAPS;
- gst_structure_set (gst_caps2_get_nth_cap (caps, 0), "mpegversion",
+ gst_structure_set (gst_caps_get_structure (caps, 0), "mpegversion",
G_TYPE_INT, 2, 0);
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, caps);
}
@@ -519,7 +519,7 @@ mpeg1_sys_type_find (GstTypeFind *tf, gpointer unused)
guint8 *data = NULL;
guint size = 0;
guint64 skipped = 0;
- GstCaps2 *caps;
+ GstCaps *caps;
while (skipped < GST_MPEG_TYPEFIND_TRY_SYNC) {
if (size < 4) {
@@ -552,7 +552,7 @@ mpeg1_sys_type_find (GstTypeFind *tf, gpointer unused)
probability = GST_TYPE_FIND_MINIMUM;
g_assert (probability <= GST_TYPE_FIND_MAXIMUM);
caps = MPEG_SYS_CAPS;
- gst_structure_set (gst_caps2_get_nth_cap (caps, 0), "mpegversion",
+ gst_structure_set (gst_caps_get_structure (caps, 0), "mpegversion",
G_TYPE_INT, 1, 0);
gst_type_find_suggest (tf, probability, caps);
return;
@@ -566,9 +566,9 @@ mpeg1_sys_type_find (GstTypeFind *tf, gpointer unused)
/*** video/mpeg video stream **************************************************/
-static GstStaticCaps2 mpeg_video_caps = GST_STATIC_CAPS ("video/mpeg, "
+static GstStaticCaps mpeg_video_caps = GST_STATIC_CAPS ("video/mpeg, "
"systemstream = (boolean) false");
-#define MPEG_VIDEO_CAPS gst_caps2_copy(gst_static_caps2_get(&mpeg_video_caps))
+#define MPEG_VIDEO_CAPS gst_caps_copy(gst_static_caps_get(&mpeg_video_caps))
static void
mpeg_video_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -584,8 +584,8 @@ mpeg_video_type_find (GstTypeFind *tf, gpointer unused)
/*** video/quicktime***********************************************************/
-static GstStaticCaps2 qt_caps = GST_STATIC_CAPS ("video/quicktime");
-#define QT_CAPS gst_caps2_copy(gst_static_caps2_get(&qt_caps))
+static GstStaticCaps qt_caps = GST_STATIC_CAPS ("video/quicktime");
+#define QT_CAPS gst_caps_copy(gst_static_caps_get(&qt_caps))
static void
qt_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -618,8 +618,8 @@ qt_type_find (GstTypeFind *tf, gpointer unused)
/*** audio/x-aiff *********************************************/
-static GstStaticCaps2 aiff_caps = GST_STATIC_CAPS ("audio/x-aiff");
-#define AIFF_CAPS gst_caps2_copy(gst_static_caps2_get(&aiff_caps))
+static GstStaticCaps aiff_caps = GST_STATIC_CAPS ("audio/x-aiff");
+#define AIFF_CAPS gst_caps_copy(gst_static_caps_get(&aiff_caps))
static void
aiff_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -634,8 +634,8 @@ aiff_type_find (GstTypeFind *tf, gpointer unused)
/*** audio/x-shorten ****************************************/
-static GstStaticCaps2 shn_caps = GST_STATIC_CAPS ("audio/x-shorten");
-#define SHN_CAPS gst_caps2_copy(gst_static_caps2_get(&shn_caps))
+static GstStaticCaps shn_caps = GST_STATIC_CAPS ("audio/x-shorten");
+#define SHN_CAPS gst_caps_copy(gst_static_caps_get(&shn_caps))
static void
shn_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -651,8 +651,8 @@ shn_type_find (GstTypeFind *tf, gpointer unused)
/*** audio/x-m4a *********************************************/
-static GstStaticCaps2 aac_caps = GST_STATIC_CAPS ("audio/x-m4a");
-#define AAC_CAPS gst_caps2_copy(gst_static_caps2_get(&aac_caps))
+static GstStaticCaps aac_caps = GST_STATIC_CAPS ("audio/x-m4a");
+#define AAC_CAPS gst_caps_copy(gst_static_caps_get(&aac_caps))
static void
m4a_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -664,8 +664,8 @@ m4a_type_find (GstTypeFind *tf, gpointer unused)
/*** audio/x-mod *********************************************/
-static GstStaticCaps2 mod_caps = GST_STATIC_CAPS ("audio/x-mod");
-#define MOD_CAPS gst_caps2_copy(gst_static_caps2_get(&mod_caps))
+static GstStaticCaps mod_caps = GST_STATIC_CAPS ("audio/x-mod");
+#define MOD_CAPS gst_caps_copy(gst_static_caps_get(&mod_caps))
/* FIXME: M15 CheckType to do */
static void
mod_type_find (GstTypeFind *tf, gpointer unused)
@@ -782,8 +782,8 @@ mod_type_find (GstTypeFind *tf, gpointer unused)
/*** application/x-shockwave-flash ********************************************/
-static GstStaticCaps2 swf_caps = GST_STATIC_CAPS ("audio/x-shockwave-flash");
-#define SWF_CAPS gst_caps2_copy(gst_static_caps2_get(&swf_caps))
+static GstStaticCaps swf_caps = GST_STATIC_CAPS ("audio/x-shockwave-flash");
+#define SWF_CAPS gst_caps_copy(gst_static_caps_get(&swf_caps))
static void
swf_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -797,8 +797,8 @@ swf_type_find (GstTypeFind *tf, gpointer unused)
/*** image/jpeg ***************************************************************/
-static GstStaticCaps2 jpeg_caps = GST_STATIC_CAPS ("image/jpeg");
-#define JPEG_CAPS gst_caps2_copy(gst_static_caps2_get(&jpeg_caps))
+static GstStaticCaps jpeg_caps = GST_STATIC_CAPS ("image/jpeg");
+#define JPEG_CAPS gst_caps_copy(gst_static_caps_get(&jpeg_caps))
static void
jpeg_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -818,8 +818,8 @@ jpeg_type_find (GstTypeFind *tf, gpointer unused)
/*** image/bmp *********************/
-static GstStaticCaps2 bmp_caps = GST_STATIC_CAPS ("image/bmp");
-#define BMP_CAPS gst_caps2_copy(gst_static_caps2_get(&bmp_caps))
+static GstStaticCaps bmp_caps = GST_STATIC_CAPS ("image/bmp");
+#define BMP_CAPS gst_caps_copy(gst_static_caps_get(&bmp_caps))
static void
bmp_type_find (GstTypeFind *tf, gpointer unused)
{
@@ -838,15 +838,15 @@ bmp_type_find (GstTypeFind *tf, gpointer unused)
}
/*** image/tiff ********************/
-static GstStaticCaps2 tiff_caps = GST_STATIC_CAPS ("image/tiff, "
+static GstStaticCaps tiff_caps = GST_STATIC_CAPS ("image/tiff, "
"endianness = (int) { BIG_ENDIAN, LITTLE_ENDIAN }" );
-#define TIFF_CAPS gst_caps2_copy(gst_static_caps2_get(&tiff_caps))
-static GstStaticCaps2 tiff_be_caps = GST_STATIC_CAPS ("image/tiff, "
+#define TIFF_CAPS gst_caps_copy(gst_static_caps_get(&tiff_caps))
+static GstStaticCaps tiff_be_caps = GST_STATIC_CAPS ("image/tiff, "
"endianness = (int) BIG_ENDIAN");
-#define TIFF_BE_CAPS gst_caps2_copy(gst_static_caps2_get(&tiff_be_caps))
-static GstStaticCaps2 tiff_le_caps = GST_STATIC_CAPS ("image/tiff, "
+#define TIFF_BE_CAPS gst_caps_copy(gst_static_caps_get(&tiff_be_caps))
+static GstStaticCaps tiff_le_caps = GST_STATIC_CAPS ("image/tiff, "
"endianness = (int) LITTLE_ENDIAN");
-#define TIFF_LE_CAPS gst_caps2_copy(gst_static_caps2_get(&tiff_le_caps))
+#define TIFF_LE_CAPS gst_caps_copy(gst_static_caps_get(&tiff_le_caps))
static void
tiff_type_find (GstTypeFind *tf, gpointer ununsed)
{
@@ -865,9 +865,9 @@ tiff_type_find (GstTypeFind *tf, gpointer ununsed)
/*** video/x-dv ***************************************************************/
-static GstStaticCaps2 dv_caps = GST_STATIC_CAPS ("video/x-dv, "
+static GstStaticCaps dv_caps = GST_STATIC_CAPS ("video/x-dv, "
"systemstream = (boolean) true");
-#define DV_CAPS gst_caps2_copy(gst_static_caps2_get(&dv_caps))
+#define DV_CAPS gst_caps_copy(gst_static_caps_get(&dv_caps))
static void
dv_type_find (GstTypeFind *tf, gpointer private)
{
@@ -879,14 +879,14 @@ dv_type_find (GstTypeFind *tf, gpointer private)
if (data && (data[0] == 0x1f) && (data[1] == 0x07) && (data[2] == 0x00) &&
((data[4]&0x01) == 0)){
gchar *format;
- GstCaps2 *caps = DV_CAPS;
+ GstCaps *caps = DV_CAPS;
if (data[3] & 0x80) {
format = "PAL";
} else {
format = "NTSC";
}
- gst_structure_set (gst_caps2_get_nth_cap (caps, 0), "format",
+ gst_structure_set (gst_caps_get_structure (caps, 0), "format",
G_TYPE_STRING, format, NULL);
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, caps);
@@ -895,8 +895,8 @@ dv_type_find (GstTypeFind *tf, gpointer private)
/*** application/x-vorbis *****************************************************/
-static GstStaticCaps2 vorbis_caps = GST_STATIC_CAPS ("audio/x-vorbis");
-#define VORBIS_CAPS gst_caps2_copy(gst_static_caps2_get(&vorbis_caps))
+static GstStaticCaps vorbis_caps = GST_STATIC_CAPS ("audio/x-vorbis");
+#define VORBIS_CAPS gst_caps_copy(gst_static_caps_get(&vorbis_caps))
static void
vorbis_type_find (GstTypeFind *tf, gpointer private)
{
@@ -935,7 +935,7 @@ typedef struct {
guint8 * data;
guint size;
guint probability;
- GstCaps2 * caps;
+ GstCaps * caps;
} GstTypeFindData;
static void
start_with_type_find (GstTypeFind *tf, gpointer private)
@@ -944,7 +944,7 @@ start_with_type_find (GstTypeFind *tf, gpointer private)
guint8 *data;
GST_LOG ("trying to find mime type %s with the first %u bytes of data",
- gst_structure_get_name (gst_caps2_get_nth_cap(start_with->caps, 0)),
+ gst_structure_get_name (gst_caps_get_structure(start_with->caps, 0)),
start_with->size);
data = gst_type_find_peek (tf, 0, start_with->size);
if (data && memcmp (data, start_with->data, start_with->size)==0) {
@@ -957,7 +957,7 @@ G_BEGIN_DECLS{ \
sw_data->data = _data; \
sw_data->size = _size; \
sw_data->probability = _probability; \
- sw_data->caps = gst_caps2_new_simple (name, NULL); \
+ sw_data->caps = gst_caps_new_simple (name, NULL); \
TYPE_FIND_REGISTER (plugin, name, rank, start_with_type_find, \
ext, sw_data->caps, sw_data); \
}G_END_DECLS
@@ -982,7 +982,7 @@ G_BEGIN_DECLS{ \
sw_data->data = _data; \
sw_data->size = 4; \
sw_data->probability = GST_TYPE_FIND_MAXIMUM; \
- sw_data->caps = gst_caps2_new_simple (name, NULL); \
+ sw_data->caps = gst_caps_new_simple (name, NULL); \
TYPE_FIND_REGISTER (plugin, name, rank, riff_type_find, \
ext, sw_data->caps, sw_data); \
}G_END_DECLS
diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c
index cddf2b155..a29149a36 100644
--- a/gst/videoscale/gstvideoscale.c
+++ b/gst/videoscale/gstvideoscale.c
@@ -65,15 +65,15 @@ gst_videoscale_method_get_type (void)
return videoscale_method_type;
}
-static GstCaps2 *
+static GstCaps *
gst_videoscale_get_capslist(void)
{
- GstCaps2 *caps;
+ GstCaps *caps;
int i;
- caps = gst_caps2_new_empty();
+ caps = gst_caps_new_empty();
for(i=0;i<videoscale_n_formats;i++){
- gst_caps2_append_cap (caps,
+ gst_caps_append_structure (caps,
videoscale_get_structure (videoscale_formats + i));
}
@@ -102,7 +102,7 @@ static void gst_videoscale_set_property (GObject *object, guint prop_id, const
static void gst_videoscale_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void gst_videoscale_chain (GstPad *pad, GstData *_data);
-static GstCaps2 * gst_videoscale_get_capslist(void);
+static GstCaps * gst_videoscale_get_capslist(void);
static GstElementClass *parent_class = NULL;
/*static guint gst_videoscale_signals[LAST_SIGNAL] = { 0 }; */
@@ -159,12 +159,12 @@ gst_videoscale_class_init (GstVideoscaleClass *klass)
}
-static GstCaps2 *
+static GstCaps *
gst_videoscale_getcaps (GstPad *pad)
{
GstVideoscale *videoscale;
- GstCaps2 *peercaps;
- GstCaps2 *caps;
+ GstCaps *peercaps;
+ GstCaps *caps;
GstPad *otherpad;
int i;
@@ -187,9 +187,9 @@ gst_videoscale_getcaps (GstPad *pad)
GST_DEBUG_CAPS("othercaps are", peercaps);
- caps = gst_caps2_copy (peercaps);
- for(i=0;i<gst_caps2_get_n_structures(caps);i++) {
- GstStructure *structure = gst_caps2_get_nth_cap (caps, i);
+ caps = gst_caps_copy (peercaps);
+ for(i=0;i<gst_caps_get_size(caps);i++) {
+ GstStructure *structure = gst_caps_get_structure (caps, i);
gst_structure_set (structure,
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
@@ -204,11 +204,11 @@ gst_videoscale_getcaps (GstPad *pad)
static GstPadLinkReturn
-gst_videoscale_link (GstPad *pad, const GstCaps2 *caps)
+gst_videoscale_link (GstPad *pad, const GstCaps *caps)
{
GstVideoscale *videoscale;
GstPadLinkReturn ret;
- GstCaps2 *othercaps;
+ GstCaps *othercaps;
GstPad *otherpad;
GstStructure *structure;
@@ -231,7 +231,7 @@ gst_videoscale_link (GstPad *pad, const GstCaps2 *caps)
othercaps = GST_PAD_CAPS (otherpad);
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
if (pad == videoscale->srcpad) {
ret = gst_structure_get_int (structure, "width", &videoscale->to_width);
ret &= gst_structure_get_int (structure, "height", &videoscale->to_height);
diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c
index 017b9ebf0..8f37587b3 100644
--- a/gst/videotestsrc/gstvideotestsrc.c
+++ b/gst/videotestsrc/gstvideotestsrc.c
@@ -80,9 +80,9 @@ static gboolean gst_videotestsrc_src_query (GstPad *pad,
static GstElementClass *parent_class = NULL;
-static GstCaps2 * gst_videotestsrc_get_capslist (void);
+static GstCaps * gst_videotestsrc_get_capslist (void);
#if 0
-static GstCaps2 * gst_videotestsrc_get_capslist_size (int width, int height, double rate);
+static GstCaps * gst_videotestsrc_get_capslist_size (int width, int height, double rate);
#endif
@@ -193,40 +193,40 @@ gst_videotestsrc_set_clock (GstElement *element, GstClock *clock)
gst_object_replace ((GstObject **)&v->clock, (GstObject *)clock);
}
-static GstCaps2 *
-gst_videotestsrc_src_fixate (GstPad * pad, const GstCaps2 * caps,
+static GstCaps *
+gst_videotestsrc_src_fixate (GstPad * pad, const GstCaps * caps,
gpointer user_data)
{
GstStructure *structure;
- GstCaps2 *newcaps;
+ GstCaps *newcaps;
/* FIXME this function isn't very intelligent in choosing "good" caps */
- structure = gst_structure_copy(gst_caps2_get_nth_cap (caps, 0));
- newcaps = gst_caps2_new_full (structure, NULL);
+ structure = gst_structure_copy(gst_caps_get_structure (caps, 0));
+ newcaps = gst_caps_new_full (structure, NULL);
- if (gst_caps2_get_n_structures (caps) > 1) {
+ if (gst_caps_get_size (caps) > 1) {
return newcaps;
}
- if (gst_caps2_structure_fixate_field_nearest_int (structure, "width", 320)) {
+ if (gst_caps_structure_fixate_field_nearest_int (structure, "width", 320)) {
return newcaps;
}
- if (gst_caps2_structure_fixate_field_nearest_int (structure, "height", 240)) {
+ if (gst_caps_structure_fixate_field_nearest_int (structure, "height", 240)) {
return newcaps;
}
- if (gst_caps2_structure_fixate_field_nearest_double (structure, "framerate",
+ if (gst_caps_structure_fixate_field_nearest_double (structure, "framerate",
30.0)) {
return newcaps;
}
/* failed to fixate */
- gst_caps2_free (newcaps);
+ gst_caps_free (newcaps);
return NULL;
}
static GstPadLinkReturn
-gst_videotestsrc_src_link (GstPad * pad, const GstCaps2 * caps)
+gst_videotestsrc_src_link (GstPad * pad, const GstCaps * caps)
{
GstVideotestsrc *videotestsrc;
const GstStructure *structure;
@@ -235,7 +235,7 @@ gst_videotestsrc_src_link (GstPad * pad, const GstCaps2 * caps)
GST_DEBUG ("gst_videotestsrc_src_link");
videotestsrc = GST_VIDEOTESTSRC (gst_pad_get_parent (pad));
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
videotestsrc->fourcc = paintinfo_find_by_structure(structure);
if (!videotestsrc->fourcc) {
@@ -292,49 +292,49 @@ gst_videotestsrc_change_state (GstElement * element)
return parent_class->change_state (element);
}
-static GstCaps2 *
+static GstCaps *
gst_videotestsrc_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<n_fourccs;i++){
structure = paint_get_structure (fourcc_list + i);
gst_structure_set(structure,
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL);
- gst_caps2_append_cap (caps, structure);
+ gst_caps_append_structure (caps, structure);
}
return caps;
}
#if 0
-static GstCaps2 *
+static GstCaps *
gst_videotestsrc_get_capslist_size (int width, int height, double rate)
{
- GstCaps2 *caps;
+ GstCaps *caps;
GstStructure *structure;
int i;
- caps = gst_caps2_new_empty();
+ caps = gst_caps_new_empty();
for(i=0;i<n_fourccs;i++){
structure = paint_get_structure (fourcc_list + i);
gst_structure_set(structure,
"width", G_TYPE_INT, width,
"height", G_TYPE_INT, height,
"framerate", G_TYPE_INT, rate, NULL);
- gst_caps2_append_cap (caps, structure);
+ gst_caps_append_structure (caps, structure);
}
return caps;
}
#endif
-static GstCaps2 *
+static GstCaps *
gst_videotestsrc_getcaps (GstPad * pad)
{
GstVideotestsrc *vts;
diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c
index a86bd0711..fc4cff80d 100644
--- a/gst/volume/gstvolume.c
+++ b/gst/volume/gstvolume.c
@@ -103,7 +103,7 @@ static void volume_get_property (GObject *object, guint prop_id, GValue *va
static void volume_update_volume (const GValue *value, gpointer data);
static void volume_update_mute (const GValue *value, gpointer data);
-static gboolean volume_parse_caps (GstVolume *filter, GstCaps2 *caps);
+static gboolean volume_parse_caps (GstVolume *filter, GstCaps *caps);
static void volume_chain_float (GstPad *pad, GstData *_data);
static void volume_chain_int16 (GstPad *pad, GstData *_data);
@@ -112,7 +112,7 @@ static GstElementClass *parent_class = NULL;
/*static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; */
static GstPadLinkReturn
-volume_connect (GstPad *pad, GstCaps2 *caps)
+volume_connect (GstPad *pad, GstCaps *caps)
{
GstVolume *filter;
GstPad *otherpad;
@@ -139,7 +139,7 @@ volume_connect (GstPad *pad, GstCaps2 *caps)
}
static gboolean
-volume_parse_caps (GstVolume *filter, GstCaps2 *caps)
+volume_parse_caps (GstVolume *filter, GstCaps *caps)
{
const gchar *mimetype;
diff --git a/sys/v4l/gstv4lmjpegsink.c b/sys/v4l/gstv4lmjpegsink.c
index da608c1c2..308e25932 100644
--- a/sys/v4l/gstv4lmjpegsink.c
+++ b/sys/v4l/gstv4lmjpegsink.c
@@ -56,7 +56,7 @@ static void gst_v4lmjpegsink_init (GstV4lMjpegSink
/* the chain of buffers */
static GstPadLinkReturn gst_v4lmjpegsink_sinkconnect (GstPad *pad,
- const GstCaps2 *vscapslist);
+ const GstCaps *vscapslist);
static void gst_v4lmjpegsink_chain (GstPad *pad,
GstData *_data);
@@ -191,7 +191,7 @@ gst_v4lmjpegsink_init (GstV4lMjpegSink *v4lmjpegsink)
static GstPadLinkReturn
gst_v4lmjpegsink_sinkconnect (GstPad *pad,
- const GstCaps2 *vscapslist)
+ const GstCaps *vscapslist)
{
GstV4lMjpegSink *v4lmjpegsink;
GstStructure *structure;
@@ -204,7 +204,7 @@ gst_v4lmjpegsink_sinkconnect (GstPad *pad,
if (!gst_v4lmjpegsink_playback_deinit(v4lmjpegsink))
return GST_PAD_LINK_REFUSED;
- structure = gst_caps2_get_nth_cap (vscapslist, 0);
+ structure = gst_caps_get_structure (vscapslist, 0);
gst_structure_get_int (structure, "width", &v4lmjpegsink->width);
gst_structure_get_int (structure, "height", &v4lmjpegsink->height);
diff --git a/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c
index 01a2cc940..7a88c1a12 100644
--- a/sys/v4l/gstv4lmjpegsrc.c
+++ b/sys/v4l/gstv4lmjpegsrc.c
@@ -71,9 +71,9 @@ static gboolean gst_v4lmjpegsrc_srcconvert (GstPad *pad,
GstFormat *dest_format,
gint64 *dest_value);
static GstPadLinkReturn gst_v4lmjpegsrc_srcconnect (GstPad *pad,
- const GstCaps2 *caps);
+ const GstCaps *caps);
static GstData* gst_v4lmjpegsrc_get (GstPad *pad);
-static GstCaps2* gst_v4lmjpegsrc_getcaps (GstPad *pad);
+static GstCaps* gst_v4lmjpegsrc_getcaps (GstPad *pad);
/* get/set params */
static void gst_v4lmjpegsrc_set_property (GObject *object,
@@ -353,7 +353,7 @@ calc_bufsize (int hor_dec,
static GstPadLinkReturn
gst_v4lmjpegsrc_srcconnect (GstPad *pad,
- const GstCaps2 *caps)
+ const GstCaps *caps)
{
GstV4lMjpegSrc *v4lmjpegsrc = GST_V4LMJPEGSRC(gst_pad_get_parent(pad));
gint hor_dec, ver_dec;
@@ -381,7 +381,7 @@ gst_v4lmjpegsrc_srcconnect (GstPad *pad,
* our own mime type back and it'll work. Other properties are to be set
* by the src, not by the opposite caps */
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "width", &w);
gst_structure_get_int (structure, "height", &h);
@@ -552,7 +552,7 @@ gst_v4lmjpegsrc_get (GstPad *pad)
}
-static GstCaps2*
+static GstCaps*
gst_v4lmjpegsrc_getcaps (GstPad *pad)
{
GstV4lMjpegSrc *v4lmjpegsrc = GST_V4LMJPEGSRC(gst_pad_get_parent(pad));
@@ -562,7 +562,7 @@ gst_v4lmjpegsrc_getcaps (GstPad *pad)
return NULL;
}
- return gst_caps2_new_simple ("video/x-jpeg",
+ return gst_caps_new_simple ("video/x-jpeg",
"width", GST_TYPE_INT_RANGE, vcap->maxwidth/4, vcap->maxwidth,
"height", GST_TYPE_INT_RANGE, vcap->maxheight/4, vcap->maxheight,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE,
diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c
index 2af0247d4..62f94b1f4 100644
--- a/sys/v4l/gstv4lsrc.c
+++ b/sys/v4l/gstv4lsrc.c
@@ -64,8 +64,8 @@ static gboolean gst_v4lsrc_srcconvert (GstPad *pad,
GstFormat *dest_format,
gint64 *dest_value);
static GstPadLinkReturn gst_v4lsrc_srcconnect (GstPad *pad,
- const GstCaps2 *caps);
-static GstCaps2* gst_v4lsrc_getcaps (GstPad *pad);
+ const GstCaps *caps);
+static GstCaps* gst_v4lsrc_getcaps (GstPad *pad);
static GstData* gst_v4lsrc_get (GstPad *pad);
/* get/set params */
@@ -275,11 +275,11 @@ gst_v4lsrc_srcconvert (GstPad *pad,
return TRUE;
}
-static GstCaps2 *
+static GstCaps *
gst_v4lsrc_palette_to_caps (int palette)
{
guint32 fourcc;
- GstCaps2 *caps;
+ GstCaps *caps;
switch (palette) {
case VIDEO_PALETTE_YUV422:
@@ -308,7 +308,7 @@ gst_v4lsrc_palette_to_caps (int palette)
if (fourcc == GST_MAKE_FOURCC('R','G','B',' ')) {
switch (palette) {
case VIDEO_PALETTE_RGB555:
- caps = gst_caps2_from_string ("video/x-raw-rgb, "
+ caps = gst_caps_from_string ("video/x-raw-rgb, "
"bpp = (int) 16, "
"depth = (int) 15, "
"endianness = (int) BYTE_ORDER, "
@@ -317,7 +317,7 @@ gst_v4lsrc_palette_to_caps (int palette)
"blue_mask = 0x001f");
break;
case VIDEO_PALETTE_RGB565:
- caps = gst_caps2_from_string ("video/x-raw-rgb, "
+ caps = gst_caps_from_string ("video/x-raw-rgb, "
"bpp = (int) 16, "
"depth = (int) 16, "
"endianness = (int) BYTE_ORDER, "
@@ -326,7 +326,7 @@ gst_v4lsrc_palette_to_caps (int palette)
"blue_mask = 0x001f");
break;
case VIDEO_PALETTE_RGB24:
- caps = gst_caps2_from_string ("video/x-raw-rgb, "
+ caps = gst_caps_from_string ("video/x-raw-rgb, "
"bpp = (int) 24, "
"depth = (int) 24, "
"endianness = (int) BIG_ENDIAN, "
@@ -335,7 +335,7 @@ gst_v4lsrc_palette_to_caps (int palette)
"blue_mask = " B_MASK_24);
break;
case VIDEO_PALETTE_RGB32:
- caps = gst_caps2_from_string ("video/x-raw-rgb, "
+ caps = gst_caps_from_string ("video/x-raw-rgb, "
"bpp = (int) 24, "
"depth = (int) 32, "
"endianness = (int) BIG_ENDIAN, "
@@ -348,7 +348,7 @@ gst_v4lsrc_palette_to_caps (int palette)
return NULL;
}
} else {
- caps = gst_caps2_new_simple ("video/x-raw-yuv",
+ caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, fourcc, NULL);
}
@@ -357,11 +357,11 @@ gst_v4lsrc_palette_to_caps (int palette)
static GstPadLinkReturn
-gst_v4lsrc_srcconnect (GstPad *pad, const GstCaps2 *vscapslist)
+gst_v4lsrc_srcconnect (GstPad *pad, const GstCaps *vscapslist)
{
GstPadLinkReturn ret_val;
GstV4lSrc *v4lsrc;
- GstCaps2 *newcaps;
+ GstCaps *newcaps;
gint palette;
guint32 fourcc;
gint depth, w, h;
@@ -381,7 +381,7 @@ gst_v4lsrc_srcconnect (GstPad *pad, const GstCaps2 *vscapslist)
return GST_PAD_LINK_DELAYED;
}
- structure = gst_caps2_get_nth_cap (vscapslist, 0);
+ structure = gst_caps_get_structure (vscapslist, 0);
if (!strcmp(gst_structure_get_name (structure), "video/x-raw-yuv"))
gst_structure_get_fourcc (structure, "format", &fourcc);
@@ -444,7 +444,7 @@ gst_v4lsrc_srcconnect (GstPad *pad, const GstCaps2 *vscapslist)
/* try to connect the pad/caps with the actual width/height */
//newcaps = gst_v4lsrc_palette_to_caps_fixed(palette);
newcaps = gst_v4lsrc_palette_to_caps (palette);
- gst_caps2_set_simple (newcaps,
+ gst_caps_set_simple (newcaps,
"width", G_TYPE_INT, w,
"height", G_TYPE_INT, h,
"framerate", G_TYPE_DOUBLE, gst_v4lsrc_get_fps(v4lsrc),
@@ -467,10 +467,10 @@ gst_v4lsrc_srcconnect (GstPad *pad, const GstCaps2 *vscapslist)
}
-static GstCaps2 *
+static GstCaps *
gst_v4lsrc_getcaps (GstPad *pad)
{
- GstCaps2 *list;
+ GstCaps *list;
GstV4lSrc *v4lsrc = GST_V4LSRC(gst_pad_get_parent(pad));
int palette[] = {
VIDEO_PALETTE_YUV422,
@@ -488,9 +488,9 @@ gst_v4lsrc_getcaps (GstPad *pad)
return NULL;
}
- list = gst_caps2_new_empty();
+ list = gst_caps_new_empty();
for (i = 0; i < 8; i++) {
- GstCaps2 *one;
+ GstCaps *one;
#define gst_v4lsrc_palette_to_caps_range(palette, min_w, max_w, min_h, max_h) \
gst_v4lsrc_palette_to_caps(palette, \
gst_props_entry_new("width", \
@@ -505,11 +505,11 @@ gst_v4lsrc_getcaps (GstPad *pad)
)
one = gst_v4lsrc_palette_to_caps(palette[i]);
- gst_caps2_set_simple (one,
+ gst_caps_set_simple (one,
"width", GST_TYPE_INT_RANGE, vcap->minwidth, vcap->maxwidth,
"height", GST_TYPE_INT_RANGE, vcap->minheight, vcap->maxheight,
NULL);
- gst_caps2_append(list, one);
+ gst_caps_append(list, one);
}
return list;
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index 81b8b7e8b..dba8655a4 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -303,7 +303,7 @@ gst_ximagesink_handle_xevents (GstXImageSink *ximagesink, GstPad *pad)
ximagesink->xwindow->height = e.xconfigure.height;
r = gst_pad_try_set_caps (GST_VIDEOSINK_PAD (ximagesink),
- gst_caps2_new_simple ("video/x-raw-rgb",
+ gst_caps_new_simple ("video/x-raw-rgb",
"bpp", G_TYPE_INT, ximagesink->xcontext->bpp,
"depth", G_TYPE_INT, ximagesink->xcontext->depth,
"endianness", G_TYPE_INT, ximagesink->xcontext->endianness,
@@ -460,7 +460,7 @@ gst_ximagesink_xcontext_get (GstXImageSink *ximagesink)
xcontext->visual->blue_mask = GULONG_TO_BE (xcontext->visual->blue_mask);
}
- xcontext->caps = gst_caps2_new_simple ("video/x-raw-rgb",
+ xcontext->caps = gst_caps_new_simple ("video/x-raw-rgb",
"bpp", G_TYPE_INT, xcontext->bpp,
"depth", G_TYPE_INT, xcontext->depth,
"endianness", G_TYPE_INT, xcontext->endianness,
@@ -485,7 +485,7 @@ gst_ximagesink_xcontext_clear (GstXImageSink *ximagesink)
g_return_if_fail (ximagesink != NULL);
g_return_if_fail (GST_IS_XIMAGESINK (ximagesink));
- gst_caps2_free (ximagesink->xcontext->caps);
+ gst_caps_free (ximagesink->xcontext->caps);
g_mutex_lock (ximagesink->x_lock);
@@ -498,7 +498,7 @@ gst_ximagesink_xcontext_clear (GstXImageSink *ximagesink)
/* Element stuff */
-static GstCaps2 *
+static GstCaps *
gst_ximagesink_getcaps (GstPad *pad)
{
GstXImageSink *ximagesink;
@@ -506,16 +506,16 @@ gst_ximagesink_getcaps (GstPad *pad)
ximagesink = GST_XIMAGESINK (gst_pad_get_parent (pad));
if (ximagesink->xcontext)
- return gst_caps2_copy (ximagesink->xcontext->caps);
+ return gst_caps_copy (ximagesink->xcontext->caps);
- return gst_caps2_from_string ("video/x-raw-rgb, "
+ return gst_caps_from_string ("video/x-raw-rgb, "
"framerate = (double) [ 0, MAX ], "
"width = (int) [ 0, MAX ], "
"height = (int) [ 0, MAX ]");
}
static GstPadLinkReturn
-gst_ximagesink_sinkconnect (GstPad *pad, const GstCaps2 *caps)
+gst_ximagesink_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstXImageSink *ximagesink;
char *caps_str1, *caps_str2;
@@ -527,15 +527,15 @@ gst_ximagesink_sinkconnect (GstPad *pad, const GstCaps2 *caps)
if (!ximagesink->xcontext)
return GST_PAD_LINK_DELAYED;
- caps_str1 = gst_caps2_to_string (ximagesink->xcontext->caps);
- caps_str2 = gst_caps2_to_string (caps);
+ caps_str1 = gst_caps_to_string (ximagesink->xcontext->caps);
+ caps_str2 = gst_caps_to_string (caps);
GST_DEBUG ("sinkconnect %s with %s", caps_str1, caps_str2);
g_free (caps_str1);
g_free (caps_str2);
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
ret = gst_structure_get_int (structure, "width",
&(GST_VIDEOSINK_WIDTH (ximagesink)));
ret &= gst_structure_get_int (structure, "height",
diff --git a/sys/ximage/ximagesink.h b/sys/ximage/ximagesink.h
index 31a22ef3b..f88a3fee2 100644
--- a/sys/ximage/ximagesink.h
+++ b/sys/ximage/ximagesink.h
@@ -76,7 +76,7 @@ struct _GstXContext {
gboolean use_xshm;
- GstCaps2 *caps;
+ GstCaps *caps;
};
/* XWindow stuff */
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index 565de1ccd..daaf40808 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -344,7 +344,7 @@ gst_xvimagesink_handle_xevents (GstXvImageSink *xvimagesink, GstPad *pad)
g_mutex_unlock (xvimagesink->x_lock);
}
-static GstCaps2 *
+static GstCaps *
gst_xvimagesink_get_xv_support (GstXContext *xcontext)
{
gint i, nb_adaptors;
@@ -400,21 +400,21 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext)
{
gint nb_formats;
XvImageFormatValues *formats = NULL;
- GstCaps2 *caps = NULL;
+ GstCaps *caps = NULL;
/* We get all image formats supported by our port */
formats = XvListImageFormats (xcontext->disp,
xcontext->xv_port_id, &nb_formats);
- caps = gst_caps2_new_empty ();
+ caps = gst_caps_new_empty ();
for (i = 0; i < nb_formats; i++)
{
- GstCaps2 *format_caps = NULL;
+ GstCaps *format_caps = NULL;
switch (formats[i].type)
{
case XvRGB:
{
- format_caps = gst_caps2_new_simple ("video/x-raw-rgb",
+ format_caps = gst_caps_new_simple ("video/x-raw-rgb",
"endianness", G_TYPE_INT, xcontext->endianness,
"depth", G_TYPE_INT, xcontext->depth,
"bpp", G_TYPE_INT, xcontext->bpp,
@@ -437,7 +437,7 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext)
if (format)
{
format->format = formats[i].id;
- format->caps = gst_caps2_copy (format_caps);
+ format->caps = gst_caps_copy (format_caps);
xcontext->formats_list = g_list_append (
xcontext->formats_list, format);
}
@@ -445,7 +445,7 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext)
break;
}
case XvYUV:
- format_caps = gst_caps2_new_simple ("video/x-raw-yuv",
+ format_caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC,formats[i].id,
"width", GST_TYPE_INT_RANGE, 0, G_MAXINT,
"height", GST_TYPE_INT_RANGE, 0, G_MAXINT,
@@ -457,7 +457,7 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext)
break;
}
- gst_caps2_append (caps, format_caps);
+ gst_caps_append (caps, format_caps);
}
if (formats)
@@ -580,7 +580,7 @@ gst_xvimagesink_xcontext_clear (GstXvImageSink *xvimagesink)
while (list)
{
GstXvImageFormat *format = list->data;
- gst_caps2_free (format->caps);
+ gst_caps_free (format->caps);
g_free (format);
list = g_list_next (list);
}
@@ -588,7 +588,7 @@ gst_xvimagesink_xcontext_clear (GstXvImageSink *xvimagesink)
if (xvimagesink->xcontext->formats_list)
g_list_free (xvimagesink->xcontext->formats_list);
- gst_caps2_free (xvimagesink->xcontext->caps);
+ gst_caps_free (xvimagesink->xcontext->caps);
g_mutex_lock (xvimagesink->x_lock);
@@ -606,7 +606,7 @@ gst_xvimagesink_xcontext_clear (GstXvImageSink *xvimagesink)
static gint
gst_xvimagesink_get_fourcc_from_caps (GstXvImageSink *xvimagesink,
- GstCaps2 *caps)
+ GstCaps *caps)
{
GList *list = NULL;
@@ -621,9 +621,9 @@ gst_xvimagesink_get_fourcc_from_caps (GstXvImageSink *xvimagesink,
if (format)
{
- GstCaps2 *icaps = NULL;
- icaps = gst_caps2_intersect (caps, format->caps);
- if (!gst_caps2_is_empty(icaps))
+ GstCaps *icaps = NULL;
+ icaps = gst_caps_intersect (caps, format->caps);
+ if (!gst_caps_is_empty(icaps))
return format->format;
}
list = g_list_next (list);
@@ -632,7 +632,7 @@ gst_xvimagesink_get_fourcc_from_caps (GstXvImageSink *xvimagesink,
return 0;
}
-static GstCaps2 *
+static GstCaps *
gst_xvimagesink_getcaps (GstPad *pad)
{
GstXvImageSink *xvimagesink;
@@ -640,9 +640,9 @@ gst_xvimagesink_getcaps (GstPad *pad)
xvimagesink = GST_XVIMAGESINK (gst_pad_get_parent (pad));
if (xvimagesink->xcontext)
- return gst_caps2_copy (xvimagesink->xcontext->caps);
+ return gst_caps_copy (xvimagesink->xcontext->caps);
- return gst_caps2_from_string(
+ return gst_caps_from_string(
"video/x-raw-rgb, "
"framerate = (double) [ 0, MAX ], "
"width = (int) [ 0, MAX ], "
@@ -654,7 +654,7 @@ gst_xvimagesink_getcaps (GstPad *pad)
}
static GstPadLinkReturn
-gst_xvimagesink_sinkconnect (GstPad *pad, const GstCaps2 *caps)
+gst_xvimagesink_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstXvImageSink *xvimagesink;
char *caps_str1, *caps_str2;
@@ -663,15 +663,15 @@ gst_xvimagesink_sinkconnect (GstPad *pad, const GstCaps2 *caps)
xvimagesink = GST_XVIMAGESINK (gst_pad_get_parent (pad));
- caps_str1 = gst_caps2_to_string (xvimagesink->xcontext->caps);
- caps_str2 = gst_caps2_to_string (caps);
+ caps_str1 = gst_caps_to_string (xvimagesink->xcontext->caps);
+ caps_str2 = gst_caps_to_string (caps);
GST_DEBUG ("sinkconnect %s with %s", caps_str1, caps_str2);
g_free (caps_str1);
g_free (caps_str2);
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
ret = gst_structure_get_int (structure, "width", &(GST_VIDEOSINK_WIDTH (xvimagesink)));
ret &= gst_structure_get_int (structure, "height", &(GST_VIDEOSINK_HEIGHT (xvimagesink)));
ret &= gst_structure_get_double (structure, "framerate", &xvimagesink->framerate);
@@ -680,7 +680,7 @@ gst_xvimagesink_sinkconnect (GstPad *pad, const GstCaps2 *caps)
if (!gst_structure_get_fourcc (structure, "format",
&xvimagesink->xcontext->im_format)) {
xvimagesink->xcontext->im_format = gst_xvimagesink_get_fourcc_from_caps (
- xvimagesink, gst_caps2_copy(caps));
+ xvimagesink, gst_caps_copy(caps));
}
xvimagesink->pixel_width = 1;
diff --git a/sys/xvimage/xvimagesink.h b/sys/xvimage/xvimagesink.h
index bac1bedb5..e1d7b5e80 100644
--- a/sys/xvimage/xvimagesink.h
+++ b/sys/xvimage/xvimagesink.h
@@ -85,7 +85,7 @@ struct _GstXContext {
GList *formats_list;
- GstCaps2 *caps;
+ GstCaps *caps;
};
/* XWindow stuff */
@@ -99,7 +99,7 @@ struct _GstXWindow {
/* XvImage format stuff */
struct _GstXvImageFormat {
gint format;
- GstCaps2 *caps;
+ GstCaps *caps;
};
/* XvImage stuff */
diff --git a/tests/examples/seek/vorbisfile.c b/tests/examples/seek/vorbisfile.c
index f191aa7b8..acaa60c9d 100644
--- a/tests/examples/seek/vorbisfile.c
+++ b/tests/examples/seek/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/tests/old/examples/seek/vorbisfile.c b/tests/old/examples/seek/vorbisfile.c
index f191aa7b8..acaa60c9d 100644
--- a/tests/old/examples/seek/vorbisfile.c
+++ b/tests/old/examples/seek/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);
}