summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/riff
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/riff')
-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
4 files changed, 61 insertions, 61 deletions
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 {