summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/chart/gstchart.c12
-rw-r--r--gst/deinterlace/gstdeinterlace.c4
-rw-r--r--gst/filter/gstbpwsinc.c4
-rw-r--r--gst/filter/gstiir.c4
-rw-r--r--gst/filter/gstlpwsinc.c4
-rw-r--r--gst/flx/gstflxdec.c6
-rw-r--r--gst/mixmatrix/mixmatrix.c8
-rw-r--r--gst/modplug/gstmodplug.cc16
-rw-r--r--gst/mpeg1videoparse/gstmp1videoparse.c4
-rw-r--r--gst/mpegaudioparse/gstmpegaudioparse.c8
-rw-r--r--gst/overlay/gstoverlay.c8
-rw-r--r--gst/passthrough/gstpassthrough.c6
-rw-r--r--gst/playondemand/gstplayondemand.c6
-rw-r--r--gst/qtdemux/qtdemux.c94
-rw-r--r--gst/smooth/gstsmooth.c4
-rw-r--r--gst/smpte/gstsmpte.c10
-rw-r--r--gst/speed/gstspeed.c8
-rw-r--r--gst/switch/gstswitch.c2
-rw-r--r--gst/vbidec/gstvbidec.c2
-rw-r--r--gst/videocrop/gstvideocrop.c6
-rw-r--r--gst/videodrop/gstvideodrop.c4
-rw-r--r--gst/y4m/gsty4mencode.c4
22 files changed, 112 insertions, 112 deletions
diff --git a/gst/chart/gstchart.c b/gst/chart/gstchart.c
index 8bdb8d2a..329b672e 100644
--- a/gst/chart/gstchart.c
+++ b/gst/chart/gstchart.c
@@ -112,9 +112,9 @@ static void gst_chart_get_property (GObject *object, guint prop_id, GValue *valu
static void gst_chart_chain (GstPad *pad, GstData *_data);
static GstPadLinkReturn
- gst_chart_sinkconnect (GstPad *pad, const GstCaps2 *caps);
+ gst_chart_sinkconnect (GstPad *pad, const GstCaps *caps);
static GstPadLinkReturn
- gst_chart_srcconnect (GstPad *pad, const GstCaps2 *caps);
+ gst_chart_srcconnect (GstPad *pad, const GstCaps *caps);
static GstElementClass *parent_class = NULL;
@@ -197,14 +197,14 @@ gst_chart_init (GstChart *chart)
}
static GstPadLinkReturn
-gst_chart_sinkconnect (GstPad *pad, const GstCaps2 *caps)
+gst_chart_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstChart *chart;
GstStructure *structure;
chart = GST_CHART (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", &chart->samplerate);
chart->samples_between_frames = chart->samplerate / chart->framerate;
@@ -217,14 +217,14 @@ gst_chart_sinkconnect (GstPad *pad, const GstCaps2 *caps)
}
static GstPadLinkReturn
-gst_chart_srcconnect (GstPad *pad, const GstCaps2*caps)
+gst_chart_srcconnect (GstPad *pad, const GstCaps*caps)
{
GstChart *chart;
GstStructure *structure;
chart = GST_CHART (gst_pad_get_parent (pad));
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
if (gst_structure_get_double (structure, "framerate", &chart->framerate)) {
chart->samples_between_frames = chart->samplerate / chart->framerate;
diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c
index 2a73ab01..7b2c3ee3 100644
--- a/gst/deinterlace/gstdeinterlace.c
+++ b/gst/deinterlace/gstdeinterlace.c
@@ -145,14 +145,14 @@ gst_deinterlace_class_init (GstDeInterlaceClass *klass)
}
static GstPadLinkReturn
-gst_deinterlace_sinkconnect (GstPad *pad, const GstCaps2 *caps)
+gst_deinterlace_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstDeInterlace *filter;
GstStructure *structure;
filter = GST_DEINTERLACE(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, "width", &filter->width);
gst_structure_get_int (structure, "height", &filter->height);
diff --git a/gst/filter/gstbpwsinc.c b/gst/filter/gstbpwsinc.c
index d9d608d7..77529053 100644
--- a/gst/filter/gstbpwsinc.c
+++ b/gst/filter/gstbpwsinc.c
@@ -105,7 +105,7 @@ static void gst_bpwsinc_get_property (GObject * object, guint prop_id,
static void gst_bpwsinc_chain (GstPad * pad, GstData *_data);
static GstPadLinkReturn
- gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps2 * caps);
+ gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps * caps);
static GstElementClass *parent_class = NULL;
/*static guint gst_bpwsinc_signals[LAST_SIGNAL] = { 0 }; */
@@ -195,7 +195,7 @@ gst_bpwsinc_init (GstBPWSinc * filter)
}
static GstPadLinkReturn
-gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps2 * caps)
+gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps * caps)
{
int i = 0;
double sum = 0.0;
diff --git a/gst/filter/gstiir.c b/gst/filter/gstiir.c
index 60c5c637..4ccf9f09 100644
--- a/gst/filter/gstiir.c
+++ b/gst/filter/gstiir.c
@@ -89,7 +89,7 @@ static void gst_iir_get_property (GObject * object, guint prop_id,
static void gst_iir_chain (GstPad * pad, GstData *_data);
static GstPadLinkReturn
- gst_iir_sink_connect (GstPad * pad, const GstCaps2 * caps);
+ gst_iir_sink_connect (GstPad * pad, const GstCaps * caps);
static GstElementClass *parent_class = NULL;
/*static guint gst_iir_signals[LAST_SIGNAL] = { 0 }; */
@@ -181,7 +181,7 @@ gst_iir_init (GstIIR * filter)
}
static GstPadLinkReturn
-gst_iir_sink_connect (GstPad * pad, const GstCaps2 * caps)
+gst_iir_sink_connect (GstPad * pad, const GstCaps * caps)
{
GstIIR *filter;
GstPadLinkReturn set_retval;
diff --git a/gst/filter/gstlpwsinc.c b/gst/filter/gstlpwsinc.c
index d549db52..603d8775 100644
--- a/gst/filter/gstlpwsinc.c
+++ b/gst/filter/gstlpwsinc.c
@@ -102,7 +102,7 @@ static void gst_lpwsinc_get_property (GObject * object, guint prop_id,
static void gst_lpwsinc_chain (GstPad * pad, GstData *_data);
static GstPadLinkReturn
- gst_lpwsinc_sink_connect (GstPad * pad, const GstCaps2 * caps);
+ gst_lpwsinc_sink_connect (GstPad * pad, const GstCaps * caps);
static GstElementClass *parent_class = NULL;
/*static guint gst_lpwsinc_signals[LAST_SIGNAL] = { 0 }; */
@@ -186,7 +186,7 @@ gst_lpwsinc_init (GstLPWSinc * filter)
}
static GstPadLinkReturn
-gst_lpwsinc_sink_connect (GstPad * pad, const GstCaps2 * caps)
+gst_lpwsinc_sink_connect (GstPad * pad, const GstCaps * caps)
{
int i = 0;
double sum = 0.0;
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index 3fb0598c..ca893394 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -430,7 +430,7 @@ gst_flxdec_loop (GstElement *element)
GstBuffer *buf;
GstBuffer *databuf;
guchar *data, *chunk;
- GstCaps2 *caps;
+ GstCaps *caps;
GstFlxDec *flxdec;
FlxHeader *flxh;
@@ -484,8 +484,8 @@ gst_flxdec_loop (GstElement *element)
flxdec->frame_time = flxh->speed * GST_MSECOND;
}
- caps = gst_caps2_from_string (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32);
- gst_caps2_set_simple (caps,
+ caps = gst_caps_from_string (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32);
+ gst_caps_set_simple (caps,
"width", G_TYPE_INT, flxh->width,
"height", G_TYPE_INT, flxh->height,
"framerate", G_TYPE_DOUBLE, GST_SECOND/flxdec->frame_time, NULL);
diff --git a/gst/mixmatrix/mixmatrix.c b/gst/mixmatrix/mixmatrix.c
index 726f9e02..0551cac0 100644
--- a/gst/mixmatrix/mixmatrix.c
+++ b/gst/mixmatrix/mixmatrix.c
@@ -43,7 +43,7 @@ typedef struct _GstMixMatrixClass GstMixMatrixClass;
struct _GstMixMatrix {
GstElement element;
- GstCaps2 *caps;
+ GstCaps *caps;
gint samplerate;
gint grpsize;
@@ -112,7 +112,7 @@ static void gst_mixmatrix_set_property (GObject *object, guint prop_id, const GV
static void gst_mixmatrix_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static GstPad * gst_mixmatrix_request_new_pad (GstElement *element, GstPadTemplate *temp, const gchar *name);
-static GstPadLinkReturn gst_mixmatrix_connect (GstPad *pad, const GstCaps2 *caps);
+static GstPadLinkReturn gst_mixmatrix_connect (GstPad *pad, const GstCaps *caps);
static void gst_mixmatrix_loop (GstElement *element);
@@ -319,7 +319,7 @@ gst_mixmatrix_set_all_caps (GstMixMatrix *mix)
*/
static GstPadLinkReturn
-gst_mixmatrix_connect (GstPad *pad, const GstCaps2 *caps)
+gst_mixmatrix_connect (GstPad *pad, const GstCaps *caps)
{
GstMixMatrix *mix = GST_MIXMATRIX(GST_PAD_PARENT(pad));
gint i;
@@ -334,7 +334,7 @@ gst_mixmatrix_connect (GstPad *pad, const GstCaps2 *caps)
}
}
- mix->caps = gst_caps2_copy(caps);
+ mix->caps = gst_caps_copy(caps);
return GST_PAD_LINK_OK;
}
diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc
index 75acae23..ab603cd3 100644
--- a/gst/modplug/gstmodplug.cc
+++ b/gst/modplug/gstmodplug.cc
@@ -103,7 +103,7 @@ static void gst_modplug_get_property (GObject *object,
GValue *value,
GParamSpec *pspec );
static GstPadLinkReturn
- gst_modplug_srclink (GstPad *pad, const GstCaps2 *caps);
+ gst_modplug_srclink (GstPad *pad, const GstCaps *caps);
static void gst_modplug_loop (GstElement *element);
static void gst_modplug_setup (GstModPlug *modplug);
static const GstFormat *
@@ -380,17 +380,17 @@ gst_modplug_src_event (GstPad *pad, GstEvent *event)
}
#if 0
-static GstCaps2*
+static GstCaps*
gst_modplug_get_streaminfo (GstModPlug *modplug)
{
- GstCaps2 *caps;
+ GstCaps *caps;
props = gst_props_empty_new ();
entry = gst_props_entry_new ("Patterns", G_TYPE_INT ((gint)modplug->mSoundFile->GetNumPatterns()));
gst_props_add_entry (props, (GstPropsEntry *) entry);
- caps = gst_caps2_new_simple ("application/x-gst-streaminfo", NULL);
+ caps = gst_caps_new_simple ("application/x-gst-streaminfo", NULL);
return caps;
}
@@ -419,7 +419,7 @@ gst_modplug_update_metadata (GstModPlug *modplug)
entry = gst_props_entry_new ("Title", G_TYPE_STRING (title));
gst_props_add_entry (props, entry);
- modplug->metadata = gst_caps2_new_simple ("application/x-gst-metadata",
+ modplug->metadata = gst_caps_new_simple ("application/x-gst-metadata",
NULL);
g_object_notify (G_OBJECT (modplug), "metadata");
@@ -446,7 +446,7 @@ modplug_negotiate (GstModPlug *modplug)
}
if ((ret = gst_pad_try_set_caps (modplug->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, modplug->bitsPerSample,
@@ -464,7 +464,7 @@ modplug_negotiate (GstModPlug *modplug)
static GstPadLinkReturn
-gst_modplug_srclink (GstPad *pad, const GstCaps2 *caps)
+gst_modplug_srclink (GstPad *pad, const GstCaps *caps)
{
GstModPlug *modplug;
GstStructure *structure;
@@ -472,7 +472,7 @@ gst_modplug_srclink (GstPad *pad, const GstCaps2 *caps)
modplug = GST_MODPLUG (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, "depth", &depth);
modplug->_16bit = (depth == 16);
diff --git a/gst/mpeg1videoparse/gstmp1videoparse.c b/gst/mpeg1videoparse/gstmp1videoparse.c
index 51a29a4e..1cdefbb1 100644
--- a/gst/mpeg1videoparse/gstmp1videoparse.c
+++ b/gst/mpeg1videoparse/gstmp1videoparse.c
@@ -187,7 +187,7 @@ mp1videoparse_parse_seq (Mp1VideoParse *mp1videoparse, GstBuffer *buf)
fps_table[fps_idx] != mp1videoparse->fps ||
width != mp1videoparse->width ||
height != mp1videoparse->height) {
- GstCaps2 *caps;
+ GstCaps *caps;
gint p_w, p_h;
mp1videoparse->asr = asr_table[asr_idx];
@@ -198,7 +198,7 @@ mp1videoparse_parse_seq (Mp1VideoParse *mp1videoparse, GstBuffer *buf)
p_w = (asr_table[asr_idx] < 1.0) ? (100 / asr_table[asr_idx]) : 1;
p_h = (asr_table[asr_idx] > 1.0) ? (100 * asr_table[asr_idx]) : 1;
- caps = gst_caps2_new_simple ("video/mpeg",
+ caps = gst_caps_new_simple ("video/mpeg",
"systemstream", G_TYPE_BOOLEAN, FALSE,
"mpegversion", G_TYPE_INT, 1,
"width", G_TYPE_INT, width,
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/overlay/gstoverlay.c b/gst/overlay/gstoverlay.c
index a027ab89..f2c01b3f 100644
--- a/gst/overlay/gstoverlay.c
+++ b/gst/overlay/gstoverlay.c
@@ -144,9 +144,9 @@ gst_overlay_class_init (GstOverlayClass *klass)
}
#if 0
-static GstCaps2 *gst_overlay_getcaps(GstPad *pad)
+static GstCaps *gst_overlay_getcaps(GstPad *pad)
{
- GstCaps2 *caps;
+ GstCaps *caps;
GstOverlay *overlay;
overlay = GST_OVERLAY (gst_pad_get_parent (pad));
@@ -174,14 +174,14 @@ static GstCaps2 *gst_overlay_getcaps(GstPad *pad)
#endif
static gboolean
-gst_overlay_sinkconnect (GstPad *pad, const GstCaps2 *caps)
+gst_overlay_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstOverlay *overlay;
GstStructure *structure;
overlay = GST_OVERLAY (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, "width", &overlay->width);
gst_structure_get_int (structure, "height", &overlay->height);
diff --git a/gst/passthrough/gstpassthrough.c b/gst/passthrough/gstpassthrough.c
index 2bcb5d0e..5bf97f16 100644
--- a/gst/passthrough/gstpassthrough.c
+++ b/gst/passthrough/gstpassthrough.c
@@ -79,7 +79,7 @@ static void passthrough_init (GstPassthrough *filter);
static void passthrough_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void passthrough_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static GstPadLinkReturn passthrough_connect_sink (GstPad *pad, const GstCaps2 *caps);
+static GstPadLinkReturn passthrough_connect_sink (GstPad *pad, const GstCaps *caps);
static void passthrough_chain (GstPad *pad, GstData *_data);
static void inline passthrough_fast_float_chain (gfloat* data, guint numsamples);
@@ -89,7 +89,7 @@ static void inline passthrough_fast_8bit_chain (gint8* data, guint numsamples);
static GstElementClass *parent_class = NULL;
static GstPadLinkReturn
-passthrough_connect_sink (GstPad *pad, const GstCaps2 *caps)
+passthrough_connect_sink (GstPad *pad, const GstCaps *caps)
{
const gchar *mimetype;
GstPassthrough *filter;
@@ -102,7 +102,7 @@ passthrough_connect_sink (GstPad *pad, const GstCaps2 *caps)
g_return_val_if_fail (filter != NULL, GST_PAD_LINK_REFUSED);
g_return_val_if_fail (GST_IS_PASSTHROUGH (filter), GST_PAD_LINK_REFUSED);
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
mimetype = gst_structure_get_name (structure);
gst_structure_get_int (structure, "rate", &filter->rate);
diff --git a/gst/playondemand/gstplayondemand.c b/gst/playondemand/gstplayondemand.c
index 0dec3835..3313599c 100644
--- a/gst/playondemand/gstplayondemand.c
+++ b/gst/playondemand/gstplayondemand.c
@@ -81,7 +81,7 @@ static void play_on_demand_get_property (GObject *object, guint prop_id, GValue
static void play_on_demand_dispose (GObject *object);
/* GStreamer functionality */
-static GstPadLinkReturn play_on_demand_pad_link (GstPad *pad, const GstCaps2 *caps);
+static GstPadLinkReturn play_on_demand_pad_link (GstPad *pad, const GstCaps *caps);
static void play_on_demand_loop (GstElement *elem);
static void play_on_demand_set_clock (GstElement *elem, GstClock *clock);
@@ -365,7 +365,7 @@ play_on_demand_dispose (GObject *object)
}
static GstPadLinkReturn
-play_on_demand_pad_link (GstPad *pad, const GstCaps2 *caps)
+play_on_demand_pad_link (GstPad *pad, const GstCaps *caps)
{
const gchar *mimetype;
GstPlayOnDemand *filter;
@@ -376,7 +376,7 @@ play_on_demand_pad_link (GstPad *pad, const GstCaps2 *caps)
filter = GST_PLAYONDEMAND(GST_PAD_PARENT(pad));
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
mimetype = gst_structure_get_name (structure);
gst_structure_get_int (structure, "rate", &filter->rate);
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 2bbe5819..78ac6cd3 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -64,7 +64,7 @@ struct _QtDemuxSample {
struct _QtDemuxStream {
guint32 subtype;
- GstCaps2 *caps;
+ GstCaps *caps;
GstPad *pad;
int n_samples;
QtDemuxSample *samples;
@@ -114,7 +114,7 @@ GST_STATIC_PAD_TEMPLATE (
"sink",
GST_PAD_SINK,
GST_PAD_SOMETIMES,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static GstStaticPadTemplate gst_qtdemux_videosrc_template =
@@ -122,7 +122,7 @@ GST_STATIC_PAD_TEMPLATE (
"audio_%02d",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static GstStaticPadTemplate gst_qtdemux_audiosrc_template =
@@ -130,7 +130,7 @@ GST_STATIC_PAD_TEMPLATE (
"video_%02d",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static GstElementClass *parent_class = NULL;
@@ -147,8 +147,8 @@ static void qtdemux_parse(GstQTDemux *qtdemux, GNode *node, void *buffer, int le
static QtNodeType *qtdemux_type_get(guint32 fourcc);
static void qtdemux_node_dump(GstQTDemux *qtdemux, GNode *node);
static void qtdemux_parse_tree(GstQTDemux *qtdemux);
-static GstCaps2 *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc);
-static GstCaps2 *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc);
+static GstCaps *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc);
+static GstCaps *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc);
static GType gst_qtdemux_get_type (void)
{
@@ -208,7 +208,7 @@ static gboolean
plugin_init (GstPlugin *plugin)
{
#if 0
- GstCaps2 *audiocaps = NULL, *videocaps = NULL, *temp;
+ GstCaps *audiocaps = NULL, *videocaps = NULL, *temp;
const guint32 audio_fcc[] = {
/* FILLME */
0,
@@ -496,7 +496,7 @@ static void gst_qtdemux_loop_header (GstElement *element)
if(stream->subtype == GST_MAKE_FOURCC('v','i','d','e')){
float fps = 1. * GST_SECOND / stream->samples[stream->sample_index].duration;
if (fps != stream->fps) {
- gst_caps2_set_simple (stream->caps, "framerate", G_TYPE_DOUBLE, fps,
+ gst_caps_set_simple (stream->caps, "framerate", G_TYPE_DOUBLE, fps,
NULL);
stream->fps = fps;
gst_pad_try_set_caps(stream->pad, stream->caps);
@@ -517,7 +517,7 @@ static void gst_qtdemux_loop_header (GstElement *element)
}
-static GstCaps2 *gst_qtdemux_src_getcaps(GstPad *pad)
+static GstCaps *gst_qtdemux_src_getcaps(GstPad *pad)
{
GstQTDemux *qtdemux;
QtDemuxStream *stream;
@@ -529,13 +529,13 @@ static GstCaps2 *gst_qtdemux_src_getcaps(GstPad *pad)
g_return_val_if_fail(GST_IS_QTDEMUX(qtdemux), NULL);
stream = GST_PAD_ELEMENT_PRIVATE (pad);
- return gst_caps2_copy(stream->caps);
+ return gst_caps_copy(stream->caps);
}
#if 0
/* This function doesn't do anything useful, but might be useful later */
static GstPadLinkReturn
-gst_qtdemux_src_link(GstPad *pad, GstCaps2 *caps)
+gst_qtdemux_src_link(GstPad *pad, GstCaps *caps)
{
GstQTDemux *qtdemux;
QtDemuxStream *stream;
@@ -571,7 +571,7 @@ void gst_qtdemux_add_stream(GstQTDemux *qtdemux, QtDemuxStream *stream)
g_strdup_printf ("video_%02d", qtdemux->n_video_streams));
stream->fps = 1. * GST_SECOND / stream->samples[0].duration;
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,
"framerate", G_TYPE_DOUBLE, stream->fps, NULL);
@@ -582,7 +582,7 @@ void gst_qtdemux_add_stream(GstQTDemux *qtdemux, QtDemuxStream *stream)
gst_static_pad_template_get(&gst_qtdemux_audiosrc_template),
g_strdup_printf ("audio_%02d", qtdemux->n_audio_streams));
if(stream->caps){
- gst_caps2_set_simple(stream->caps,
+ gst_caps_set_simple(stream->caps,
"rate", G_TYPE_INT, (int)stream->rate,
"channels", G_TYPE_INT, stream->n_channels, NULL);
}
@@ -1324,7 +1324,7 @@ static void qtdemux_parse_trak(GstQTDemux *qtdemux, GNode *trak)
stream->caps = qtdemux_video_caps(qtdemux,
QTDEMUX_FOURCC_GET(stsd->data+offset+4));
- g_print("caps %s\n",gst_caps2_to_string(stream->caps));
+ g_print("caps %s\n",gst_caps_to_string(stream->caps));
}else if(stream->subtype == FOURCC_soun){
int version;
@@ -1352,7 +1352,7 @@ static void qtdemux_parse_trak(GstQTDemux *qtdemux, GNode *trak)
stream->caps = qtdemux_audio_caps(qtdemux,
QTDEMUX_FOURCC_GET(stsd->data+16+4));
- g_print("caps %s\n",gst_caps2_to_string(stream->caps));
+ g_print("caps %s\n",gst_caps_to_string(stream->caps));
}else{
g_print("unknown subtype\n");
return;
@@ -1518,28 +1518,28 @@ done2:
}
-static GstCaps2 *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc)
+static GstCaps *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc)
{
switch(fourcc){
case GST_MAKE_FOURCC('j','p','e','g'):
/* JPEG */
- return gst_caps2_from_string ("image/jpeg");
+ return gst_caps_from_string ("image/jpeg");
case GST_MAKE_FOURCC('m','j','p','a'):
/* Motion-JPEG (format A) */
- return gst_caps2_from_string ("image/jpeg");
+ return gst_caps_from_string ("image/jpeg");
case GST_MAKE_FOURCC('m','j','p','b'):
/* Motion-JPEG (format B) */
- return gst_caps2_from_string ("image/jpeg");
+ return gst_caps_from_string ("image/jpeg");
case GST_MAKE_FOURCC('S','V','Q','3'):
- return gst_caps2_from_string ("video/x-svq, "
+ return gst_caps_from_string ("video/x-svq, "
"svqversion = (int) 3");
case GST_MAKE_FOURCC('s','v','q','i'):
case GST_MAKE_FOURCC('S','V','Q','1'):
- return gst_caps2_from_string ("video/x-svq, "
+ return gst_caps_from_string ("video/x-svq, "
"svqversion = (int) 1");
case GST_MAKE_FOURCC('r','a','w',' '):
/* uncompressed RGB */
- return gst_caps2_from_string ("video/x-raw-rgb, "
+ return gst_caps_from_string ("video/x-raw-rgb, "
"endianness = (int) BIG_ENDIAN");
/*"bpp", GST_PROPS_INT(x),
"depth", GST_PROPS_INT(x),
@@ -1548,26 +1548,26 @@ static GstCaps2 *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc)
"blue_mask", GST_PROPS_INT(x), FIXME! */
case GST_MAKE_FOURCC('Y','u','v','2'):
/* uncompressed YUV2 */
- return gst_caps2_from_string ("video/x-raw-yuv, "
+ return gst_caps_from_string ("video/x-raw-yuv, "
"format = (fourcc) YUY2");
case GST_MAKE_FOURCC('m','p','e','g'):
/* MPEG */
- return gst_caps2_from_string ("video/mpeg, "
+ return gst_caps_from_string ("video/mpeg, "
"systemstream = (boolean) false, "
"mpegversion = (int) 1");
case GST_MAKE_FOURCC('g','i','f',' '):
- return gst_caps2_from_string ("image/gif");
+ return gst_caps_from_string ("image/gif");
case GST_MAKE_FOURCC('h','2','6','3'):
/* H.263 */
/* ffmpeg uses the height/width props, don't know why */
- return gst_caps2_from_string ("video/x-h263");
+ return gst_caps_from_string ("video/x-h263");
case GST_MAKE_FOURCC('m','p','4','v'):
/* MPEG-4 */
- return gst_caps2_from_string ("video/mpeg, "
+ return gst_caps_from_string ("video/mpeg, "
"mpegversion = (int) 4, "
"systemstream = (boolean) false");
case GST_MAKE_FOURCC('3','I','V','1'):
- return gst_caps2_from_string ("video/x-3ivx");
+ return gst_caps_from_string ("video/x-3ivx");
case GST_MAKE_FOURCC('r','p','z','a'):
case GST_MAKE_FOURCC('c','v','i','d'):
/* Cinepak */
@@ -1582,91 +1582,91 @@ static GstCaps2 *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc)
}
}
-static GstCaps2 *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc)
+static GstCaps *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc)
{
switch(fourcc){
case GST_MAKE_FOURCC('N','O','N','E'):
- return NULL; /*gst_caps2_from_string ("audio/raw");*/
+ return NULL; /*gst_caps_from_string ("audio/raw");*/
case GST_MAKE_FOURCC('r','a','w',' '):
/* FIXME */
- return gst_caps2_from_string ("audio/x-raw-int, "
+ return gst_caps_from_string ("audio/x-raw-int, "
"width = (int) 8, "
"depth = (int) 8, "
"signed = (boolean) true");
case GST_MAKE_FOURCC('t','w','o','s'):
/* FIXME */
- return gst_caps2_from_string ("audio/x-raw-int, "
+ return gst_caps_from_string ("audio/x-raw-int, "
"width = (int) 16, "
"depth = (int) 16, "
"endianness = (int) G_BIG_ENDIAN, "
"signed = (boolean) true");
case GST_MAKE_FOURCC('s','o','w','t'):
/* FIXME */
- return gst_caps2_from_string ("audio/x-raw-int, "
+ return gst_caps_from_string ("audio/x-raw-int, "
"width = (int) 16, "
"depth = (int) 16, "
"endianness = (int) G_LITTLE_ENDIAN, "
"signed = (boolean) true");
case GST_MAKE_FOURCC('f','l','6','4'):
- return gst_caps2_from_string ("audio/x-raw-float, "
+ return gst_caps_from_string ("audio/x-raw-float, "
"width = (int) 64, "
"endianness = (int) G_BIG_ENDIAN");
case GST_MAKE_FOURCC('f','l','3','2'):
- return gst_caps2_from_string ("audio/x-raw-float, "
+ return gst_caps_from_string ("audio/x-raw-float, "
"width = (int) 32, "
"endianness = (int) G_BIG_ENDIAN");
case GST_MAKE_FOURCC('i','n','2','4'):
/* FIXME */
- return gst_caps2_from_string ("audio/x-raw-int, "
+ return gst_caps_from_string ("audio/x-raw-int, "
"width = (int) 24, "
"depth = (int) 32, "
"endianness = (int) G_BIG_ENDIAN, "
"signed = (boolean) true");
case GST_MAKE_FOURCC('i','n','3','2'):
/* FIXME */
- return gst_caps2_from_string ("audio/x-raw-int, "
+ return gst_caps_from_string ("audio/x-raw-int, "
"width = (int) 32, "
"depth = (int) 32, "
"endianness = (int) G_BIG_ENDIAN, "
"signed = (boolean) true");
case GST_MAKE_FOURCC('u','l','a','w'):
/* FIXME */
- return gst_caps2_from_string ("audio/x-mulaw");
+ return gst_caps_from_string ("audio/x-mulaw");
case GST_MAKE_FOURCC('a','l','a','w'):
/* FIXME */
- return gst_caps2_from_string ("audio/x-alaw");
+ return gst_caps_from_string ("audio/x-alaw");
case 0x6d730002:
/* Microsoft ADPCM-ACM code 2 */
- return gst_caps2_from_string ("audio/x-adpcm, "
+ return gst_caps_from_string ("audio/x-adpcm, "
"layout = (string) microsoft");
case 0x6d730011:
/* FIXME DVI/Intel IMA ADPCM/ACM code 17 */
- return gst_caps2_from_string ("audio/x-adpcm, "
+ return gst_caps_from_string ("audio/x-adpcm, "
"layout = (string) quicktime");
case 0x6d730055:
/* MPEG layer 3, CBR only (pre QT4.1) */
case 0x5500736d:
case GST_MAKE_FOURCC('.','m','p','3'):
/* MPEG layer 3, CBR & VBR (QT4.1 and later) */
- return gst_caps2_from_string ("audio/mpeg, "
+ return gst_caps_from_string ("audio/mpeg, "
"layer = (int) 3");
case GST_MAKE_FOURCC('M','A','C','3'):
/* MACE 3:1 */
- return gst_caps2_from_string ("audio/x-mace, "
+ return gst_caps_from_string ("audio/x-mace, "
"maceversion = (int) 3");
case GST_MAKE_FOURCC('M','A','C','6'):
/* MACE 6:1 */
- return gst_caps2_from_string ("audio/x-mace, "
+ return gst_caps_from_string ("audio/x-mace, "
"maceversion = (int) 6");
case GST_MAKE_FOURCC('O','g','g','V'):
/* Ogg Vorbis */
- return gst_caps2_from_string ("application/ogg");
+ return gst_caps_from_string ("application/ogg");
case GST_MAKE_FOURCC('d','v','c','a'):
/* DV audio */
- return gst_caps2_from_string ("audio/x-dv");
+ return gst_caps_from_string ("audio/x-dv");
case GST_MAKE_FOURCC('m','p','4','a'):
/* MPEG-4 AAC */
- return gst_caps2_from_string ("audio/mpeg, "
+ return gst_caps_from_string ("audio/mpeg, "
"mpegversion = (int) 4");
case GST_MAKE_FOURCC('q','t','v','r'):
/* ? */
diff --git a/gst/smooth/gstsmooth.c b/gst/smooth/gstsmooth.c
index c30507d6..6e38fe86 100644
--- a/gst/smooth/gstsmooth.c
+++ b/gst/smooth/gstsmooth.c
@@ -142,7 +142,7 @@ gst_smooth_class_init (GstSmoothClass *klass)
}
static GstPadLinkReturn
-gst_smooth_link (GstPad *pad, const GstCaps2 *caps)
+gst_smooth_link (GstPad *pad, const GstCaps *caps)
{
GstSmooth *filter;
GstStructure *structure;
@@ -150,7 +150,7 @@ gst_smooth_link (GstPad *pad, const GstCaps2 *caps)
filter = GST_SMOOTH (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, "width", &filter->width);
ret &= gst_structure_get_int (structure, "height", &filter->height);
diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c
index ebd5d3f1..fffc4caa 100644
--- a/gst/smpte/gstsmpte.c
+++ b/gst/smpte/gstsmpte.c
@@ -230,7 +230,7 @@ gst_smpte_update_mask (GstSMPTE *smpte, gint type, gint depth, gint width, gint
}
static gboolean
-gst_smpte_sinkconnect (GstPad *pad, const GstCaps2 *caps)
+gst_smpte_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstSMPTE *smpte;
GstStructure *structure;
@@ -238,7 +238,7 @@ gst_smpte_sinkconnect (GstPad *pad, const GstCaps2 *caps)
smpte = GST_SMPTE (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, "width", &smpte->width);
ret &= gst_structure_get_int (structure, "height", &smpte->height);
@@ -362,10 +362,10 @@ gst_smpte_loop (GstElement *element)
outbuf = gst_buffer_new_and_alloc (smpte->width * smpte->height * 3);
if (!GST_PAD_CAPS (smpte->srcpad)) {
- GstCaps2 *caps;
- caps = gst_caps2_copy (gst_static_caps2_get (
+ GstCaps *caps;
+ caps = gst_caps_copy (gst_static_caps_get (
&gst_smpte_src_template.static_caps));
- gst_caps2_set_simple (caps,
+ gst_caps_set_simple (caps,
"width", G_TYPE_INT, smpte->width,
"height", G_TYPE_INT, smpte->height,
"framerate", G_TYPE_DOUBLE, smpte->fps, NULL);
diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c
index c3d4d7b7..ec094156 100644
--- a/gst/speed/gstspeed.c
+++ b/gst/speed/gstspeed.c
@@ -84,7 +84,7 @@ static void speed_init (GstSpeed *filter);
static void speed_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void speed_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static gboolean speed_parse_caps (GstSpeed *filter, const GstCaps2 *caps);
+static gboolean speed_parse_caps (GstSpeed *filter, const GstCaps *caps);
static void speed_loop (GstElement *element);
@@ -92,7 +92,7 @@ static GstElementClass *parent_class = NULL;
/*static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; */
static GstPadLinkReturn
-speed_link (GstPad *pad, const GstCaps2 *caps)
+speed_link (GstPad *pad, const GstCaps *caps)
{
GstSpeed *filter;
GstPad *otherpad;
@@ -108,7 +108,7 @@ speed_link (GstPad *pad, const GstCaps2 *caps)
}
static gboolean
-speed_parse_caps (GstSpeed *filter, const GstCaps2 *caps)
+speed_parse_caps (GstSpeed *filter, const GstCaps *caps)
{
const gchar *mimetype;
GstStructure *structure;
@@ -117,7 +117,7 @@ speed_parse_caps (GstSpeed *filter, const GstCaps2 *caps)
g_return_val_if_fail(filter != NULL, FALSE);
g_return_val_if_fail(caps != NULL, FALSE);
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
ret = gst_structure_get_int (structure, "rate", &filter->rate);
ret &= gst_structure_get_int (structure, "channels", &filter->channels);
diff --git a/gst/switch/gstswitch.c b/gst/switch/gstswitch.c
index 6b6ad06c..625eba29 100644
--- a/gst/switch/gstswitch.c
+++ b/gst/switch/gstswitch.c
@@ -43,7 +43,7 @@ GST_STATIC_PAD_TEMPLATE (
"sink%d",
GST_PAD_SINK,
GST_PAD_REQUEST,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static GstElementClass *parent_class = NULL;
diff --git a/gst/vbidec/gstvbidec.c b/gst/vbidec/gstvbidec.c
index 8ceaee5b..1670142f 100644
--- a/gst/vbidec/gstvbidec.c
+++ b/gst/vbidec/gstvbidec.c
@@ -87,7 +87,7 @@ GST_STATIC_PAD_TEMPLATE (
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS2_ANY
+ GST_STATIC_CAPS_ANY
);
static GstStaticPadTemplate gst_vbidec_src_template =
diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c
index b8bece14..ab975a23 100644
--- a/gst/videocrop/gstvideocrop.c
+++ b/gst/videocrop/gstvideocrop.c
@@ -107,7 +107,7 @@ static void gst_video_crop_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec);
static GstPadLinkReturn
- gst_video_crop_sink_link (GstPad *pad, const GstCaps2 *caps);
+ gst_video_crop_sink_link (GstPad *pad, const GstCaps *caps);
static void gst_video_crop_chain (GstPad *pad, GstData *_data);
static GstElementStateReturn
@@ -262,14 +262,14 @@ gst_video_crop_get_property (GObject *object, guint prop_id, GValue *value, GPar
}
static GstPadLinkReturn
-gst_video_crop_sink_link (GstPad *pad, const GstCaps2 *caps)
+gst_video_crop_sink_link (GstPad *pad, const GstCaps *caps)
{
GstVideoCrop *video_crop;
GstStructure *structure;
gboolean ret;
video_crop = GST_VIDEO_CROP (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, "width", &video_crop->width);
ret &= gst_structure_get_int (structure, "height", &video_crop->height);
diff --git a/gst/videodrop/gstvideodrop.c b/gst/videodrop/gstvideodrop.c
index 481e535f..05c23220 100644
--- a/gst/videodrop/gstvideodrop.c
+++ b/gst/videodrop/gstvideodrop.c
@@ -147,7 +147,7 @@ gst_videodrop_class_init (GstVideodropClass *klass)
min, max)
static GstPadLinkReturn
-gst_videodrop_link (GstPad *pad, const GstCaps2 *caps)
+gst_videodrop_link (GstPad *pad, const GstCaps *caps)
{
GstVideodrop *videodrop;
GstStructure *structure;
@@ -156,7 +156,7 @@ gst_videodrop_link (GstPad *pad, const GstCaps2 *caps)
videodrop = GST_VIDEODROP (gst_pad_get_parent (pad));
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
ret = gst_structure_get_double (structure, "framerate", &fps);
if (!ret) return GST_PAD_LINK_REFUSED;
diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c
index 2c0cb598..f45cf109 100644
--- a/gst/y4m/gsty4mencode.c
+++ b/gst/y4m/gsty4mencode.c
@@ -137,7 +137,7 @@ gst_y4mencode_class_init (GstY4mEncodeClass *klass)
}
static GstPadLinkReturn
-gst_y4mencode_sinkconnect (GstPad *pad, const GstCaps2 *caps)
+gst_y4mencode_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstY4mEncode *filter;
gint idx = -1, i;
@@ -154,7 +154,7 @@ gst_y4mencode_sinkconnect (GstPad *pad, const GstCaps2 *caps)
filter = GST_Y4MENCODE (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, "width", &filter->width);
gst_structure_get_int (structure, "height", &filter->height);