Commit 8284d0d3 authored by David Schleef's avatar David Schleef

Global change from "caps2" to "caps"

Original commit message from CVS:
Global change from "caps2" to "caps"
parent 26da56b4
......@@ -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);
}
......
......@@ -62,7 +62,7 @@ static gboolean gst_artsdsink_open_audio (GstArtsdsink *sink);
static void gst_artsdsink_close_audio (GstArtsdsink *sink);
static GstElementStateReturn gst_artsdsink_change_state (GstElement *element);
static gboolean gst_artsdsink_sync_parms (GstArtsdsink *artsdsink);
static GstPadLinkReturn gst_artsdsink_link (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_artsdsink_link (GstPad *pad, const GstCaps *caps);
static void gst_artsdsink_chain (GstPad *pad, GstData *_data);
static void gst_artsdsink_set_property (GObject *object, guint prop_id,
......@@ -158,12 +158,12 @@ gst_artsdsink_sync_parms (GstArtsdsink *artsdsink)
}
static GstPadLinkReturn
gst_artsdsink_link (GstPad *pad, const GstCaps2 *caps)
gst_artsdsink_link (GstPad *pad, const GstCaps *caps)
{
GstArtsdsink *artsdsink = GST_ARTSDSINK (gst_pad_get_parent (pad));
GstStructure *structure;
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "rate", &artsdsink->frequency);
gst_structure_get_int (structure, "depth", &artsdsink->depth);
gst_structure_get_int (structure, "signed", &artsdsink->signd);
......
......@@ -382,7 +382,7 @@ gst_afparse_open_file (GstAFParse *afparse)
/* set caps on src */
/*FIXME: add all the possible formats, especially float ! */
gst_pad_try_set_caps (afparse->srcpad,
gst_caps2_new_simple (
gst_caps_new_simple (
"audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, afparse->is_signed,
......
......@@ -282,7 +282,7 @@ static gboolean
gst_afsink_open_file (GstAFSink *sink)
{
AFfilesetup outfilesetup;
const GstCaps2 *caps;
const GstCaps *caps;
GstStructure *structure;
int sample_format; /* audiofile's sample format, look in audiofile.h */
int byte_order = 0; /* audiofile's byte order defines */
......@@ -306,7 +306,7 @@ gst_afsink_open_file (GstAFSink *sink)
if (caps == NULL) {
g_critical ("gstafsink chain : Could not get caps of pad !\n");
} else {
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "channels", &sink->channels);
gst_structure_get_int (structure, "width", &sink->width);
gst_structure_get_int (structure, "rate", &sink->rate);
......
......@@ -341,7 +341,7 @@ gst_afsrc_open_file (GstAFSrc *src)
/* set caps on src */
/*FIXME: add all the possible formats, especially float ! */
gst_pad_try_set_caps (src->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, src->is_signed,
"width", G_TYPE_INT, src->width,
......
......@@ -49,7 +49,7 @@ static void gst_gsmdec_class_init (GstGSMDec *klass);
static void gst_gsmdec_init (GstGSMDec *gsmdec);
static void gst_gsmdec_chain (GstPad *pad, GstData *_data);
static GstPadLinkReturn gst_gsmdec_sinkconnect (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_gsmdec_sinkconnect (GstPad *pad, const GstCaps *caps);
static GstElementClass *parent_class = NULL;
/*static guint gst_gsmdec_signals[LAST_SIGNAL] = { 0 }; */
......@@ -146,7 +146,7 @@ gst_gsmdec_init (GstGSMDec *gsmdec)
}
static GstPadLinkReturn
gst_gsmdec_sinkconnect (GstPad *pad, const GstCaps2 *caps)
gst_gsmdec_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstGSMDec *gsmdec;
gint rate;
......@@ -154,11 +154,11 @@ gst_gsmdec_sinkconnect (GstPad *pad, const GstCaps2 *caps)
gsmdec = GST_GSMDEC (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", &rate);
if (gst_pad_try_set_caps (gsmdec->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,
......
......@@ -50,7 +50,7 @@ static void gst_gsmenc_class_init (GstGSMEnc *klass);
static void gst_gsmenc_init (GstGSMEnc *gsmenc);
static void gst_gsmenc_chain (GstPad *pad,GstData *_data);
static GstPadLinkReturn gst_gsmenc_sinkconnect (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_gsmenc_sinkconnect (GstPad *pad, const GstCaps *caps);
static GstElementClass *parent_class = NULL;
static guint gst_gsmenc_signals[LAST_SIGNAL] = { 0 };
......@@ -156,17 +156,17 @@ gst_gsmenc_init (GstGSMEnc *gsmenc)
}
static GstPadLinkReturn
gst_gsmenc_sinkconnect (GstPad *pad, const GstCaps2 *caps)
gst_gsmenc_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstGSMEnc *gsmenc;
GstStructure *structure;
gsmenc = GST_GSMENC (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", &gsmenc->rate);
if (gst_pad_try_set_caps (gsmenc->srcpad,
gst_caps2_new_simple("audio/x-gsm",
gst_caps_new_simple("audio/x-gsm",
"rate", G_TYPE_INT, gsmenc->rate,
"channels", G_TYPE_INT, 1,
NULL)) > 0)
......
......@@ -58,7 +58,7 @@ static void gst_colorspace_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec);
static GstPadLinkReturn
gst_colorspace_link (GstPad *pad, const GstCaps2 *caps);
gst_colorspace_link (GstPad *pad, const GstCaps *caps);
static void gst_colorspace_chain (GstPad *pad, GstData *_data);
static GstElementStateReturn
gst_colorspace_change_state (GstElement *element);
......@@ -74,7 +74,7 @@ static GstElementClass *parent_class = NULL;
/*static guint gst_colorspace_signals[LAST_SIGNAL] = { 0 }; */
static gboolean
colorspace_setup_converter (GstColorspace *space, GstCaps2 *from_caps, GstCaps2 *to_caps)
colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *to_caps)
{
guint32 from_space, to_space;
GstStructure *from_struct;
......@@ -83,8 +83,8 @@ colorspace_setup_converter (GstColorspace *space, GstCaps2 *from_caps, GstCaps2
g_return_val_if_fail (to_caps != NULL, FALSE);
g_return_val_if_fail (from_caps != NULL, FALSE);
from_struct = gst_caps2_get_nth_cap (from_caps, 0);
to_struct = gst_caps2_get_nth_cap (to_caps, 0);
from_struct = gst_caps_get_structure (from_caps, 0);
to_struct = gst_caps_get_structure (to_caps, 0);
from_space = GST_MAKE_FOURCC ('R','G','B',' ');
gst_structure_get_fourcc (from_struct, "format", &from_space);
......@@ -226,12 +226,12 @@ colorspace_setup_converter (GstColorspace *space, GstCaps2 *from_caps, GstCaps2
return FALSE;
}
static GstCaps2*
static GstCaps*
gst_colorspace_getcaps (GstPad *pad)
{
GstColorspace *space;
GstCaps2 *peercaps;
GstCaps2 *ourcaps;
GstCaps *peercaps;
GstCaps *ourcaps;
space = GST_COLORSPACE (gst_pad_get_parent (pad));
......@@ -239,16 +239,16 @@ gst_colorspace_getcaps (GstPad *pad)
peercaps = gst_pad_get_allowed_caps (space->srcpad);
/* and our own template of course */
ourcaps = gst_caps2_copy (gst_pad_get_pad_template_caps (pad));
ourcaps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
/* merge them together, we prefer the peercaps first */
gst_caps2_append (peercaps, ourcaps);
gst_caps_append (peercaps, ourcaps);
return peercaps;
}
static GstPadLinkReturn
gst_colorspace_link (GstPad *pad, const GstCaps2 *caps)
gst_colorspace_link (GstPad *pad, const GstCaps *caps)
{
GstColorspace *space;
GstPad *otherpad;
......@@ -257,7 +257,7 @@ gst_colorspace_link (GstPad *pad, const GstCaps2 *caps)
space = GST_COLORSPACE (gst_pad_get_parent (pad));
otherpad = (pad == space->sinkpad) ? space->srcpad : space->sinkpad;
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "width", &space->width);
gst_structure_get_int (structure, "height", &space->height);
......@@ -266,9 +266,9 @@ gst_colorspace_link (GstPad *pad, const GstCaps2 *caps)
GST_INFO ( "size: %dx%d", space->width, space->height);
if (pad == space->sinkpad) {
gst_caps2_replace (&space->sinkcaps, gst_caps2_copy(caps));
gst_caps_replace (&space->sinkcaps, gst_caps_copy(caps));
} else {
gst_caps2_replace (&space->srccaps, gst_caps2_copy(caps));
gst_caps_replace (&space->srccaps, gst_caps_copy(caps));
}
#if 0
......@@ -317,10 +317,10 @@ static void
gst_colorspace_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *caps;
GstCaps *caps;
/* create caps for templates */
caps = gst_caps2_from_string (
caps = gst_caps_from_string (
GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("{ I420, YV12, YUY2 }") "; "
GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_24_32_REVERSE "; "
GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_24_32 "; "
......@@ -464,7 +464,7 @@ gst_colorspace_change_state (GstElement *element)
gst_colorspace_converter_destroy (space->converter);
space->converter = NULL;
space->type = GST_COLORSPACE_NONE;
gst_caps2_replace (&space->sinkcaps, NULL);
gst_caps_replace (&space->sinkcaps, NULL);
break;
}
......
......@@ -79,8 +79,8 @@ struct _GstColorspace {
gint srcbpp, destbpp;
gboolean passthru;
GstCaps2 *sinkcaps;
GstCaps2 *srccaps;
GstCaps *sinkcaps;
GstCaps *srccaps;
};
struct _GstColorspaceClass {
......
......@@ -105,7 +105,7 @@ static GstColorSpaceYUVTables * gst_colorspace_init_yuv(long depth,
long red_mask, long green_mask, long blue_mask);
GstColorSpaceConverter*
gst_colorspace_yuv2rgb_get_converter (const GstCaps2 *from, const GstCaps2 *to)
gst_colorspace_yuv2rgb_get_converter (const GstCaps *from, const GstCaps *to)
{
guint32 from_space;
GstColorSpaceConverter *new;
......@@ -116,8 +116,8 @@ gst_colorspace_yuv2rgb_get_converter (const GstCaps2 *from, const GstCaps2 *to)
new = g_malloc (sizeof (GstColorSpaceConverter));
struct_from = gst_caps2_get_nth_cap (from, 0);
struct_to = gst_caps2_get_nth_cap (to, 0);
struct_from = gst_caps_get_structure (from, 0);
struct_to = gst_caps_get_structure (to, 0);
gst_structure_get_int (struct_from, "width", &new->width);
gst_structure_get_int (struct_from, "height", &new->height);
......
......@@ -59,7 +59,7 @@ struct _GstColorSpaceConverter {
};
GstColorSpaceConverter* gst_colorspace_yuv2rgb_get_converter (const GstCaps2 *from, const GstCaps2 *to);
GstColorSpaceConverter* gst_colorspace_yuv2rgb_get_converter (const GstCaps *from, const GstCaps *to);
#define gst_colorspace_convert(converter, src, dest) \
(converter)->convert((converter), (src), (dest))
void gst_colorspace_converter_destroy (GstColorSpaceConverter *space);
......
......@@ -77,7 +77,7 @@ static GstPadTemplate* gst_jack_sink_request_pad_factory();
static GstPad* gst_jack_request_new_pad (GstElement *element, GstPadTemplate *templ,
const gchar *name);
static GstElementStateReturn gst_jack_change_state (GstElement *element);
static GstPadLinkReturn gst_jack_link (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_jack_link (GstPad *pad, const GstCaps *caps);
static void gst_jack_loop (GstElement *element);
......@@ -263,8 +263,8 @@ gst_jack_src_request_pad_factory (void)
static GstPadTemplate *template = NULL;
if (!template) {
GstCaps2 *caps;
caps = gst_caps2_from_string (GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS);
GstCaps *caps;
caps = gst_caps_from_string (GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS);
template = gst_pad_template_new ("%s", GST_PAD_SRC,
GST_PAD_REQUEST, caps);
}
......@@ -278,8 +278,8 @@ gst_jack_sink_request_pad_factory (void)
static GstPadTemplate *template = NULL;
if (!template) {
GstCaps2 *caps;
caps = gst_caps2_from_string (GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS);
GstCaps *caps;
caps = gst_caps_from_string (GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS);
template = gst_pad_template_new ("%s", GST_PAD_SINK,
GST_PAD_REQUEST, caps);
}
......@@ -349,7 +349,7 @@ gst_jack_change_state (GstElement *element)
GstJack *this;
GList *l = NULL, **pads;
GstJackPad *pad;
GstCaps2 *caps;
GstCaps *caps;
g_return_val_if_fail (element != NULL, FALSE);
this = GST_JACK (element);
......@@ -393,7 +393,7 @@ gst_jack_change_state (GstElement *element)
while (l) {
pad = GST_JACK_PAD (l);
caps = gst_pad_get_caps (pad->pad);
gst_caps2_set_simple (caps,
gst_caps_set_simple (caps,
"rate", G_TYPE_INT, (int)this->bin->rate,
"buffer-frames", G_TYPE_INT, (gint)this->bin->nframes,
NULL);
......@@ -417,7 +417,7 @@ gst_jack_change_state (GstElement *element)
}
static GstPadLinkReturn
gst_jack_link (GstPad *pad, const GstCaps2 *caps)
gst_jack_link (GstPad *pad, const GstCaps *caps)
{
GstJack *this;
gint rate, buffer_frames;
......@@ -425,7 +425,7 @@ gst_jack_link (GstPad *pad, const GstCaps2 *caps)
this = GST_JACK (GST_OBJECT_PARENT (pad));
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "rate", &rate);
gst_structure_get_int (structure, "buffer-frames", &buffer_frames);
if (this->bin && (rate != this->bin->rate ||
......
......@@ -37,7 +37,7 @@
#define LADSPA_VERSION "1.0"
#endif
static GstStaticCaps2 ladspa_pad_caps =
static GstStaticCaps ladspa_pad_caps =
GST_STATIC_CAPS (GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS);
static void gst_ladspa_class_init (GstLADSPAClass *klass);
......@@ -45,7 +45,7 @@ static void gst_ladspa_base_init (GstLADSPAClass *klass);
static void gst_ladspa_init (GstLADSPA *ladspa);
static void gst_ladspa_update_int (const GValue *value, gpointer data);
static GstPadLinkReturn gst_ladspa_link (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_ladspa_link (GstPad *pad, const GstCaps *caps);
static void gst_ladspa_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void gst_ladspa_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
......@@ -112,11 +112,11 @@ gst_ladspa_base_init (GstLADSPAClass *klass)
/* the factories take ownership of the name */
if (LADSPA_IS_PORT_INPUT(desc->PortDescriptors[j])) {
templ = gst_pad_template_new (name, GST_PAD_SINK, GST_PAD_ALWAYS,
gst_caps2_copy (gst_static_caps2_get (&ladspa_pad_caps)));
gst_caps_copy (gst_static_caps_get (&ladspa_pad_caps)));
klass->numsinkpads++;
} else {
templ = gst_pad_template_new (name, GST_PAD_SRC, GST_PAD_ALWAYS,
gst_caps2_copy (gst_static_caps2_get (&ladspa_pad_caps)));
gst_caps_copy (gst_static_caps_get (&ladspa_pad_caps)));
klass->numsrcpads++;
}
......@@ -463,7 +463,7 @@ gst_ladspa_update_int(const GValue *value, gpointer data)
}
static GstPadLinkReturn
gst_ladspa_link (GstPad *pad, const GstCaps2 *caps)
gst_ladspa_link (GstPad *pad, const GstCaps *caps)
{
GstElement *element = (GstElement*)GST_PAD_PARENT (pad);
GstLADSPA *ladspa = (GstLADSPA*)element;
......@@ -480,7 +480,7 @@ gst_ladspa_link (GstPad *pad, const GstCaps2 *caps)
/* we assume that the ladspa plugin can handle any sample rate, so this
check gets put last */
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "rate", &rate);
/* have to instantiate ladspa plugin when samplerate changes (groan) */
if (ladspa->samplerate != rate) {
......
......@@ -298,7 +298,7 @@ gst_fameenc_class_init (GstFameEncClass *klass)
}
static GstPadLinkReturn
gst_fameenc_sink_link (GstPad *pad, const GstCaps2 *caps)
gst_fameenc_sink_link (GstPad *pad, const GstCaps *caps)
{
gint width, height, fps_idx;
gdouble fps;
......@@ -312,7 +312,7 @@ gst_fameenc_sink_link (GstPad *pad, const GstCaps2 *caps)
return GST_PAD_LINK_REFUSED;
}
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, "height", &height);
gst_structure_get_double (structure, "framerate", &fps);
......
......@@ -65,7 +65,7 @@ static gboolean gst_massink_open_audio (GstMassink *sink);
//static void gst_massink_close_audio (GstMassink *sink);
static GstElementStateReturn gst_massink_change_state (GstElement *element);
static gboolean gst_massink_sync_parms (GstMassink *massink);
static GstPadLinkReturn gst_massink_sinkconnect (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_massink_sinkconnect (GstPad *pad, const GstCaps *caps);
static void gst_massink_chain (GstPad *pad, GstData *_data);
......@@ -201,7 +201,7 @@ gst_massink_sync_parms (GstMassink *massink)
}
static GstPadLinkReturn
gst_massink_sinkconnect (GstPad *pad, const GstCaps2 *caps)
gst_massink_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstMassink *massink;
......
......@@ -101,7 +101,7 @@ GST_STATIC_PAD_TEMPLATE (
"private_stream_2",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS2_ANY
GST_STATIC_CAPS_ANY
);
#define GST_TYPE_MPLEX_MUX_FORMAT (gst_mplex_mux_format_get_type())
......@@ -253,7 +253,7 @@ gst_mplex_init (GstMPlex *mplex)
}
static GstPadLinkReturn
gst_mplex_video_link (GstPad *pad, const GstCaps2 *caps)
gst_mplex_video_link (GstPad *pad, const GstCaps *caps)
{
GstMPlex *mplex;
gint version;
......@@ -264,7 +264,7 @@ gst_mplex_video_link (GstPad *pad, const GstCaps2 *caps)
stream = (GstMPlexStream *) gst_pad_get_element_private (pad);
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
if (!gst_structure_get_int (structure, "mpegversion", &version)){
return GST_PAD_LINK_REFUSED;
......
......@@ -64,7 +64,7 @@ static void gst_sdlvideosink_destroy (GstSDLVideoSink *sdl);
static GstPadLinkReturn
gst_sdlvideosink_sinkconnect (GstPad *pad,
const GstCaps2 *caps);
const GstCaps *caps);
static void gst_sdlvideosink_chain (GstPad *pad,
GstData *data);
......@@ -128,7 +128,7 @@ static void
gst_sdlvideosink_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *capslist;
GstCaps *capslist;
gint i;
gulong format[6] = { GST_MAKE_FOURCC('I','4','2','0'),
GST_MAKE_FOURCC('Y','V','1','2'),
......@@ -138,9 +138,9 @@ gst_sdlvideosink_base_init (gpointer g_class)
};
/* make a list of all available caps */
capslist = gst_caps2_new_empty();
capslist = gst_caps_new_empty();
for (i = 0; i < 5; i++) {
gst_caps2_append_cap (capslist,
gst_caps_append_structure (capslist,
gst_structure_new ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, format[i],
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
......@@ -509,7 +509,7 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink)
static GstPadLinkReturn
gst_sdlvideosink_sinkconnect (GstPad *pad,
const GstCaps2 *vscapslist)
const GstCaps *vscapslist)
{
GstSDLVideoSink *sdlvideosink;
guint32 format;
......@@ -517,7 +517,7 @@ gst_sdlvideosink_sinkconnect (GstPad *pad,
sdlvideosink = GST_SDLVIDEOSINK (gst_pad_get_parent (pad));
structure = gst_caps2_get_nth_cap (vscapslist, 0);
structure = gst_caps_get_structure (vscapslist, 0);
gst_structure_get_fourcc (structure, "format", &format);
sdlvideosink->format =
gst_sdlvideosink_get_sdl_from_fourcc (sdlvideosink, format);
......
......@@ -164,16 +164,16 @@ snapshot_handler(GstElement *element)
static gboolean
gst_snapshot_sinkconnect (GstPad *pad, const GstCaps2 *caps)
gst_snapshot_sinkconnect (GstPad *pad, const GstCaps *caps)
{
GstSnapshot *filter;
GstCaps2 *from_caps, *to_caps;
GstCaps *from_caps, *to_caps;
gdouble fps;
GstStructure *structure;
filter = GST_SNAPSHOT (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);
gst_structure_get_double (structure, "framerate", &fps);
......@@ -181,7 +181,7 @@ gst_snapshot_sinkconnect (GstPad *pad, const GstCaps2 *caps)
filter->to_bpp = 24;
to_caps = gst_caps2_new_simple ("video/x-raw-rgb",
to_caps = gst_caps_new_simple ("video/x-raw-rgb",
"width", G_TYPE_INT, filter->width,
"height", G_TYPE_INT, filter->height,
"red_mask", G_TYPE_INT, 0x0000FF,
......@@ -195,7 +195,7 @@ gst_snapshot_sinkconnect (GstPad *pad, const GstCaps2 *caps)
{
case GST_MAKE_FOURCC('Y','U','Y','2'):
case GST_MAKE_FOURCC('I','4','2','0'):
from_caps = gst_caps2_new_simple ("video/x-raw-yuv",
from_caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_STR_FOURCC ("I420"),
"width", G_TYPE_INT, filter->width,
"height", G_TYPE_INT, filter->height,
......
......@@ -156,7 +156,7 @@ static GstPad* gst_sf_request_new_pad (GstElement *element, GstPadTemplate *tem
static void gst_sf_release_request_pad (GstElement *element, GstPad *pad);
static GstElementStateReturn gst_sf_change_state (GstElement *element);
static GstPadLinkReturn gst_sf_link (GstPad *pad, const GstCaps2 *caps);
static GstPadLinkReturn gst_sf_link (GstPad *pad, const GstCaps *caps);
static void gst_sf_loop (GstElement *element);
......@@ -524,12 +524,12 @@ gst_sf_release_request_pad (GstElement *element, GstPad *pad)
}
static GstPadLinkReturn
gst_sf_link (GstPad *pad, const GstCaps2 *caps)
gst_sf_link (GstPad *pad, const GstCaps *caps)
{
GstSF *this = (GstSF*)GST_OBJECT_PARENT (pad);
GstStructure *structure;
structure = gst_caps2_get_nth_cap (caps, 0);
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "rate", &this->rate);
gst_structure_get_int (structure, "buffer-frames", &this->buffer_frames);
......@@ -695,11 +695,11 @@ gst_sf_loop (GstElement *element)
continue;
if (!channel->caps_set) {
GstCaps2 *caps = GST_PAD_CAPS (GST_SF_CHANNEL (l)->pad);
GstCaps *caps = GST_PAD_CAPS (GST_SF_CHANNEL (l)->pad);
if (!caps)
caps = gst_caps2_copy
caps = gst_caps_copy
(GST_PAD_TEMPLATE_CAPS (GST_PAD_PAD_TEMPLATE (GST_SF_CHANNEL (l)->pad)));
gst_caps2_set_simple (caps,
gst_caps_set_simple (caps,
"rate", G_TYPE_INT, this->rate,
"buffer-frames", G_TYPE_INT, this->buffer_frames,
NULL);
......
......@@ -158,18 +158,18 @@ gst_swfdec_class_init(GstSwfdecClass *klass)
gstelement_class->change_state = gst_swfdec_change_state;
}
static GstCaps2 *gst_swfdec_videosrc_getcaps(GstPad *pad)
static GstCaps *gst_swfdec_videosrc_getcaps(GstPad *pad)
{
GstSwfdec *swfdec;
GstCaps2 *caps;
GstCaps *caps;
swfdec = GST_SWFDEC (gst_pad_get_parent (pad));
caps = gst_caps2_copy (gst_pad_template_get_caps (
caps = gst_caps_copy (gst_pad_template_get_caps (
gst_static_pad_template_get (&video_template_factory)));
if (swfdec->height) {
gst_caps2_set_simple (caps,
gst_caps_set_simple (caps,
"framerate", G_TYPE_DOUBLE, swfdec->frame_rate,
"height",G_TYPE_INT,swfdec->height,
"width",G_TYPE_INT,swfdec->width,
......
......@@ -77,7 +77,7 @@ static void gst_xviddec_dispose (GObject *object);
static void gst_xviddec_chain (GstPad *pad,
GstData *data);
static GstPadLinkReturn gst_xviddec_link (GstPad *pad,
const GstCaps2 *vscapslist);
const GstCaps *vscapslist);
static GstPadLinkReturn gst_xviddec_negotiate (GstXvidDec *xviddec);
static GstElementClass *parent_class = NULL;
......@@ -263,7 +263,7 @@ static GstPadLinkReturn
gst_xviddec_negotiate (GstXvidDec *xviddec)
{
GstPadLinkReturn ret;
GstCaps2 *caps;
GstCaps *caps;
struct {
guint32 fourcc;
gint depth, bpp;
......@@ -307,7 +307,7 @@ gst_xviddec_negotiate (GstXvidDec *xviddec)
r_mask = R_MASK_32_INT; g_mask = G_MASK_32_INT; b_mask = B_MASK_32_INT;
break;
}
caps = gst_caps2_new_simple (
caps = gst_caps_new_simple (
"video/x-raw-rgb",
"width", G_TYPE_INT, xviddec->width,
"height", G_TYPE_INT, xviddec->height,
......@@ -320,7 +320,7 @@ gst_xviddec_negotiate (GstXvidDec *xviddec)
"framerate", G_TYPE_DOUBLE, xviddec->fps,
NULL);
} else {
caps = gst_caps2_new_simple (
caps = gst_caps_new_simple (
"video/x-raw-yuv",
"width", G_TYPE_INT, xviddec->width,
"height", G_TYPE_INT, xviddec->height,
......@@ -346,7 +346,7 @@ gst_xviddec_negotiate (GstXvidDec *xviddec)
static GstPadLinkReturn
gst_xviddec_link (GstPad *pad,
const GstCaps2 *vscaps)
const GstCaps *vscaps)
{
GstXvidDec *xviddec;
GstStructure *structure;
......@@ -360,7 +360,7 @@ gst_xviddec_link (GstPad *pad,
/* if we get here, we know the input is xvid. we
* only need to bother with the output colorspace */
structure = gst_caps2_get_nth_cap (vscaps, 0);
structure = gst_caps_get_structure (vscaps, 0);
gst_structure_get_int(structure, "width", &xviddec->width);
gst_structure_get_int(structure, "height", &xviddec->height);
gst_structure_get_double(structure, "framerate", &xviddec->fps);
......
......@@ -79,7 +79,7 @@ static void gst_xvidenc_init (GstXvidEnc *xvidenc);
static void gst_xvidenc_chain (GstPad *pad,
GstData *data);
static GstPadLinkReturn gst_xvidenc_link (GstPad *pad,
const GstCaps2 *vscapslist);
const GstCaps *vscapslist);
/* properties */
static void gst_xvidenc_set_property (GObject *object,
......@@ -298,7 +298,7 @@ gst_xvidenc_chain (GstPad *pad,
static GstPadLinkReturn
gst_xvidenc_link (GstPad *pad,
const GstCaps2 *vscaps)
const GstCaps *vscaps)
{
GstXvidEnc *xvidenc;
GstStructure *structure;
......@@ -315,8 +315,8 @@ gst_xvidenc_link (GstPad *pad,
xvidenc->handle = NULL;
}
g_return_val_if_fail (gst_caps2_get_n_structures (vscaps) == 1, GST_PAD_LINK_REFUSED);
structure = gst_caps2_get_nth_cap (vscaps, 0);
g_return_val_if_fail (gst_caps_get_size (vscaps) == 1, GST_PAD_LINK_REFUSED);
structure = gst_caps_get_structure (vscaps, 0);
gst_structure_get_int (structure, "width", &w);
gst_structure_get_int (structure, "height", &h);
......@@ -372,9 +372,9 @@ gst_xvidenc_link (GstPad *pad,
if (gst_xvidenc_setup(xvidenc)) {
GstPadLinkReturn ret;
GstCaps2 *new_caps;