summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-12-21 23:24:37 +0000
committerDavid Schleef <ds@schleef.org>2003-12-21 23:24:37 +0000
commit70c0365540b453346486a9ad925e0740253201fb (patch)
tree08bc543934af35fae195543b3fab03bb042c5e99
parent08624cad3ad0220f5beddf1483b864e0163f9250 (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/a52dec/gsta52dec.c2
-rw-r--r--ext/dvdnav/dvdnavsrc.c34
-rw-r--r--ext/lame/gstlame.c8
-rw-r--r--ext/mad/gstid3tag.c32
-rw-r--r--ext/mad/gstmad.c2
-rw-r--r--ext/mpeg2dec/gstmpeg2dec.c16
-rw-r--r--ext/sidplay/gstsiddec.cc8
-rw-r--r--ext/sidplay/gstsiddec.h2
-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/video.c8
-rw-r--r--gst/ac3parse/gstac3parse.c4
-rw-r--r--gst/asfdemux/gstasfdemux.c82
-rw-r--r--gst/asfdemux/gstasfmux.c8
-rw-r--r--gst/mpegaudioparse/gstmpegaudioparse.c8
-rw-r--r--gst/mpegstream/gstmpegdemux.c20
-rw-r--r--gst/mpegstream/gstmpegparse.c6
-rw-r--r--gst/realmedia/rmdemux.c26
-rw-r--r--gst/synaesthesia/gstsynaesthesia.c4
33 files changed, 252 insertions, 252 deletions
diff --git a/examples/seeking/vorbisfile.c b/examples/seeking/vorbisfile.c
index f191aa7b..acaa60c9 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/a52dec/gsta52dec.c b/ext/a52dec/gsta52dec.c
index 5615cb54..387d444f 100644
--- a/ext/a52dec/gsta52dec.c
+++ b/ext/a52dec/gsta52dec.c
@@ -366,7 +366,7 @@ gst_a52dec_reneg (GstPad * pad, int channels, int rate)
GST_INFO ( "a52dec: reneg channels:%d rate:%d\n", channels, rate);
if (gst_pad_try_set_caps (pad,
- gst_caps2_new_simple ("audio/x-raw-int",
+ gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, TRUE,
"width", G_TYPE_INT, 16,
diff --git a/ext/dvdnav/dvdnavsrc.c b/ext/dvdnav/dvdnavsrc.c
index 04729f14..f4bbf7ee 100644
--- a/ext/dvdnav/dvdnavsrc.c
+++ b/ext/dvdnav/dvdnavsrc.c
@@ -52,7 +52,7 @@ struct _DVDNavSrc {
/* pads */
GstPad *srcpad;
- GstCaps2 *streaminfo;
+ GstCaps *streaminfo;
/* location */
gchar *location;
@@ -63,7 +63,7 @@ struct _DVDNavSrc {
int title, chapter, angle;
dvdnav_t *dvdnav;
- GstCaps2 *buttoninfo;
+ GstCaps *buttoninfo;
};
struct _DVDNavSrcClass {
@@ -266,10 +266,10 @@ dvdnavsrc_class_init (DVDNavSrcClass *klass)
1,9,1,G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, ARG_STREAMINFO,
g_param_spec_boxed("streaminfo", "streaminfo", "streaminfo",
- GST_TYPE_CAPS2, G_PARAM_READABLE));
+ GST_TYPE_CAPS, G_PARAM_READABLE));
g_object_class_install_property(gobject_class, ARG_BUTTONINFO,
g_param_spec_boxed("buttoninfo", "buttoninfo", "buttoninfo",
- GST_TYPE_CAPS2, G_PARAM_READABLE));
+ GST_TYPE_CAPS, G_PARAM_READABLE));
gobject_class->set_property = GST_DEBUG_FUNCPTR(dvdnavsrc_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR(dvdnavsrc_get_property);
@@ -503,37 +503,37 @@ dvdnavsrc_tca_seek(DVDNavSrc *src, int title, int chapter, int angle)
static void
dvdnavsrc_update_streaminfo (DVDNavSrc *src)
{
- GstCaps2 *caps;
+ GstCaps *caps;
GstStructure *structure;
gint64 value;
- caps = gst_caps2_new_empty();
+ caps = gst_caps_new_empty();
structure = gst_structure_empty_new ("application/x-gst-streaminfo");
- gst_caps2_append_cap (caps, structure);
+ gst_caps_append_structure (caps, structure);
if (dvdnavsrc_query(src->srcpad, GST_QUERY_TOTAL, &title_format, &value)) {
- gst_caps2_set_simple (caps, "titles", G_TYPE_INT, value, NULL);
+ gst_caps_set_simple (caps, "titles", G_TYPE_INT, value, NULL);
}
if (dvdnavsrc_query(src->srcpad, GST_QUERY_POSITION, &title_format, &value)) {
- gst_caps2_set_simple (caps, "title", G_TYPE_INT, value, NULL);
+ gst_caps_set_simple (caps, "title", G_TYPE_INT, value, NULL);
}
if (dvdnavsrc_query(src->srcpad, GST_QUERY_TOTAL, &chapter_format, &value)) {
- gst_caps2_set_simple (caps, "chapters", G_TYPE_INT, value, NULL);
+ gst_caps_set_simple (caps, "chapters", G_TYPE_INT, value, NULL);
}
if (dvdnavsrc_query(src->srcpad, GST_QUERY_POSITION, &chapter_format, &value)) {
- gst_caps2_set_simple (caps, "chapter", G_TYPE_INT, value, NULL);
+ gst_caps_set_simple (caps, "chapter", G_TYPE_INT, value, NULL);
}
if (dvdnavsrc_query(src->srcpad, GST_QUERY_TOTAL, &angle_format, &value)) {
- gst_caps2_set_simple (caps, "angles", G_TYPE_INT, value, NULL);
+ gst_caps_set_simple (caps, "angles", G_TYPE_INT, value, NULL);
}
if (dvdnavsrc_query(src->srcpad, GST_QUERY_POSITION, &angle_format, &value)) {
- gst_caps2_set_simple (caps, "angle", G_TYPE_INT, value, NULL);
+ gst_caps_set_simple (caps, "angle", G_TYPE_INT, value, NULL);
}
if (src->streaminfo) {
- gst_caps2_free (src->streaminfo);
+ gst_caps_free (src->streaminfo);
}
src->streaminfo = caps;
g_object_notify (G_OBJECT (src), "streaminfo");
@@ -542,17 +542,17 @@ dvdnavsrc_update_streaminfo (DVDNavSrc *src)
static void
dvdnavsrc_update_buttoninfo (DVDNavSrc *src)
{
- GstCaps2 *caps;
+ GstCaps *caps;
pci_t *pci;
pci = dvdnav_get_current_nav_pci(src->dvdnav);
fprintf(stderr, "update button info total:%d\n", pci->hli.hl_gi.btn_ns);
- caps = gst_caps2_new_simple ("dvdnavsrc_buttoninfo",
+ caps = gst_caps_new_simple ("dvdnavsrc_buttoninfo",
"application/x-gst-dvdnavsrc-buttoninfo",
"total", G_TYPE_INT, pci->hli.hl_gi.btn_ns, NULL);
if (src->buttoninfo) {
- gst_caps2_free (src->buttoninfo);
+ gst_caps_free (src->buttoninfo);
}
src->buttoninfo = caps;
g_object_notify (G_OBJECT (src), "buttoninfo");
diff --git a/ext/lame/gstlame.c b/ext/lame/gstlame.c
index 0e8e63fb..533f8962 100644
--- a/ext/lame/gstlame.c
+++ b/ext/lame/gstlame.c
@@ -340,15 +340,15 @@ gst_lame_class_init (GstLameClass *klass)
}
static GstPadLinkReturn
-gst_lame_sink_link (GstPad *pad, const GstCaps2 *caps)
+gst_lame_sink_link (GstPad *pad, const GstCaps *caps)
{
GstLame *lame;
gint out_samplerate;
GstStructure *structure;
- GstCaps2 *othercaps;
+ GstCaps *othercaps;
lame = GST_LAME (gst_pad_get_parent (pad));
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "rate", &lame->samplerate);
gst_structure_get_int (structure, "channels", &lame->num_channels);
@@ -361,7 +361,7 @@ gst_lame_sink_link (GstPad *pad, const GstCaps2 *caps)
out_samplerate = lame_get_out_samplerate (lame->lgf);
othercaps =
- gst_caps2_new_simple (
+ gst_caps_new_simple (
"audio/mpeg",
"mpegversion", G_TYPE_INT, 1,
"layer", G_TYPE_INT, 3,
diff --git a/ext/mad/gstid3tag.c b/ext/mad/gstid3tag.c
index 29b8faa8..9a70c297 100644
--- a/ext/mad/gstid3tag.c
+++ b/ext/mad/gstid3tag.c
@@ -64,7 +64,7 @@ struct _GstID3Tag {
/* caps */
GstID3ParseMode parse_mode;
- GstCaps2 * found_caps;
+ GstCaps * found_caps;
/* tags */
GstTagList * event_tags;
@@ -229,18 +229,18 @@ gst_id3_tag_class_init (GstID3TagClass *klass)
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_id3_tag_get_property);
}
-static GstCaps2 *
+static GstCaps *
gst_id3_tag_get_caps (GstPad *pad)
{
GstID3Tag *tag = GST_ID3_TAG (gst_pad_get_parent (pad));
if (tag->found_caps) {
- GstCaps2 *caps;
- caps = gst_caps2_from_string ("application/x-gst-tags; application/x-id3");
- gst_caps2_append (caps, gst_caps2_copy (tag->found_caps));
+ GstCaps *caps;
+ caps = gst_caps_from_string ("application/x-gst-tags; application/x-id3");
+ gst_caps_append (caps, gst_caps_copy (tag->found_caps));
return caps;
} else {
- return gst_caps2_new_any ();
+ return gst_caps_new_any ();
}
}
@@ -678,7 +678,7 @@ gst_id3_tag_handle_event (GstPad *pad, GstEvent *event)
}
typedef struct {
guint best_probability;
- GstCaps2 *caps;
+ GstCaps *caps;
GstBuffer *buffer;
} SimpleTypeFind;
guint8 *
@@ -695,16 +695,16 @@ simple_find_peek (gpointer data, gint64 offset, guint size)
return NULL;
}
static void
-simple_find_suggest (gpointer data, guint probability, const GstCaps2 *caps)
+simple_find_suggest (gpointer data, guint probability, const GstCaps *caps)
{
SimpleTypeFind *find = (SimpleTypeFind *) 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_id3_tag_do_typefind (GstID3Tag *tag, GstBuffer *buffer)
{
GList *walk, *type_list;
@@ -742,7 +742,7 @@ gst_id3_tag_do_typefind (GstID3Tag *tag, GstBuffer *buffer)
static gboolean
gst_id3_tag_do_caps_nego (GstID3Tag *tag, GstBuffer *buffer)
{
- GstCaps2 *caps;
+ GstCaps *caps;
if (buffer != NULL) {
g_assert (tag->found_caps == NULL);
@@ -756,12 +756,12 @@ gst_id3_tag_do_caps_nego (GstID3Tag *tag, GstBuffer *buffer)
gst_id3_tag_add_src_pad (tag);
do {
- caps = gst_caps2_new_simple ("application/x-id3", NULL);
+ caps = gst_caps_new_simple ("application/x-id3", NULL);
if (gst_pad_try_set_caps (tag->srcpad, caps) != GST_PAD_LINK_REFUSED) {
tag->parse_mode = GST_ID3_TAG_PARSE_WRITE;
GST_LOG_OBJECT (tag, "normal operation, using application/x-id3 output");
} else {
- caps = gst_caps2_new_simple ("application/x-gst-tags", NULL);
+ caps = gst_caps_new_simple ("application/x-gst-tags", NULL);
if (gst_pad_try_set_caps (tag->srcpad, caps) != GST_PAD_LINK_REFUSED) {
tag->parse_mode = GST_ID3_TAG_PARSE_TAG;
GST_LOG_OBJECT (tag, "fast operation, just outputting tags");
@@ -771,9 +771,9 @@ gst_id3_tag_do_caps_nego (GstID3Tag *tag, GstBuffer *buffer)
tag->parse_mode = GST_ID3_TAG_PARSE_PARSE;
GST_LOG_OBJECT (tag, "parsing operation, extracting tags");
} else {
- caps = gst_caps2_from_string ("application/x-id3; "
+ caps = gst_caps_from_string ("application/x-id3; "
"application/x-gst-tags");
- gst_caps2_append (caps, tag->found_caps);
+ gst_caps_append (caps, tag->found_caps);
if (gst_pad_recover_caps_error (tag->srcpad, caps)) {
tag->parse_mode = GST_ID3_TAG_PARSE_UNKNOWN;
continue;
@@ -1021,7 +1021,7 @@ gst_id3_tag_change_state (GstElement *element)
tag->buffer = NULL;
}
if (tag->found_caps) {
- gst_caps2_free (tag->found_caps);
+ gst_caps_free (tag->found_caps);
tag->found_caps = NULL;
}
tag->parse_mode = GST_ID3_TAG_PARSE_UNKNOWN;
diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c
index a448f894..04cc147c 100644
--- a/ext/mad/gstmad.c
+++ b/ext/mad/gstmad.c
@@ -1063,7 +1063,7 @@ gst_mad_chain (GstPad *pad, GstData *_data)
/* we set the caps even when the pad is not connected so they
* can be gotten for streaminfo */
if (gst_pad_try_set_caps (mad->srcpad,
- gst_caps2_new_simple ("audio/x-raw-int",
+ gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, TRUE,
"width", G_TYPE_INT, 16,
diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c
index e5cea9e1..850c99cf 100644
--- a/ext/mpeg2dec/gstmpeg2dec.c
+++ b/ext/mpeg2dec/gstmpeg2dec.c
@@ -77,7 +77,7 @@ GST_STATIC_PAD_TEMPLATE (
"user_data",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static GstStaticPadTemplate sink_template_factory =
@@ -306,8 +306,8 @@ gst_mpeg2dec_alloc_buffer (GstMpeg2dec *mpeg2dec, const mpeg2_info_t *info, gint
static gboolean
gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
{
- GstCaps2 *allowed;
- GstCaps2 *caps;
+ GstCaps *allowed;
+ GstCaps *caps;
guint32 fourcc;
GstPadLinkReturn ret;
@@ -318,9 +318,9 @@ gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
/* we what we are allowed to do */
allowed = gst_pad_get_allowed_caps (mpeg2dec->srcpad);
- caps = gst_caps2_copy_1 (allowed);
+ caps = gst_caps_copy_1 (allowed);
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"width", G_TYPE_INT, mpeg2dec->width,
"height", G_TYPE_INT, mpeg2dec->height,
"pixel_width", G_TYPE_INT, mpeg2dec->pixel_width,
@@ -332,7 +332,7 @@ gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
if (ret != GST_PAD_LINK_OK) return FALSE;
/* it worked, try to find what it was again */
- gst_structure_get_fourcc (gst_caps2_get_nth_cap (caps,0),
+ gst_structure_get_fourcc (gst_caps_get_structure (caps,0),
"format", &fourcc);
if (fourcc == GST_STR_FOURCC ("I420")) {
@@ -341,7 +341,7 @@ gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
mpeg2dec->format = MPEG2DEC_FORMAT_YV12;
}
- gst_caps2_free (caps);
+ gst_caps_free (caps);
return TRUE;
}
@@ -349,7 +349,7 @@ gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
static void
update_streaminfo (GstMpeg2dec *mpeg2dec)
{
- GstCaps2 *caps;
+ GstCaps *caps;
GstProps *props;
GstPropsEntry *entry;
const mpeg2_info_t *info;
diff --git a/ext/sidplay/gstsiddec.cc b/ext/sidplay/gstsiddec.cc
index 7fb92f53..9aee1766 100644
--- a/ext/sidplay/gstsiddec.cc
+++ b/ext/sidplay/gstsiddec.cc
@@ -211,7 +211,7 @@ gst_siddec_class_init (GstSidDec *klass)
1, G_MAXULONG, DEFAULT_BLOCKSIZE, (GParamFlags)G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_METADATA,
g_param_spec_boxed ("metadata", "Metadata", "Metadata",
- GST_TYPE_CAPS2, (GParamFlags)G_PARAM_READABLE));
+ GST_TYPE_CAPS, (GParamFlags)G_PARAM_READABLE));
gobject_class->set_property = gst_siddec_set_property;
gobject_class->get_property = gst_siddec_get_property;
@@ -316,7 +316,7 @@ G_STMT_START { \
static gboolean
siddec_negotiate (GstSidDec *siddec)
{
- GstCaps2 *allowed;
+ GstCaps *allowed;
gboolean sign = TRUE;
gint width = 0, depth = 0;
GstStructure *structure;
@@ -327,7 +327,7 @@ siddec_negotiate (GstSidDec *siddec)
if (!allowed)
return FALSE;
- structure = gst_caps2_get_nth_cap (allowed, 0);
+ structure = gst_caps_get_structure (allowed, 0);
gst_structure_get_int (structure, "width", &width);
gst_structure_get_int (structure, "depth", &depth);
@@ -351,7 +351,7 @@ siddec_negotiate (GstSidDec *siddec)
if (!GST_PAD_CAPS (siddec->srcpad)) {
if (!gst_pad_try_set_caps (siddec->srcpad,
- gst_caps2_new_simple ("audio/x-raw-int",
+ gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, sign,
"width", G_TYPE_INT, siddec->config->bitsPerSample,
diff --git a/ext/sidplay/gstsiddec.h b/ext/sidplay/gstsiddec.h
index b0873ac9..a8789095 100644
--- a/ext/sidplay/gstsiddec.h
+++ b/ext/sidplay/gstsiddec.h
@@ -62,7 +62,7 @@ struct _GstSidDec {
gulong blocksize;
- GstCaps2 *metadata;
+ GstCaps *metadata;
};
struct _GstSidDecClass {
diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c
index f3c85a59..bec298e9 100644
--- a/gst-libs/gst/audio/audio.c
+++ b/gst-libs/gst/audio/audio.c
@@ -35,7 +35,7 @@ gst_audio_frame_byte_size (GstPad* pad)
int width = 0;
int channels = 0;
- GstCaps2 *caps;
+ GstCaps *caps;
GstStructure *structure;
/* get caps of pad */
@@ -48,7 +48,7 @@ gst_audio_frame_byte_size (GstPad* pad)
return 0;
}
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "width", &width);
gst_structure_get_int (structure, "channels", &channels);
@@ -82,7 +82,7 @@ gst_audio_frame_rate (GstPad *pad)
* returns 0 if failed, rate if success
*/
{
- GstCaps2 *caps = NULL;
+ GstCaps *caps = NULL;
gint rate;
GstStructure *structure;
@@ -96,7 +96,7 @@ gst_audio_frame_rate (GstPad *pad)
return 0;
}
else {
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "rate", &rate);
return rate;
}
@@ -117,7 +117,7 @@ gst_audio_length (GstPad* pad, GstBuffer* buf)
double length;
- GstCaps2 *caps = NULL;
+ GstCaps *caps = NULL;
GstStructure *structure;
g_assert (GST_IS_BUFFER (buf));
@@ -132,7 +132,7 @@ gst_audio_length (GstPad* pad, GstBuffer* buf)
}
else
{
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
bytes = GST_BUFFER_SIZE (buf);
gst_structure_get_int (structure, "width", &width);
gst_structure_get_int (structure, "channels", &channels);
@@ -156,7 +156,7 @@ gst_audio_highest_sample_value (GstPad* pad)
{
gboolean is_signed = FALSE;
gint width = 0;
- GstCaps2 *caps = NULL;
+ GstCaps *caps = NULL;
GstStructure *structure;
caps = GST_PAD_CAPS (pad);
@@ -166,7 +166,7 @@ gst_audio_highest_sample_value (GstPad* pad)
GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
}
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "width", &width);
gst_structure_get_boolean (structure, "signed", &is_signed);
diff --git a/gst-libs/gst/audio/gstaudiofilter.c b/gst-libs/gst/audio/gstaudiofilter.c
index adbb9748..46e7c7de 100644
--- a/gst-libs/gst/audio/gstaudiofilter.c
+++ b/gst-libs/gst/audio/gstaudiofilter.c
@@ -48,7 +48,7 @@ static void gst_audiofilter_set_property (GObject *object, guint prop_id, const
static void gst_audiofilter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void gst_audiofilter_chain (GstPad *pad, GstData *_data);
-GstCaps2 * gst_audiofilter_class_get_capslist(GstAudiofilterClass *klass);
+GstCaps * gst_audiofilter_class_get_capslist(GstAudiofilterClass *klass);
static GstElementClass *parent_class = NULL;
@@ -105,11 +105,11 @@ static void gst_audiofilter_class_init (gpointer g_class, gpointer class_data)
gobject_class->get_property = gst_audiofilter_get_property;
}
-static GstCaps2 *
+static GstCaps *
gst_audiofilter_getcaps (GstPad *pad)
{
GstAudiofilter *audiofilter;
- GstCaps2 *othercaps;
+ GstCaps *othercaps;
GstAudiofilterClass *audiofilter_class;
GST_DEBUG("gst_audiofilter_sink_getcaps");
@@ -124,11 +124,11 @@ gst_audiofilter_getcaps (GstPad *pad)
othercaps = gst_pad_get_allowed_caps (audiofilter->srcpad);
}
- return gst_caps2_intersect (othercaps, audiofilter_class->caps);
+ return gst_caps_intersect (othercaps, audiofilter_class->caps);
}
static GstPadLinkReturn
-gst_audiofilter_link (GstPad *pad, const GstCaps2 *caps)
+gst_audiofilter_link (GstPad *pad, const GstCaps *caps)
{
GstAudiofilter *audiofilter;
GstPadLinkReturn ret;
@@ -150,7 +150,7 @@ gst_audiofilter_link (GstPad *pad, const GstCaps2 *caps)
if (link_ret != GST_PAD_LINK_OK) return link_ret;
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
if (strcmp (gst_structure_get_name (structure), "audio/x-raw-int") == 0) {
ret = gst_structure_get_int (structure, "depth", &audiofilter->depth);
@@ -287,19 +287,19 @@ gst_audiofilter_get_property (GObject *object, guint prop_id, GValue *value, GPa
}
void gst_audiofilter_class_add_pad_templates (
- GstAudiofilterClass *audiofilter_class, const GstCaps2 *caps)
+ GstAudiofilterClass *audiofilter_class, const GstCaps *caps)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (audiofilter_class);
- audiofilter_class->caps = gst_caps2_copy(caps);
+ audiofilter_class->caps = gst_caps_copy(caps);
gst_element_class_add_pad_template (element_class,
gst_pad_template_new("src", GST_PAD_SRC, GST_PAD_ALWAYS,
- gst_caps2_copy(caps)));
+ gst_caps_copy(caps)));
gst_element_class_add_pad_template (element_class,
gst_pad_template_new("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
- gst_caps2_copy(caps)));
+ gst_caps_copy(caps)));
}
static gboolean
diff --git a/gst-libs/gst/audio/gstaudiofilter.h b/gst-libs/gst/audio/gstaudiofilter.h
index f5bb7eaa..4723c329 100644
--- a/gst-libs/gst/audio/gstaudiofilter.h
+++ b/gst-libs/gst/audio/gstaudiofilter.h
@@ -68,7 +68,7 @@ struct _GstAudiofilter {
struct _GstAudiofilterClass {
GstElementClass parent_class;
- GstCaps2 *caps;
+ GstCaps *caps;
GstAudiofilterSetupFunc setup;
GstAudiofilterInplaceFilterFunc filter_inplace;
GstAudiofilterFilterFunc filter;
@@ -76,7 +76,7 @@ struct _GstAudiofilterClass {
GType gst_audiofilter_get_type(void);
-void gst_audiofilter_class_add_pad_templates (GstAudiofilterClass *audiofilterclass, const GstCaps2 *caps);
+void gst_audiofilter_class_add_pad_templates (GstAudiofilterClass *audiofilterclass, const GstCaps *caps);
G_END_DECLS
diff --git a/gst-libs/gst/media-info/media-info-priv.c b/gst-libs/gst/media-info/media-info-priv.c
index b613ab86..c7f470ea 100644
--- a/gst-libs/gst/media-info/media-info-priv.c
+++ b/gst-libs/gst/media-info/media-info-priv.c
@@ -78,7 +78,7 @@ gmi_track_new (void)
/* callbacks */
static void
-have_type_callback (GstElement *typefind, GstCaps2 *type, GstMediaInfoPriv *priv)
+have_type_callback (GstElement *typefind, GstCaps *type, GstMediaInfoPriv *priv)
{
priv->type = type;
}
@@ -136,13 +136,13 @@ gmi_reset (GstMediaInfo *info)
if (priv->format)
{
GMI_DEBUG ("unreffing priv->format, error before this ?\n");
- gst_caps2_free (priv->format);
+ gst_caps_free (priv->format);
priv->format = NULL;
}
if (priv->metadata)
{
GMI_DEBUG ("unreffing priv->metadata, error before this ?\n");
- gst_caps2_free (priv->metadata);
+ gst_caps_free (priv->metadata);
priv->metadata = NULL;
}
if (priv->stream)
@@ -193,12 +193,12 @@ gmi_seek_to_track (GstMediaInfo *info, long track)
/* clear structs because of the seek */
if (priv->metadata)
{
- gst_caps2_free (priv->metadata);
+ gst_caps_free (priv->metadata);
priv->metadata = NULL;
}
if (priv->streaminfo)
{
- gst_caps2_free (priv->streaminfo);
+ gst_caps_free (priv->streaminfo);
priv->streaminfo = NULL;
}
return TRUE;
@@ -293,7 +293,7 @@ gmi_clear_decoder (GstMediaInfo *info)
/****
* typefind functions
* find the type of a file and store it in the caps of the info
- * FIXME: we might better return GstCaps2 instead of storing them
+ * FIXME: we might better return GstCaps instead of storing them
* internally */
/* prepare for typefind, move from NULL to TYPEFIND */
@@ -304,7 +304,7 @@ gmip_find_type_pre (GstMediaInfoPriv *priv)
if (priv->type)
{
/* we don't need to unref, this is done inside gsttypefind.c
- gst_caps2_free (priv->type);
+ gst_caps_free (priv->type);
*/
priv->type = NULL;
}
@@ -578,7 +578,7 @@ gmip_find_track_streaminfo_post (GstMediaInfoPriv *priv)
value_end -= value_start;
/* FIXME: check units; this is in seconds */
- gst_caps2_set_simple (priv->streaminfo,
+ gst_caps_set_simple (priv->streaminfo,
"length", G_TYPE_INT, (int) (value_end / 1E6), NULL);
}
}
diff --git a/gst-libs/gst/media-info/media-info-priv.h b/gst-libs/gst/media-info/media-info-priv.h
index 24da7333..0a7aa500 100644
--- a/gst-libs/gst/media-info/media-info-priv.h
+++ b/gst-libs/gst/media-info/media-info-priv.h
@@ -64,14 +64,14 @@ struct GstMediaInfoPriv
GstElement *typefind;
- GstCaps2 *type;
+ GstCaps *type;
GstPad *decoder_pad; /* pad for querying decoded caps */
GstPad *source_pad; /* pad for querying encoded caps */
- GstCaps2 *format;
- GstCaps2 *metadata;
+ GstCaps *format;
+ GstCaps *metadata;
gint metadata_iters;
- GstCaps2 *streaminfo;
+ GstCaps *streaminfo;
GstElement *decoder; /* will be != NULL during collection */
gchar *source_element; /* type of element used as source */
diff --git a/gst-libs/gst/media-info/media-info-test.c b/gst-libs/gst/media-info/media-info-test.c
index 8e0c1f72..5a73c8bd 100644
--- a/gst-libs/gst/media-info/media-info-test.c
+++ b/gst-libs/gst/media-info/media-info-test.c
@@ -27,11 +27,11 @@ info_print (GstMediaInfoStream *stream)
g_print ("- track %d\n", i);
track = (GstMediaInfoTrack *) p->data;
g_print (" - metadata:\n");
- g_print ("%s\n", gst_caps2_to_string (track->metadata));
+ g_print ("%s\n", gst_caps_to_string (track->metadata));
g_print (" - streaminfo:\n");
- g_print ("%s\n", gst_caps2_to_string (track->streaminfo));
+ g_print ("%s\n", gst_caps_to_string (track->streaminfo));
g_print (" - format:\n");
- g_print ("%s\n", gst_caps2_to_string (track->format));
+ g_print ("%s\n", gst_caps_to_string (track->format));
p = p->next;
}
}
diff --git a/gst-libs/gst/media-info/media-info.c b/gst-libs/gst/media-info/media-info.c
index d22bdbb4..e214e8e1 100644
--- a/gst-libs/gst/media-info/media-info.c
+++ b/gst-libs/gst/media-info/media-info.c
@@ -295,7 +295,7 @@ gst_media_info_read_idler (GstMediaInfo *info, GstMediaInfoStream **streamp)
gmip_find_type_post (priv);
GMI_DEBUG("finding out mime type\n");
mime = g_strdup (gst_structure_get_name (
- gst_caps2_get_nth_cap(priv->type, 0)));
+ gst_caps_get_structure(priv->type, 0)));
GMI_DEBUG("found out mime type: %s\n", mime);
decoder = gmi_get_decoder (info, mime);
if (decoder == NULL)
@@ -445,7 +445,7 @@ gst_media_info_read (GstMediaInfo *info, const char *location, guint16 flags)
if (!gmip_find_type (priv)) return NULL;
mime = g_strdup (gst_structure_get_name (
- gst_caps2_get_nth_cap(priv->type, 0)));
+ gst_caps_get_structure(priv->type, 0)));
GMI_DEBUG("mime type: %s\n", mime);
/* c) figure out decoder */
diff --git a/gst-libs/gst/media-info/media-info.h b/gst-libs/gst/media-info/media-info.h
index 069bfd7c..d42a4af7 100644
--- a/gst-libs/gst/media-info/media-info.h
+++ b/gst-libs/gst/media-info/media-info.h
@@ -55,7 +55,7 @@ typedef struct
gboolean seekable;
gchar *mime;
gchar *path;
- GstCaps2 *caps; /* properties of the complete bitstream */
+ GstCaps *caps; /* properties of the complete bitstream */
guint64 length_time;
glong length_tracks;
@@ -68,9 +68,9 @@ typedef struct
* or one of a set of sequentially muxed streams */
typedef struct
{
- GstCaps2 *metadata; /* changeable metadata or tags */
- GstCaps2 *streaminfo; /* codec property stuff */
- GstCaps2 *format; /* properties of the logical stream */
+ GstCaps *metadata; /* changeable metadata or tags */
+ GstCaps *streaminfo; /* codec property stuff */
+ GstCaps *format; /* properties of the logical stream */
guint64 length_time;
@@ -80,7 +80,7 @@ typedef struct
typedef struct
{
- GstCaps2 *caps; /* properties of the muxed concurrent stream */
+ GstCaps *caps; /* properties of the muxed concurrent stream */
} GstMediaInfoConcurrent;
#define GST_MEDIA_INFO_ERROR gst_media_info_error_quark ()
@@ -116,13 +116,13 @@ gboolean gst_media_info_read_many (GstMediaInfo *media_info,
GList *locations,
guint16 GST_MEDIA_INFO_FLAGS,
GError **error);
-GstCaps2 * gst_media_info_get_next (GstMediaInfo *media_info,
+GstCaps * gst_media_info_get_next (GstMediaInfo *media_info,
GError **error);
/*
* FIXME: reset ?
gboolean gst_media_info_write (GstMediaInfo *media_info,
const char *location,
- GstCaps2 *media_info);
+ GstCaps *media_info);
*/
G_END_DECLS
diff --git a/gst-libs/gst/play/gstplay.c b/gst-libs/gst/play/gstplay.c
index e4c652a5..061f125c 100644
--- a/gst-libs/gst/play/gstplay.c
+++ b/gst-libs/gst/play/gstplay.c
@@ -909,13 +909,13 @@ gst_play_get_sink_element (GstPlay *play,
}
else {
/* If not a src pad checking caps */
- const GstCaps2 *caps;
+ const GstCaps *caps;
GstStructure *structure;
gboolean has_video_cap = FALSE;
gboolean has_audio_cap = FALSE;
caps = gst_pad_get_caps (GST_PAD (pads->data));
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
if (strcmp (gst_structure_get_name (structure),
"audio/x-raw-int") == 0) {
diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c
index e4c652a5..061f125c 100644
--- a/gst-libs/gst/play/play.c
+++ b/gst-libs/gst/play/play.c
@@ -909,13 +909,13 @@ gst_play_get_sink_element (GstPlay *play,
}
else {
/* If not a src pad checking caps */
- const GstCaps2 *caps;
+ const GstCaps *caps;
GstStructure *structure;
gboolean has_video_cap = FALSE;
gboolean has_audio_cap = FALSE;
caps = gst_pad_get_caps (GST_PAD (pads->data));
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
if (strcmp (gst_structure_get_name (structure),
"audio/x-raw-int") == 0) {
diff --git a/gst-libs/gst/play/play.old.c b/gst-libs/gst/play/play.old.c
index dd787001..513a3e12 100644
--- a/gst-libs/gst/play/play.old.c
+++ b/gst-libs/gst/play/play.old.c
@@ -910,7 +910,7 @@ gst_play_get_sink_element (GstPlay * play,
gboolean has_video_cap = FALSE, has_audio_cap = FALSE;
const char *media_type;
- media_type = gst_structure_get_name (gst_caps2_get_nth_cap (
+ media_type = gst_structure_get_name (gst_caps_get_structure (
gst_pad_get_caps (GST_PAD (pads->data)), 0));
if (strcmp (media_type, "audio/x-raw-int") == 0)
{
diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c
index 79db9420..7c200896 100644
--- a/gst-libs/gst/riff/riff-media.c
+++ b/gst-libs/gst/riff/riff-media.c
@@ -26,17 +26,17 @@
#include "riff-ids.h"
#include "riff-media.h"
-GstCaps2 *
+GstCaps *
gst_riff_create_video_caps (guint32 codec_fcc,
gst_riff_strh *strh,
gst_riff_strf_vids *strf)
{
- GstCaps2 *caps = NULL;
+ GstCaps *caps = NULL;
switch (codec_fcc) {
case GST_MAKE_FOURCC('I','4','2','0'):
case GST_MAKE_FOURCC('Y','U','Y','2'):
- caps = gst_caps2_new_simple ("video/x-raw-yuv",
+ caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, codec_fcc,
NULL);
break;
@@ -45,16 +45,16 @@ gst_riff_create_video_caps (guint32 codec_fcc,
case GST_MAKE_FOURCC('J','P','E','G'): /* generic (mostly RGB) MJPEG */
case GST_MAKE_FOURCC('P','I','X','L'): /* Miro/Pinnacle fourccs */
case GST_MAKE_FOURCC('V','I','X','L'): /* Miro/Pinnacle fourccs */
- caps = gst_caps2_new_simple ("video/x-jpeg", NULL);
+ caps = gst_caps_new_simple ("video/x-jpeg", NULL);
break;
case GST_MAKE_FOURCC('H','F','Y','U'):
- caps = gst_caps2_new_simple ( "video/x-huffyuv", NULL);
+ caps = gst_caps_new_simple ( "video/x-huffyuv", NULL);
break;
case GST_MAKE_FOURCC('M','P','E','G'):
case GST_MAKE_FOURCC('M','P','G','I'):
- caps = gst_caps2_new_simple ("video/mpeg",
+ caps = gst_caps_new_simple ("video/mpeg",
"systemstream", G_TYPE_BOOLEAN, FALSE,
"mpegversion", G_TYPE_BOOLEAN, 1,
NULL);
@@ -67,13 +67,13 @@ gst_riff_create_video_caps (guint32 codec_fcc,
case GST_MAKE_FOURCC('V','D','O','W'):
case GST_MAKE_FOURCC('V','I','V','O'):
case GST_MAKE_FOURCC('x','2','6','3'):
- caps = gst_caps2_new_simple ("video/x-h263", NULL);
+ caps = gst_caps_new_simple ("video/x-h263", NULL);
break;
case GST_MAKE_FOURCC('D','I','V','3'):
case GST_MAKE_FOURCC('D','I','V','4'):
case GST_MAKE_FOURCC('D','I','V','5'):
- caps = gst_caps2_new_simple ("video/x-divx",
+ caps = gst_caps_new_simple ("video/x-divx",
"divxversion", G_TYPE_INT, 3,
NULL);
break;
@@ -81,54 +81,54 @@ gst_riff_create_video_caps (guint32 codec_fcc,
case GST_MAKE_FOURCC('d','i','v','x'):
case GST_MAKE_FOURCC('D','I','V','X'):
case GST_MAKE_FOURCC('D','X','5','0'):
- caps = gst_caps2_new_simple ("video/x-divx",
+ caps = gst_caps_new_simple ("video/x-divx",
"divxversion", G_TYPE_INT, 5,
NULL);
break;
case GST_MAKE_FOURCC('X','V','I','D'):
case GST_MAKE_FOURCC('x','v','i','d'):
- caps = gst_caps2_new_simple ("video/x-xvid", NULL);
+ caps = gst_caps_new_simple ("video/x-xvid", NULL);
break;
case GST_MAKE_FOURCC('M','P','G','4'):
- caps = gst_caps2_new_simple ("video/x-msmpeg",
+ caps = gst_caps_new_simple ("video/x-msmpeg",
"msmpegversion", G_TYPE_INT, 41,
NULL);
break;
case GST_MAKE_FOURCC('M','P','4','2'):
- caps = gst_caps2_new_simple ("video/x-msmpeg",
+ caps = gst_caps_new_simple ("video/x-msmpeg",
"msmpegversion", G_TYPE_INT, 42,
NULL);
break;
case GST_MAKE_FOURCC('M','P','4','3'):
- caps = gst_caps2_new_simple ("video/x-msmpeg",
+ caps = gst_caps_new_simple ("video/x-msmpeg",
"msmpegversion", G_TYPE_INT, 43,
NULL);
break;
case GST_MAKE_FOURCC('3','I','V','1'):
case GST_MAKE_FOURCC('3','I','V','2'):
- caps = gst_caps2_new_simple ( "video/x-3ivx", NULL);
+ caps = gst_caps_new_simple ( "video/x-3ivx", NULL);
break;
case GST_MAKE_FOURCC('D','V','S','D'):
case GST_MAKE_FOURCC('d','v','s','d'):
- caps = gst_caps2_new_simple ("video/x-dv",
+ caps = gst_caps_new_simple ("video/x-dv",
"systemstream", G_TYPE_BOOLEAN, FALSE,
NULL);
break;
case GST_MAKE_FOURCC('W','M','V','1'):
- caps = gst_caps2_new_simple ("video/x-wmv",
+ caps = gst_caps_new_simple ("video/x-wmv",
"wmvversion", G_TYPE_INT, 1,
NULL);
break;
case GST_MAKE_FOURCC('W','M','V','2'):
- caps = gst_caps2_new_simple ("video/x-wmv",
+ caps = gst_caps_new_simple ("video/x-wmv",
"wmvversion", G_TYPE_INT, 2,
NULL);
break;
@@ -142,20 +142,20 @@ gst_riff_create_video_caps (guint32 codec_fcc,
if (strh != NULL) {
gfloat fps = 1. * strh->rate / strh->scale;
- gst_caps2_set_simple (caps, "framerate", G_TYPE_DOUBLE, fps, NULL);
+ gst_caps_set_simple (caps, "framerate", G_TYPE_DOUBLE, fps, NULL);
} else {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE,
NULL);
}
if (strf != NULL) {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"width", G_TYPE_INT, strf->width,
"height", G_TYPE_INT, strf->height,
NULL);
} else {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"width", GST_TYPE_INT_RANGE, 16, 4096,
"height", GST_TYPE_INT_RANGE, 16, 4096,
NULL);
@@ -164,23 +164,23 @@ gst_riff_create_video_caps (guint32 codec_fcc,
return caps;
}
-GstCaps2 *
+GstCaps *
gst_riff_create_audio_caps (guint16 codec_id,
gst_riff_strh *strh,
gst_riff_strf_auds *strf)
{
- GstCaps2 *caps = NULL;
+ GstCaps *caps = NULL;
switch (codec_id) {
case GST_RIFF_WAVE_FORMAT_MPEGL3: /* mp3 */
- caps = gst_caps2_new_simple ("audio/mpeg",
+ caps = gst_caps_new_simple ("audio/mpeg",
"mpegversion", G_TYPE_INT, 1,
"layer", G_TYPE_INT, 3,
NULL);
break;
case GST_RIFF_WAVE_FORMAT_MPEGL12: /* mp1 or mp2 */
- caps = gst_caps2_new_simple ("audio/mpeg",
+ caps = gst_caps_new_simple ("audio/mpeg",
"layer", G_TYPE_INT, 2,
NULL);
break;
@@ -191,14 +191,14 @@ gst_riff_create_audio_caps (guint16 codec_id,
gint ch = GUINT16_FROM_LE (strf->channels);
gint ws = GUINT16_FROM_LE (strf->size);
- caps = gst_caps2_new_simple ("audio/x-raw-int",
+ caps = gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
"width", G_TYPE_INT, (int)(ba * 8 / ch),
"depth", G_TYPE_INT, ws,
"signed", G_TYPE_BOOLEAN, ws != 8,
NULL);
} else {
- caps = gst_caps2_from_string ("audio/x-raw-int, "
+ caps = gst_caps_from_string ("audio/x-raw-int, "
"endianness = (int) LITTLE_ENDIAN, "
"signed = (boolean) { true, false }, "
"width = (int) { 8, 16 }, "
@@ -211,7 +211,7 @@ gst_riff_create_audio_caps (guint16 codec_id,
GST_WARNING ("invalid depth (%d) of mulaw audio, overwriting.",
strf->size);
}
- caps = gst_caps2_new_simple ("audio/x-mulaw", NULL);
+ caps = gst_caps_new_simple ("audio/x-mulaw", NULL);
break;
case GST_RIFF_WAVE_FORMAT_ALAW:
@@ -219,7 +219,7 @@ gst_riff_create_audio_caps (guint16 codec_id,
GST_WARNING ("invalid depth (%d) of alaw audio, overwriting.",
strf->size);
}
- caps = gst_caps2_new_simple ("audio/x-alaw", NULL);
+ caps = gst_caps_new_simple ("audio/x-alaw", NULL);
break;
case GST_RIFF_WAVE_FORMAT_VORBIS1: /* ogg/vorbis mode 1 */
@@ -228,11 +228,11 @@ gst_riff_create_audio_caps (guint16 codec_id,
case GST_RIFF_WAVE_FORMAT_VORBIS1PLUS: /* ogg/vorbis mode 1+ */
case GST_RIFF_WAVE_FORMAT_VORBIS2PLUS: /* ogg/vorbis mode 2+ */
case GST_RIFF_WAVE_FORMAT_VORBIS3PLUS: /* ogg/vorbis mode 3+ */
- caps = gst_caps2_new_simple ("audio/x-vorbis", NULL);
+ caps = gst_caps_new_simple ("audio/x-vorbis", NULL);
break;
case GST_RIFF_WAVE_FORMAT_A52:
- caps = gst_caps2_new_simple ("audio/x-ac3", NULL);
+ caps = gst_caps_new_simple ("audio/x-ac3", NULL);
break;
default:
@@ -242,12 +242,12 @@ gst_riff_create_audio_caps (guint16 codec_id,
}
if (strf != NULL) {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"rate", G_TYPE_INT, strf->rate,
"channels", G_TYPE_INT, strf->channels,
NULL);
} else {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"rate", GST_TYPE_INT_RANGE, 8000, 96000,
"channels", GST_TYPE_INT_RANGE, 1, 2,
NULL);
@@ -256,18 +256,18 @@ gst_riff_create_audio_caps (guint16 codec_id,
return caps;
}
-GstCaps2 *
+GstCaps *
gst_riff_create_iavs_caps (guint32 codec_fcc,
gst_riff_strh *strh,
gst_riff_strf_iavs *strf)
{
- GstCaps2 *caps = NULL;
+ GstCaps *caps = NULL;
switch (codec_fcc) {
/* is this correct? */
case GST_MAKE_FOURCC ('D','V','S','D'):
case GST_MAKE_FOURCC ('d','v','s','d'):
- caps = gst_caps2_new_simple ("video/x-dv",
+ caps = gst_caps_new_simple ("video/x-dv",
"systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
default:
@@ -283,7 +283,7 @@ gst_riff_create_iavs_caps (guint32 codec_fcc,
* Functions below are for template caps. All is variable.
*/
-GstCaps2 *
+GstCaps *
gst_riff_create_video_template_caps (void)
{
guint32 tags[] = {
@@ -307,19 +307,19 @@ gst_riff_create_video_template_caps (void)
0
};
guint i;
- GstCaps2 *caps, *one;
+ GstCaps *caps, *one;
- caps = gst_caps2_new_empty ();
+ caps = gst_caps_new_empty ();
for (i = 0; tags[i] != 0; i++) {
one = gst_riff_create_video_caps (tags[i], NULL, NULL);
if (one)
- gst_caps2_append (caps, one);
+ gst_caps_append (caps, one);
}
return caps;
}
-GstCaps2 *
+GstCaps *
gst_riff_create_audio_template_caps (void)
{
guint16 tags[] = {
@@ -334,19 +334,19 @@ gst_riff_create_audio_template_caps (void)
0
};
guint i;
- GstCaps2 *caps, *one;
+ GstCaps *caps, *one;
- caps = gst_caps2_new_empty ();
+ caps = gst_caps_new_empty ();
for (i = 0; tags[i] != 0; i++) {
one = gst_riff_create_audio_caps (tags[i], NULL, NULL);
if (one)
- gst_caps2_append (caps, one);
+ gst_caps_append (caps, one);
}
return caps;
}
-GstCaps2 *
+GstCaps *
gst_riff_create_iavs_template_caps (void)
{
guint32 tags[] = {
@@ -355,13 +355,13 @@ gst_riff_create_iavs_template_caps (void)
0
};
guint i;
- GstCaps2 *caps, *one;
+ GstCaps *caps, *one;
- caps = gst_caps2_new_empty ();
+ caps = gst_caps_new_empty ();
for (i = 0; tags[i] != 0; i++) {
one = gst_riff_create_iavs_caps (tags[i], NULL, NULL);
if (one)
- gst_caps2_append (caps, one);
+ gst_caps_append (caps, one);
}
return caps;
diff --git a/gst-libs/gst/riff/riff-media.h b/gst-libs/gst/riff/riff-media.h
index 1607fc3a..256ed947 100644
--- a/gst-libs/gst/riff/riff-media.h
+++ b/gst-libs/gst/riff/riff-media.h
@@ -32,13 +32,13 @@ G_BEGIN_DECLS
* Create one caps. strh/strf can be NULL (for non-fixed caps).
*/
-GstCaps2 *gst_riff_create_video_caps (guint32 codec_fcc,
+GstCaps *gst_riff_create_video_caps (guint32 codec_fcc,
gst_riff_strh *strh,
gst_riff_strf_vids *strf);
-GstCaps2 *gst_riff_create_audio_caps (guint16 codec_id,
+GstCaps *gst_riff_create_audio_caps (guint16 codec_id,
gst_riff_strh *strh,
gst_riff_strf_auds *strf);
-GstCaps2 *gst_riff_create_iavs_caps (guint32 codec_fcc,
+GstCaps *gst_riff_create_iavs_caps (guint32 codec_fcc,
gst_riff_strh *strh,
gst_riff_strf_iavs *strf);
@@ -46,9 +46,9 @@ GstCaps2 *gst_riff_create_iavs_caps (guint32 codec_fcc,
* Create template caps (includes all known types).
*/
-GstCaps2 *gst_riff_create_video_template_caps (void);
-GstCaps2 *gst_riff_create_audio_template_caps (void);
-GstCaps2 *gst_riff_create_iavs_template_caps (void);
+GstCaps *gst_riff_create_video_template_caps (void);
+GstCaps *gst_riff_create_audio_template_caps (void);
+GstCaps *gst_riff_create_iavs_template_caps (void);
G_END_DECLS
diff --git a/gst-libs/gst/riff/riff-read.c b/gst-libs/gst/riff/riff-read.c
index 17daf024..815b3a7b 100644
--- a/gst-libs/gst/riff/riff-read.c
+++ b/gst-libs/gst/riff/riff-read.c
@@ -80,7 +80,7 @@ gst_riff_read_class_init (GstRiffReadClass *klass)
g_object_class_install_property (gobject_class, ARG_METADATA,
g_param_spec_boxed ("metadata", "Metadata", "Metadata",
- GST_TYPE_CAPS2, G_PARAM_READABLE));
+ GST_TYPE_CAPS, G_PARAM_READABLE));
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
@@ -128,7 +128,7 @@ gst_riff_read_change_state (GstElement *element)
riff->bs = gst_bytestream_new (riff->sinkpad);
break;
case GST_STATE_PAUSED_TO_READY:
- gst_caps2_replace (&riff->metadata, NULL);
+ gst_caps_replace (&riff->metadata, NULL);
gst_bytestream_destroy (riff->bs);
while (riff->level) {
GstRiffLevel *level = riff->level->data;
@@ -714,7 +714,7 @@ gst_riff_read_info (GstRiffRead *riff)
GstRiffLevel *level;
GList *last;
gchar *name, *type;
- GstCaps2 *caps;
+ GstCaps *caps;
/* What we're doing here is ugly (oh no!); we look
* at our LIST tag size and assure that we do not
@@ -726,7 +726,7 @@ gst_riff_read_info (GstRiffRead *riff)
end = level->start + level->length;
g_free (level);
- caps = gst_caps2_new_simple ("application/x-gst-metadata", NULL);
+ caps = gst_caps_new_simple ("application/x-gst-metadata", NULL);
while (gst_bytestream_tell (riff->bs) < end) {
if (!gst_riff_peek_head (riff, &tag, NULL, NULL)) {
@@ -816,14 +816,14 @@ gst_riff_read_info (GstRiffRead *riff)
return FALSE;
}
- gst_caps2_set_simple (caps, type, G_TYPE_STRING, name, NULL);
+ gst_caps_set_simple (caps, type, G_TYPE_STRING, name, NULL);
} else {
gst_riff_read_skip (riff);
}
}
/* let the world know about this wonderful thing */
- gst_caps2_replace (&riff->metadata, caps);
+ gst_caps_replace (&riff->metadata, caps);
g_object_notify (G_OBJECT (riff), "metadata");
return TRUE;
diff --git a/gst-libs/gst/riff/riff-read.h b/gst-libs/gst/riff/riff-read.h
index cf8c379b..a0f92e3e 100644
--- a/gst-libs/gst/riff/riff-read.h
+++ b/gst-libs/gst/riff/riff-read.h
@@ -55,7 +55,7 @@ typedef struct _GstRiffRead {
GList *level;
/* metadata */
- GstCaps2 *metadata;
+ GstCaps *metadata;
} GstRiffRead;
typedef struct _GstRiffReadClass {
diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c
index 2fc54003..6d804a4d 100644
--- a/gst-libs/gst/video/video.c
+++ b/gst-libs/gst/video/video.c
@@ -30,7 +30,7 @@ gdouble
gst_video_frame_rate (GstPad *pad)
{
gdouble fps = 0.;
- GstCaps2 *caps;
+ GstCaps *caps;
GstStructure *structure;
/* get pad caps */
@@ -42,7 +42,7 @@ gst_video_frame_rate (GstPad *pad)
return 0.;
}
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
if (!gst_structure_get_double (structure, "framerate", &fps)){
g_warning ("gstvideo: failed to get framerate property of pad %s:%s",
GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
@@ -62,7 +62,7 @@ gst_video_get_size (GstPad *pad,
gint *width,
gint *height)
{
- GstCaps2 *caps;
+ GstCaps *caps;
GstStructure *structure;
gboolean ret;
@@ -79,7 +79,7 @@ gst_video_get_size (GstPad *pad,
return FALSE;
}
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
ret = gst_structure_get_int (structure, "width", width);
ret &= gst_structure_get_int (structure, "height", height);
diff --git a/gst/ac3parse/gstac3parse.c b/gst/ac3parse/gstac3parse.c
index c1148c87..b87eaba3 100644
--- a/gst/ac3parse/gstac3parse.c
+++ b/gst/ac3parse/gstac3parse.c
@@ -337,8 +337,8 @@ gst_ac3parse_chain (GstPad *pad, GstData *_data)
need_capsnego = TRUE;
}
if (need_capsnego) {
- GstCaps2 *newcaps;
- newcaps = gst_caps2_new_simple ("audio/x-ac3",
+ GstCaps *newcaps;
+ newcaps = gst_caps_new_simple ("audio/x-ac3",
"channels", G_TYPE_INT, channels,
"rate", G_TYPE_INT, sample_rate, NULL);
if (gst_pad_try_set_caps (ac3parse->srcpad, newcaps) <= 0) {
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index b8511ee4..156b27b5 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -77,13 +77,13 @@ static gboolean gst_asf_demux_add_audio_stream (GstASFDemux *asf_demu
guint16 id);
static gboolean gst_asf_demux_setup_pad (GstASFDemux *asf_demux,
GstPad *src_pad,
- GstCaps2 *caps_list,
+ GstCaps *caps_list,
guint16 id);
static GstElementStateReturn gst_asf_demux_change_state (GstElement *element);
-static GstCaps2 * gst_asf_demux_video_caps (guint32 codec_fcc,
+static GstCaps * gst_asf_demux_video_caps (guint32 codec_fcc,
asf_stream_video_format *video);
-static GstCaps2 * gst_asf_demux_audio_caps (guint16 codec_id,
+static GstCaps * gst_asf_demux_audio_caps (guint16 codec_id,
asf_stream_audio *audio, guint8 *extradata);
static GstPadTemplate *videosrctempl, *audiosrctempl;
@@ -116,7 +116,7 @@ gst_asf_demux_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
int i;
- GstCaps2 *audcaps, *vidcaps, *temp;
+ GstCaps *audcaps, *vidcaps, *temp;
guint32 vid_list[] = {
GST_MAKE_FOURCC('I','4','2','0'),
GST_MAKE_FOURCC('Y','U','Y','2'),
@@ -143,10 +143,10 @@ gst_asf_demux_base_init (gpointer g_class)
-1 /* end */
};
- audcaps = gst_caps2_new_empty();
+ audcaps = gst_caps_new_empty();
for (i = 0; aud_list[i] != -1; i++) {
temp = gst_asf_demux_audio_caps (aud_list[i], NULL, NULL);
- gst_caps2_append (audcaps, temp);
+ gst_caps_append (audcaps, temp);
}
audiosrctempl = gst_pad_template_new ("audio_%02d",
@@ -154,10 +154,10 @@ gst_asf_demux_base_init (gpointer g_class)
GST_PAD_SOMETIMES,
audcaps);
- vidcaps = gst_caps2_new_empty();
+ vidcaps = gst_caps_new_empty();
for (i = 0; vid_list[i] != 0; i++) {
temp = gst_asf_demux_video_caps (vid_list[i], NULL);
- gst_caps2_append (vidcaps, temp);
+ gst_caps_append (vidcaps, temp);
}
videosrctempl = gst_pad_template_new ("video_%02d",
@@ -1245,11 +1245,11 @@ gst_asf_demux_identify_guid (GstASFDemux *asf_demux,
##props)
#endif
-static GstCaps2 *
+static GstCaps *
gst_asf_demux_audio_caps (guint16 codec_id,
asf_stream_audio *audio, guint8 *extradata)
{
- GstCaps2 *caps;
+ GstCaps *caps;
gint flags1, flags2;
flags1 = 0;
@@ -1257,15 +1257,15 @@ gst_asf_demux_audio_caps (guint16 codec_id,
switch (codec_id) {
case GST_RIFF_WAVE_FORMAT_MPEGL3: /* mp3 */
- caps = gst_caps2_from_string ("audio/mpeg, layer = (int) 3");
+ caps = gst_caps_from_string ("audio/mpeg, layer = (int) 3");
break;
case GST_RIFF_WAVE_FORMAT_MPEGL12: /* mp1 or mp2 */
- caps = gst_caps2_from_string ("audio/mpeg, layer = (int) 2");
+ caps = gst_caps_from_string ("audio/mpeg, layer = (int) 2");
break;
case GST_RIFF_WAVE_FORMAT_PCM: /* PCM/wav */ {
- 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 }, "
@@ -1276,7 +1276,7 @@ gst_asf_demux_audio_caps (guint16 codec_id,
gint ch = GUINT16_FROM_LE (audio->channels);
gint ws = GUINT16_FROM_LE (audio->word_size);
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"width", G_TYPE_INT, (int)(ba * 8 / ch),
"depth", G_TYPE_INT, ws,
"signed", G_TYPE_BOOLEAN, (ws != 8),
@@ -1291,11 +1291,11 @@ gst_asf_demux_audio_caps (guint16 codec_id,
case GST_RIFF_WAVE_FORMAT_VORBIS1PLUS: /* vorbis mode 1+ */
case GST_RIFF_WAVE_FORMAT_VORBIS2PLUS: /* vorbis mode 2+ */
case GST_RIFF_WAVE_FORMAT_VORBIS3PLUS: /* vorbis mode 3+ */
- caps = gst_caps2_from_string("audio/x-vorbis");
+ caps = gst_caps_from_string("audio/x-vorbis");
break;
case GST_RIFF_WAVE_FORMAT_A52:
- caps = gst_caps2_from_string("audio/x-ac3");
+ caps = gst_caps_from_string("audio/x-ac3");
break;
case GST_RIFF_WAVE_FORMAT_DIVX_WMAV1:
@@ -1304,14 +1304,14 @@ gst_asf_demux_audio_caps (guint16 codec_id,
flags1 = extradata[0] | (extradata[1] << 8);
flags2 = extradata[2] | (extradata[3] << 8);
}
- caps = gst_caps2_from_string("audio/x-wma, "
+ caps = gst_caps_from_string("audio/x-wma, "
"wmaversion = (int) 1, "
"flags1 = (int) [ MIN, MAX ], "
"flags2 = (int) [ MIN, MAX ], "
"block_align = (int) [ 0, MAX ], "
"bitrate = (int) [ 0, MAX ]");
if (audio != NULL) {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"flags1", G_TYPE_INT, flags1,
"flags2", G_TYPE_INT, flags1,
"block_align", G_TYPE_INT, audio->block_align,
@@ -1327,14 +1327,14 @@ gst_asf_demux_audio_caps (guint16 codec_id,
(extradata[2] << 16) | (extradata[3] << 24);
flags2 = extradata[4] | (extradata[5] << 8);
}
- caps = gst_caps2_from_string("audio/x-wma, "
+ caps = gst_caps_from_string("audio/x-wma, "
"wmaversion = (int) 2, "
"flags1 = (int) [ MIN, MAX ], "
"flags2 = (int) [ MIN, MAX ], "
"block_align = (int) [ 0, MAX ], "
"bitrate = (int) [ 0, MAX ]");
if (audio != NULL) {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"flags1", G_TYPE_INT, flags1,
"flags2", G_TYPE_INT, flags1,
"block_align", G_TYPE_INT, audio->block_align,
@@ -1344,24 +1344,24 @@ gst_asf_demux_audio_caps (guint16 codec_id,
break;
case GST_RIFF_WAVE_FORMAT_WMAV9:
- caps = gst_caps2_from_string("audio/x-wma, "
+ caps = gst_caps_from_string("audio/x-wma, "
"wmaversion = (int) 9");
break;
default:
g_warning ("asfdemux: unkown audio format 0x%04x",
codec_id);
- return GST_CAPS2_ANY;
+ return GST_CAPS_ANY;
break;
}
if (audio != NULL) {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"rate", G_TYPE_INT, GUINT32_FROM_LE (audio->sample_rate),
"channels", G_TYPE_INT, GUINT16_FROM_LE (audio->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);
@@ -1376,7 +1376,7 @@ gst_asf_demux_add_audio_stream (GstASFDemux *asf_demux,
guint16 id)
{
GstPad *src_pad;
- GstCaps2 *caps;
+ GstCaps *caps;
gchar *name = NULL;
guint16 size_left = 0;
guint8 *extradata=NULL;
@@ -1447,11 +1447,11 @@ gst_asf_demux_add_audio_stream (GstASFDemux *asf_demux,
##props)
#endif
-static GstCaps2 *
+static GstCaps *
gst_asf_demux_video_caps (guint32 codec_fcc,
asf_stream_video_format *video)
{
- GstCaps2 *caps = NULL;
+ GstCaps *caps = NULL;
gint width = 0, height = 0;
if (video != NULL) {
@@ -1462,7 +1462,7 @@ gst_asf_demux_video_caps (guint32 codec_fcc,
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;
@@ -1470,51 +1470,51 @@ gst_asf_demux_video_caps (guint32 codec_fcc,
case GST_MAKE_FOURCC('J','P','E','G'):
case GST_MAKE_FOURCC('P','I','X','L'):
case GST_MAKE_FOURCC('V','I','X','L'):
- caps = gst_caps2_new_simple ("video/x-jpeg", NULL);
+ caps = gst_caps_new_simple ("video/x-jpeg", 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;
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('D','I','V','3'):
case GST_MAKE_FOURCC('D','I','V','4'):
case GST_MAKE_FOURCC('D','I','V','5'):
- caps = gst_caps2_new_simple ("video/x-divx",
+ caps = gst_caps_new_simple ("video/x-divx",
"divxversion", G_TYPE_INT, 3, NULL);
break;
case GST_MAKE_FOURCC('D','I','V','X'):
case GST_MAKE_FOURCC('d','i','v','x'):
case GST_MAKE_FOURCC('D','X','5','0'):
- caps = gst_caps2_new_simple ("video/x-divx",
+ caps = gst_caps_new_simple ("video/x-divx",
"divxversion", G_TYPE_INT, 5, NULL);
break;
@@ -1526,12 +1526,12 @@ gst_asf_demux_video_caps (guint32 codec_fcc,
}
if (video != NULL) {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"width", G_TYPE_INT, GUINT32_FROM_LE (video->width),
"height", G_TYPE_INT, GUINT32_FROM_LE (video->height),
"framerate", G_TYPE_DOUBLE, 0, NULL);
} else {
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"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,
@@ -1546,7 +1546,7 @@ gst_asf_demux_add_video_stream (GstASFDemux *asf_demux,
asf_stream_video_format *video,
guint16 id) {
GstPad *src_pad;
- GstCaps2 *caps;
+ GstCaps *caps;
gchar *name = NULL;
/* Create the audio pad */
@@ -1572,7 +1572,7 @@ gst_asf_demux_add_video_stream (GstASFDemux *asf_demux,
static gboolean
gst_asf_demux_setup_pad (GstASFDemux *asf_demux,
GstPad *src_pad,
- GstCaps2 *caps_list,
+ GstCaps *caps_list,
guint16 id)
{
asf_stream_context *stream;
diff --git a/gst/asfdemux/gstasfmux.c b/gst/asfdemux/gstasfmux.c
index 86537cc5..e2dae11f 100644
--- a/gst/asfdemux/gstasfmux.c
+++ b/gst/asfdemux/gstasfmux.c
@@ -254,7 +254,7 @@ gst_asfmux_init (GstAsfMux *asfmux)
}
static GstPadLinkReturn
-gst_asfmux_vidsink_link (GstPad *pad, const GstCaps2 *caps)
+gst_asfmux_vidsink_link (GstPad *pad, const GstCaps *caps)
{
GstAsfMux *asfmux;
GstAsfMuxStream *stream = NULL;
@@ -279,7 +279,7 @@ gst_asfmux_vidsink_link (GstPad *pad, const GstCaps2 *caps)
GST_DEBUG ("asfmux: video sinkconnect triggered on %s",
gst_pad_get_name (pad));
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
/* global */
ret = gst_structure_get_int (structure, "width", &w);
@@ -387,7 +387,7 @@ done:
}
static GstPadLinkReturn
-gst_asfmux_audsink_link (GstPad *pad, const GstCaps2 *caps)
+gst_asfmux_audsink_link (GstPad *pad, const GstCaps *caps)
{
GstAsfMux *asfmux;
GstAsfMuxStream *stream = NULL;
@@ -412,7 +412,7 @@ gst_asfmux_audsink_link (GstPad *pad, const GstCaps2 *caps)
GST_DEBUG ("asfmux: audio sink_link triggered on %s",
gst_pad_get_name (pad));
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
/* we want these for all */
ret = gst_structure_get_int (structure, "channels", &channels);
diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c
index cc56bb01..e0691916 100644
--- a/gst/mpegaudioparse/gstmpegaudioparse.c
+++ b/gst/mpegaudioparse/gstmpegaudioparse.c
@@ -219,18 +219,18 @@ mp3_type_frame_length_from_header (guint32 header, guint *put_layer,
#define GST_MP3_TYPEFIND_MIN_HEADERS 3
#define GST_MP3_TYPEFIND_MIN_DATA (1440 * (GST_MP3_TYPEFIND_MIN_HEADERS + 1) - 1 + 3)
-static GstCaps2 *
+static GstCaps *
mp3_caps_create (guint layer, guint channels,
guint bitrate, guint samplerate)
{
- GstCaps2 *new;
+ GstCaps *new;
g_assert (layer);
g_assert (samplerate);
g_assert (bitrate);
g_assert (channels);
- new = gst_caps2_new_simple ("audio/mpeg",
+ new = gst_caps_new_simple ("audio/mpeg",
"mpegversion", G_TYPE_INT, 1,
"layer", G_TYPE_INT, layer,
"rate", G_TYPE_INT, samplerate,
@@ -461,7 +461,7 @@ bpf_from_header (GstMPEGAudioParse *parse, unsigned long header)
rate != parse->rate ||
layer != parse->layer ||
bitrate != parse->bit_rate) {
- GstCaps2 *caps = mp3_caps_create (layer, channels, bitrate, rate);
+ GstCaps *caps = mp3_caps_create (layer, channels, bitrate, rate);
if (gst_pad_try_set_caps(parse->srcpad, caps) <= 0) {
gst_element_error (GST_ELEMENT (parse),
diff --git a/gst/mpegstream/gstmpegdemux.c b/gst/mpegstream/gstmpegdemux.c
index b0b4a9f6..dc2ef81b 100644
--- a/gst/mpegstream/gstmpegdemux.c
+++ b/gst/mpegstream/gstmpegdemux.c
@@ -92,7 +92,7 @@ GST_STATIC_PAD_TEMPLATE (
"private_stream_2",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static GstStaticPadTemplate pcm_factory =
@@ -115,7 +115,7 @@ GST_STATIC_PAD_TEMPLATE (
"subtitle_stream_%d",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static void gst_mpeg_demux_class_init (GstMPEGDemuxClass *klass);
@@ -383,7 +383,7 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
gchar *name = NULL;
GstMPEGStream **outstream = NULL;
GstPadTemplate *newtemp = NULL;
- GstCaps2 *caps = NULL;
+ GstCaps *caps = NULL;
stream_id = *buf++;
if (!(stream_id & 0x80)) {
@@ -428,11 +428,11 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
outstream = &mpeg_demux->video_stream[stream_id & 0x0F];
newtemp = gst_static_pad_template_get (&video_src_factory);
if (!GST_MPEG_PARSE_IS_MPEG2 (mpeg_demux)) {
- caps = gst_caps2_new_simple ("video/mpeg",
+ caps = gst_caps_new_simple ("video/mpeg",
"mpegversion", G_TYPE_INT, 1,
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
} else {
- caps = gst_caps2_new_simple ("video/mpeg",
+ caps = gst_caps_new_simple ("video/mpeg",
"mpegversion", G_TYPE_INT, 2,
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
}
@@ -851,7 +851,7 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
/* the app and used to attach to desired streams. */
if ((*outstream) == NULL) {
gchar *name = NULL;
- GstCaps2 *caps = NULL;
+ GstCaps *caps = NULL;
/* we have to name the stream approriately */
if (id == 0xBD) {
@@ -887,12 +887,12 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
name = g_strdup_printf ("video_%02d", id - 0xE0);
newtemp = gst_static_pad_template_get (&video_src_factory);
if (!GST_MPEG_PARSE_IS_MPEG2 (mpeg_demux)) {
- caps = gst_caps2_new_simple ("video/mpeg",
+ caps = gst_caps_new_simple ("video/mpeg",
"mpegversion", G_TYPE_INT, 1,
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
}
else {
- caps = gst_caps2_new_simple ("video/mpeg",
+ caps = gst_caps_new_simple ("video/mpeg",
"mpegversion", G_TYPE_INT, 2,
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
}
@@ -989,7 +989,7 @@ static void
gst_mpeg_demux_lpcm_set_caps (GstPad *pad, guint8 sample_info)
{
gint width, rate, channels;
- GstCaps2 *caps;
+ GstCaps *caps;
/* Determine the sample width. */
switch (sample_info & 0xC0) {
@@ -1014,7 +1014,7 @@ gst_mpeg_demux_lpcm_set_caps (GstPad *pad, guint8 sample_info)
/* Determine the number of channels. */
channels = (sample_info & 0x7) + 1;
- caps = gst_caps2_new_simple ("audio/x-raw-int",
+ caps = gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BIG_ENDIAN,
"signed", G_TYPE_BOOLEAN, TRUE,
"width", G_TYPE_INT, width,
diff --git a/gst/mpegstream/gstmpegparse.c b/gst/mpegstream/gstmpegparse.c
index f168c852..a2ff52b2 100644
--- a/gst/mpegstream/gstmpegparse.c
+++ b/gst/mpegstream/gstmpegparse.c
@@ -239,7 +239,7 @@ gst_mpeg_parse_update_streaminfo (GstMPEGParse *mpeg_parse)
GstProps *props;
GstPropsEntry *entry;
gboolean mpeg2 = GST_MPEG_PACKETIZE_IS_MPEG2 (mpeg_parse->packetize);
- GstCaps2 *caps;
+ GstCaps *caps;
props = gst_props_empty_new ();
@@ -275,7 +275,7 @@ gst_mpeg_parse_send_data (GstMPEGParse *mpeg_parse, GstData *data, GstClockTime
gboolean mpeg2 = GST_MPEG_PACKETIZE_IS_MPEG2 (mpeg_parse->packetize);
if (gst_pad_try_set_caps (mpeg_parse->srcpad,
- gst_caps2_new_simple ("video/mpeg",
+ gst_caps_new_simple ("video/mpeg",
"mpegversion", G_TYPE_INT, (mpeg2 ? 2 : 1),
"systemstream", G_TYPE_BOOLEAN, TRUE,
"parsed", G_TYPE_BOOLEAN, TRUE, NULL)) < 0)
@@ -517,7 +517,7 @@ gst_mpeg_parse_loop (GstElement *element)
gboolean mpeg2 = GST_MPEG_PACKETIZE_IS_MPEG2 (mpeg_parse->packetize);
if (gst_pad_try_set_caps (mpeg_parse->sinkpad,
- gst_caps2_new_simple ("video/mpeg",
+ gst_caps_new_simple ("video/mpeg",
"mpegversion", G_TYPE_INT, (mpeg2 ? 2 : 1),
"systemstream", G_TYPE_BOOLEAN, TRUE,
"parsed", G_TYPE_BOOLEAN, TRUE, NULL)) < 0)
diff --git a/gst/realmedia/rmdemux.c b/gst/realmedia/rmdemux.c
index 546cd4c1..0c96437d 100644
--- a/gst/realmedia/rmdemux.c
+++ b/gst/realmedia/rmdemux.c
@@ -36,7 +36,7 @@ struct _GstRMDemuxStream {
guint32 subtype;
guint32 fourcc;
int id;
- GstCaps2 *caps;
+ GstCaps *caps;
GstPad *pad;
int n_samples;
int timescale;
@@ -105,7 +105,7 @@ GST_STATIC_PAD_TEMPLATE (
"video_%02d",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static GstStaticPadTemplate gst_rmdemux_audiosrc_template =
@@ -113,7 +113,7 @@ GST_STATIC_PAD_TEMPLATE (
"audio_%02d",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static GstElementClass *parent_class = NULL;
@@ -125,8 +125,8 @@ static GstElementStateReturn gst_rmdemux_change_state(GstElement *element);
static void gst_rmdemux_loop (GstElement *element);
static gboolean gst_rmdemux_handle_sink_event (GstRMDemux *rmdemux);
-//static GstCaps2 *gst_rmdemux_video_caps(GstRMDemux *rmdemux, guint32 fourcc);
-//static GstCaps2 *gst_rmdemux_audio_caps(GstRMDemux *rmdemux, guint32 fourcc);
+//static GstCaps *gst_rmdemux_video_caps(GstRMDemux *rmdemux, guint32 fourcc);
+//static GstCaps *gst_rmdemux_audio_caps(GstRMDemux *rmdemux, guint32 fourcc);
static void gst_rmdemux_parse__rmf(GstRMDemux *rmdemux, void *data, int length);
static void gst_rmdemux_parse_prop(GstRMDemux *rmdemux, void *data, int length);
@@ -462,7 +462,7 @@ static void gst_rmdemux_loop (GstElement *element)
}
-static GstCaps2 *gst_rmdemux_src_getcaps(GstPad *pad)
+static GstCaps *gst_rmdemux_src_getcaps(GstPad *pad)
{
GstRMDemux *rmdemux;
GstRMDemuxStream *stream;
@@ -474,13 +474,13 @@ static GstCaps2 *gst_rmdemux_src_getcaps(GstPad *pad)
g_return_val_if_fail(GST_IS_RMDEMUX(rmdemux), NULL);
stream = GST_PAD_ELEMENT_PRIVATE (pad);
- return gst_caps2_copy(stream->caps);
+ return gst_caps_copy(stream->caps);
}
#ifdef unused
/* This function is not useful currently */
static GstPadLinkReturn
-gst_rmdemux_src_link(GstPad *pad, static GstCaps2 *caps)
+gst_rmdemux_src_link(GstPad *pad, static GstCaps *caps)
{
GstRMDemux *rmdemux;
GstRMDemuxStream *stream;
@@ -526,7 +526,7 @@ void gst_rmdemux_add_stream(GstRMDemux *rmdemux, GstRMDemuxStream *stream)
gst_static_pad_template_get (&gst_rmdemux_videosrc_template),
g_strdup_printf ("video_%02d", rmdemux->n_video_streams));
if(stream->caps) {
- gst_caps2_set_simple (stream->caps,
+ gst_caps_set_simple (stream->caps,
"width", G_TYPE_INT, stream->width,
"height", G_TYPE_INT, stream->height, NULL);
}
@@ -536,8 +536,8 @@ void gst_rmdemux_add_stream(GstRMDemux *rmdemux, GstRMDemuxStream *stream)
stream->pad = gst_pad_new_from_template (
gst_static_pad_template_get (&gst_rmdemux_audiosrc_template),
g_strdup_printf ("audio_%02d", rmdemux->n_audio_streams));
- stream->caps = gst_caps2_new_simple("audio/a52",NULL);
- gst_caps2_set_simple (stream->caps,
+ stream->caps = gst_caps_new_simple("audio/a52",NULL);
+ gst_caps_set_simple (stream->caps,
"rate", G_TYPE_INT, (int)stream->rate,
"channels", G_TYPE_INT, stream->n_channels, NULL);
rmdemux->n_audio_streams++;
@@ -571,12 +571,12 @@ void gst_rmdemux_add_stream(GstRMDemux *rmdemux, GstRMDemuxStream *stream)
#if 0
-static GstCaps2 *gst_rmdemux_video_caps(GstRMDemux *rmdemux, guint32 fourcc)
+static GstCaps *gst_rmdemux_video_caps(GstRMDemux *rmdemux, guint32 fourcc)
{
return NULL;
}
-static GstCaps2 *gst_rmdemux_audio_caps(GstRMDemux *rmdemux, guint32 fourcc)
+static GstCaps *gst_rmdemux_audio_caps(GstRMDemux *rmdemux, guint32 fourcc)
{
return NULL;
}
diff --git a/gst/synaesthesia/gstsynaesthesia.c b/gst/synaesthesia/gstsynaesthesia.c
index 81fb8c0c..beb6ae8c 100644
--- a/gst/synaesthesia/gstsynaesthesia.c
+++ b/gst/synaesthesia/gstsynaesthesia.c
@@ -113,7 +113,7 @@ static GstElementStateReturn
gst_synaesthesia_change_state (GstElement *element);
static GstPadLinkReturn
- gst_synaesthesia_sink_link (GstPad *pad, const GstCaps2 *caps);
+ gst_synaesthesia_sink_link (GstPad *pad, const GstCaps *caps);
static GstElementClass *parent_class = NULL;
@@ -203,7 +203,7 @@ gst_synaesthesia_init (GstSynaesthesia *synaesthesia)
}
static GstPadLinkReturn
-gst_synaesthesia_sink_link (GstPad *pad, const GstCaps2 *caps)
+gst_synaesthesia_sink_link (GstPad *pad, const GstCaps *caps)
{
GstSynaesthesia *synaesthesia;
synaesthesia = GST_SYNAESTHESIA (gst_pad_get_parent (pad));