Commit 7163617a 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 a9cf6561
...@@ -12,25 +12,25 @@ struct probe_context { ...@@ -12,25 +12,25 @@ struct probe_context {
gint total_ls; gint total_ls;
GstCaps2 *metadata; GstCaps *metadata;
GstCaps2 *streaminfo; GstCaps *streaminfo;
GstCaps2 *caps; GstCaps *caps;
}; };
static void static void
print_caps (GstCaps2 *caps) print_caps (GstCaps *caps)
{ {
char *s; char *s;
s = gst_caps2_to_string (caps); s = gst_caps_to_string (caps);
g_print(" %s\n", s); g_print(" %s\n", s);
g_free (s); g_free (s);
} }
static void static void
print_format (GstCaps2 *caps) print_format (GstCaps *caps)
{ {
char *s; char *s;
s = gst_caps2_to_string (caps); s = gst_caps_to_string (caps);
g_print(" format: %s\n", s); g_print(" format: %s\n", s);
g_free (s); g_free (s);
} }
......
...@@ -240,14 +240,14 @@ gst_aasink_class_init (GstAASinkClass *klass) ...@@ -240,14 +240,14 @@ gst_aasink_class_init (GstAASinkClass *klass)
} }
static GstPadLinkReturn static GstPadLinkReturn
gst_aasink_sinkconnect (GstPad *pad, const GstCaps2 *caps) gst_aasink_sinkconnect (GstPad *pad, const GstCaps *caps)
{ {
GstAASink *aasink; GstAASink *aasink;
GstStructure *structure; GstStructure *structure;
aasink = GST_AASINK (gst_pad_get_parent (pad)); aasink = GST_AASINK (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", &aasink->width); gst_structure_get_int (structure, "width", &aasink->width);
gst_structure_get_int (structure, "height", &aasink->height); gst_structure_get_int (structure, "height", &aasink->height);
......
...@@ -723,27 +723,27 @@ gst_dvdec_loop (GstElement *element) ...@@ -723,27 +723,27 @@ gst_dvdec_loop (GstElement *element)
/* if we did not negotiate yet, do it now */ /* if we did not negotiate yet, do it now */
if (!GST_PAD_CAPS (dvdec->videosrcpad)) { if (!GST_PAD_CAPS (dvdec->videosrcpad)) {
GstCaps2 *caps = NULL; GstCaps *caps = NULL;
GstCaps2 *negotiated_caps = NULL; GstCaps *negotiated_caps = NULL;
GstPadTemplate *src_pad_template; GstPadTemplate *src_pad_template;
int i; int i;
/* try to fix our height */ /* try to fix our height */
src_pad_template = gst_static_pad_template_get (&video_src_temp); src_pad_template = gst_static_pad_template_get (&video_src_temp);
caps = gst_caps2_copy(gst_pad_template_get_caps (src_pad_template)); caps = gst_caps_copy(gst_pad_template_get_caps (src_pad_template));
for (i = 0; i < gst_caps2_get_n_structures (caps); i++) for (i = 0; i < gst_caps_get_size (caps); i++)
{ {
GstStructure *structure = gst_caps2_get_nth_cap (caps, i); GstStructure *structure = gst_caps_get_structure (caps, i);
gst_structure_set(structure, gst_structure_set(structure,
"height", G_TYPE_INT, height, "height", G_TYPE_INT, height,
"framerate", G_TYPE_INT, fps, NULL "framerate", G_TYPE_INT, fps, NULL
); );
} }
for (i=0; i < gst_caps2_get_n_structures(caps); i++) { for (i=0; i < gst_caps_get_size(caps); i++) {
GstStructure *to_try_struct = gst_caps2_get_nth_cap (caps, i); GstStructure *to_try_struct = gst_caps_get_structure (caps, i);
GstCaps2 *try_caps = gst_caps2_new_full (to_try_struct); GstCaps *try_caps = gst_caps_new_full (to_try_struct);
/* try each format */ /* try each format */
if (gst_pad_try_set_caps (dvdec->videosrcpad, try_caps) > 0) { if (gst_pad_try_set_caps (dvdec->videosrcpad, try_caps) > 0) {
...@@ -751,14 +751,14 @@ gst_dvdec_loop (GstElement *element) ...@@ -751,14 +751,14 @@ gst_dvdec_loop (GstElement *element)
break; break;
} }
gst_caps2_free(try_caps); gst_caps_free(try_caps);
} }
gst_caps2_free (caps); gst_caps_free (caps);
/* Check if we negotiated caps successfully */ /* Check if we negotiated caps successfully */
if (negotiated_caps != NULL) { if (negotiated_caps != NULL) {
GstStructure *structure = gst_caps2_get_nth_cap (negotiated_caps, 0); GstStructure *structure = gst_caps_get_structure (negotiated_caps, 0);
guint32 fourcc; guint32 fourcc;
/* it worked, try to find what it was again */ /* it worked, try to find what it was again */
...@@ -801,7 +801,7 @@ gst_dvdec_loop (GstElement *element) ...@@ -801,7 +801,7 @@ gst_dvdec_loop (GstElement *element)
/* if we did not negotiate yet, do it now */ /* if we did not negotiate yet, do it now */
if (!GST_PAD_CAPS (dvdec->audiosrcpad)) { if (!GST_PAD_CAPS (dvdec->audiosrcpad)) {
gst_pad_try_set_caps (dvdec->audiosrcpad, gst_pad_try_set_caps (dvdec->audiosrcpad,
gst_caps2_new_simple ( gst_caps_new_simple (
"audio/x-raw-int", "audio/x-raw-int",
"rate", G_TYPE_INT, dvdec->decoder->audio->frequency, "rate", G_TYPE_INT, dvdec->decoder->audio->frequency,
"depth", G_TYPE_INT, 16, "depth", G_TYPE_INT, 16,
......
...@@ -258,7 +258,7 @@ gst_esdmon_get (GstPad *pad) ...@@ -258,7 +258,7 @@ gst_esdmon_get (GstPad *pad)
/* set caps on src pad */ /* set caps on src pad */
/* FIXME: do this dynamically */ /* FIXME: do this dynamically */
if (gst_pad_try_set_caps (esdmon->srcpad, if (gst_pad_try_set_caps (esdmon->srcpad,
gst_caps2_new_simple ("audio/x-raw-int", gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER, "endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, sign, "signed", G_TYPE_BOOLEAN, sign,
"width", G_TYPE_INT, esdmon->depth, "width", G_TYPE_INT, esdmon->depth,
......
...@@ -79,7 +79,7 @@ static void gst_esdsink_init (GTypeInstance *instance, gpointer g_class); ...@@ -79,7 +79,7 @@ static void gst_esdsink_init (GTypeInstance *instance, gpointer g_class);
static gboolean gst_esdsink_open_audio (GstEsdsink *sink); static gboolean gst_esdsink_open_audio (GstEsdsink *sink);
static void gst_esdsink_close_audio (GstEsdsink *sink); static void gst_esdsink_close_audio (GstEsdsink *sink);
static GstElementStateReturn gst_esdsink_change_state (GstElement *element); static GstElementStateReturn gst_esdsink_change_state (GstElement *element);
static GstPadLinkReturn gst_esdsink_link (GstPad *pad, const GstCaps2 *caps); static GstPadLinkReturn gst_esdsink_link (GstPad *pad, const GstCaps *caps);
static GstClockTime gst_esdsink_get_time (GstClock *clock, gpointer data); static GstClockTime gst_esdsink_get_time (GstClock *clock, gpointer data);
static GstClock * gst_esdsink_get_clock (GstElement *element); static GstClock * gst_esdsink_get_clock (GstElement *element);
...@@ -185,14 +185,14 @@ gst_esdsink_init(GTypeInstance *instance, gpointer g_class) ...@@ -185,14 +185,14 @@ gst_esdsink_init(GTypeInstance *instance, gpointer g_class)
} }
static GstPadLinkReturn static GstPadLinkReturn
gst_esdsink_link (GstPad *pad, const GstCaps2 *caps) gst_esdsink_link (GstPad *pad, const GstCaps *caps)
{ {
GstEsdsink *esdsink; GstEsdsink *esdsink;
GstStructure *structure; GstStructure *structure;
esdsink = GST_ESDSINK (gst_pad_get_parent (pad)); esdsink = GST_ESDSINK (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, "signed", &esdsink->depth); gst_structure_get_int (structure, "signed", &esdsink->depth);
gst_structure_get_int (structure, "channels", &esdsink->channels); gst_structure_get_int (structure, "channels", &esdsink->channels);
gst_structure_get_int (structure, "rate", &esdsink->frequency); gst_structure_get_int (structure, "rate", &esdsink->frequency);
......
...@@ -121,18 +121,18 @@ flacdec_get_type(void) { ...@@ -121,18 +121,18 @@ flacdec_get_type(void) {
return flacdec_type; return flacdec_type;
} }
static GstCaps2* static GstCaps*
flac_caps_factory (void) flac_caps_factory (void)
{ {
return gst_caps2_new_simple ("audio/x-flac", NULL); return gst_caps_new_simple ("audio/x-flac", NULL);
/* "rate", GST_PROPS_INT_RANGE (11025, 48000), /* "rate", GST_PROPS_INT_RANGE (11025, 48000),
* "channels", GST_PROPS_INT_RANGE (1, 2), */ * "channels", GST_PROPS_INT_RANGE (1, 2), */
} }
static GstCaps2* static GstCaps*
raw_caps_factory (void) raw_caps_factory (void)
{ {
return gst_caps2_new_simple ("audio/x-raw-int", return gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER, "endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, TRUE, "signed", G_TYPE_BOOLEAN, TRUE,
"width", G_TYPE_INT, 16, "width", G_TYPE_INT, 16,
...@@ -146,7 +146,7 @@ static void ...@@ -146,7 +146,7 @@ static void
gst_flacdec_base_init (gpointer g_class) gst_flacdec_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *raw_caps, *flac_caps; GstCaps *raw_caps, *flac_caps;
raw_caps = raw_caps_factory (); raw_caps = raw_caps_factory ();
flac_caps = flac_caps_factory (); flac_caps = flac_caps_factory ();
...@@ -474,7 +474,7 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder *decoder, ...@@ -474,7 +474,7 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder *decoder,
if (!GST_PAD_CAPS (flacdec->srcpad)) { if (!GST_PAD_CAPS (flacdec->srcpad)) {
gst_pad_try_set_caps (flacdec->srcpad, gst_pad_try_set_caps (flacdec->srcpad,
gst_caps2_new_simple ("audio/x-raw-int", gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER, "endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, TRUE, "signed", G_TYPE_BOOLEAN, TRUE,
"width", G_TYPE_INT, depth, "width", G_TYPE_INT, depth,
......
...@@ -68,7 +68,7 @@ static void gst_flacenc_class_init (FlacEncClass *klass); ...@@ -68,7 +68,7 @@ static void gst_flacenc_class_init (FlacEncClass *klass);
static void gst_flacenc_dispose (GObject *object); static void gst_flacenc_dispose (GObject *object);
static GstPadLinkReturn static GstPadLinkReturn
gst_flacenc_sinkconnect (GstPad *pad, const GstCaps2 *caps); gst_flacenc_sinkconnect (GstPad *pad, const GstCaps *caps);
static void gst_flacenc_chain (GstPad *pad, GstData *_data); static void gst_flacenc_chain (GstPad *pad, GstData *_data);
static gboolean gst_flacenc_update_quality (FlacEnc *flacenc, gint quality); static gboolean gst_flacenc_update_quality (FlacEnc *flacenc, gint quality);
...@@ -176,18 +176,18 @@ gst_flacenc_quality_get_type (void) ...@@ -176,18 +176,18 @@ gst_flacenc_quality_get_type (void)
return qtype; return qtype;
} }
static GstCaps2* static GstCaps*
flac_caps_factory (void) flac_caps_factory (void)
{ {
return gst_caps2_new_simple ("audio/x-flac", NULL); return gst_caps_new_simple ("audio/x-flac", NULL);
/* "rate", GST_PROPS_INT_RANGE (11025, 48000), /* "rate", GST_PROPS_INT_RANGE (11025, 48000),
* "channels", GST_PROPS_INT_RANGE (1, 2), */ * "channels", GST_PROPS_INT_RANGE (1, 2), */
} }
static GstCaps2* static GstCaps*
raw_caps_factory (void) raw_caps_factory (void)
{ {
return gst_caps2_new_simple ("audio/x-raw-int", return gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER, "endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, TRUE, "signed", G_TYPE_BOOLEAN, TRUE,
"width", G_TYPE_INT, 16, "width", G_TYPE_INT, 16,
...@@ -201,7 +201,7 @@ static void ...@@ -201,7 +201,7 @@ static void
gst_flacenc_base_init (gpointer g_class) gst_flacenc_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *raw_caps, *flac_caps; GstCaps *raw_caps, *flac_caps;
raw_caps = raw_caps_factory (); raw_caps = raw_caps_factory ();
flac_caps = flac_caps_factory (); flac_caps = flac_caps_factory ();
...@@ -345,7 +345,7 @@ gst_flacenc_dispose (GObject *object) ...@@ -345,7 +345,7 @@ gst_flacenc_dispose (GObject *object)
} }
static GstPadLinkReturn static GstPadLinkReturn
gst_flacenc_sinkconnect (GstPad *pad, const GstCaps2 *caps) gst_flacenc_sinkconnect (GstPad *pad, const GstCaps *caps)
{ {
GstPadLinkReturn ret; GstPadLinkReturn ret;
FlacEnc *flacenc; FlacEnc *flacenc;
...@@ -353,13 +353,13 @@ gst_flacenc_sinkconnect (GstPad *pad, const GstCaps2 *caps) ...@@ -353,13 +353,13 @@ gst_flacenc_sinkconnect (GstPad *pad, const GstCaps2 *caps)
flacenc = GST_FLACENC (gst_pad_get_parent (pad)); flacenc = GST_FLACENC (gst_pad_get_parent (pad));
structure = gst_caps2_get_nth_cap (caps, 0); structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "channels", &flacenc->channels); gst_structure_get_int (structure, "channels", &flacenc->channels);
gst_structure_get_int (structure, "depth", &flacenc->depth); gst_structure_get_int (structure, "depth", &flacenc->depth);
gst_structure_get_int (structure, "rate", &flacenc->sample_rate); gst_structure_get_int (structure, "rate", &flacenc->sample_rate);
caps = gst_caps2_new_simple ("audio/x-flac", caps = gst_caps_new_simple ("audio/x-flac",
"channels", G_TYPE_INT, flacenc->channels, "channels", G_TYPE_INT, flacenc->channels,
"rate", G_TYPE_INT, flacenc->sample_rate, NULL); "rate", G_TYPE_INT, flacenc->sample_rate, NULL);
ret = gst_pad_try_set_caps (flacenc->srcpad, caps); ret = gst_pad_try_set_caps (flacenc->srcpad, caps);
......
...@@ -195,14 +195,14 @@ static gboolean ...@@ -195,14 +195,14 @@ static gboolean
caps_nego (GstFlacTag *tag) caps_nego (GstFlacTag *tag)
{ {
/* do caps nego */ /* do caps nego */
GstCaps2 *caps; GstCaps *caps;
caps = gst_caps2_new_simple ("audio/x-flac", NULL); caps = gst_caps_new_simple ("audio/x-flac", NULL);
if (gst_pad_try_set_caps (tag->srcpad, caps) != GST_PAD_LINK_REFUSED) { if (gst_pad_try_set_caps (tag->srcpad, caps) != GST_PAD_LINK_REFUSED) {
tag->only_output_tags = FALSE; tag->only_output_tags = FALSE;
GST_LOG_OBJECT (tag, "normal operation, using audio/x-flac output"); GST_LOG_OBJECT (tag, "normal operation, using audio/x-flac output");
} else { } else {
if (gst_pad_try_set_caps (tag->srcpad, gst_caps2_new_simple ( if (gst_pad_try_set_caps (tag->srcpad, gst_caps_new_simple (
"application/x-gst-tags", NULL)) "application/x-gst-tags", NULL))
!= GST_PAD_LINK_REFUSED) { != GST_PAD_LINK_REFUSED) {
tag->only_output_tags = TRUE; tag->only_output_tags = TRUE;
......
...@@ -100,7 +100,7 @@ static void gst_gdk_pixbuf_type_find (GstTypeFind *tf, gpointer ignore); ...@@ -100,7 +100,7 @@ static void gst_gdk_pixbuf_type_find (GstTypeFind *tf, gpointer ignore);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
static GstPadLinkReturn static GstPadLinkReturn
gst_gdk_pixbuf_sink_link (GstPad *pad, const GstCaps2 *caps) gst_gdk_pixbuf_sink_link (GstPad *pad, const GstCaps *caps)
{ {
GstGdkPixbuf *filter; GstGdkPixbuf *filter;
...@@ -117,29 +117,29 @@ gst_gdk_pixbuf_sink_link (GstPad *pad, const GstCaps2 *caps) ...@@ -117,29 +117,29 @@ gst_gdk_pixbuf_sink_link (GstPad *pad, const GstCaps2 *caps)
* These are just the formats that gdk-pixbuf is known to support. * These are just the formats that gdk-pixbuf is known to support.
* But maybe not -- it may have been compiled without an external * But maybe not -- it may have been compiled without an external
* library. */ * library. */
static GstCaps2 *gst_gdk_pixbuf_get_capslist(void) static GstCaps *gst_gdk_pixbuf_get_capslist(void)
{ {
return gst_caps2_copy (gst_static_caps_get ( return gst_caps_copy (gst_static_caps_get (
&gst_gdk_pixbuf_sink_template.static_caps)); &gst_gdk_pixbuf_sink_template.static_caps));
} }
#else #else
static GstCaps2 *gst_gdk_pixbuf_get_capslist(void) static GstCaps *gst_gdk_pixbuf_get_capslist(void)
{ {
GSList *slist; GSList *slist;
GSList *slist0; GSList *slist0;
GdkPixbufFormat *pixbuf_format; GdkPixbufFormat *pixbuf_format;
char **mimetypes; char **mimetypes;
char **mimetype; char **mimetype;
GstCaps2 *capslist = NULL; GstCaps *capslist = NULL;
capslist = gst_caps2_new_empty (); capslist = gst_caps_new_empty ();
slist0 = gdk_pixbuf_get_formats(); slist0 = gdk_pixbuf_get_formats();
for(slist = slist0;slist;slist=g_slist_next(slist)){ for(slist = slist0;slist;slist=g_slist_next(slist)){
pixbuf_format = slist->data; pixbuf_format = slist->data;
mimetypes = gdk_pixbuf_format_get_mime_types(pixbuf_format); mimetypes = gdk_pixbuf_format_get_mime_types(pixbuf_format);
for(mimetype = mimetypes; *mimetype; mimetype++){ for(mimetype = mimetypes; *mimetype; mimetype++){
gst_caps2_append_cap (capslist, gst_caps_append_structure (capslist,
gst_structure_new (*mimetype,NULL)); gst_structure_new (*mimetype,NULL));
} }
g_free(mimetypes); g_free(mimetypes);
...@@ -150,7 +150,7 @@ static GstCaps2 *gst_gdk_pixbuf_get_capslist(void) ...@@ -150,7 +150,7 @@ static GstCaps2 *gst_gdk_pixbuf_get_capslist(void)
} }
#endif #endif
static GstCaps2 *gst_gdk_pixbuf_sink_getcaps(GstPad *pad) static GstCaps *gst_gdk_pixbuf_sink_getcaps(GstPad *pad)
{ {
GstGdkPixbuf *filter; GstGdkPixbuf *filter;
...@@ -265,7 +265,7 @@ gst_gdk_pixbuf_chain (GstPad *pad, GstData *_data) ...@@ -265,7 +265,7 @@ gst_gdk_pixbuf_chain (GstPad *pad, GstData *_data)
gdk_pixbuf_get_height(pixbuf)); gdk_pixbuf_get_height(pixbuf));
if(filter->image_size == 0){ if(filter->image_size == 0){
GstCaps2 *caps; GstCaps *caps;
filter->width = gdk_pixbuf_get_width(pixbuf); filter->width = gdk_pixbuf_get_width(pixbuf);
filter->height = gdk_pixbuf_get_height(pixbuf); filter->height = gdk_pixbuf_get_height(pixbuf);
...@@ -273,7 +273,7 @@ gst_gdk_pixbuf_chain (GstPad *pad, GstData *_data) ...@@ -273,7 +273,7 @@ gst_gdk_pixbuf_chain (GstPad *pad, GstData *_data)
filter->image_size = filter->rowstride * filter->height; filter->image_size = filter->rowstride * filter->height;
caps = gst_pad_get_caps(filter->srcpad); caps = gst_pad_get_caps(filter->srcpad);
gst_caps2_set_simple (caps, gst_caps_set_simple (caps,
"width", G_TYPE_INT, filter->width, "width", G_TYPE_INT, filter->width,
"height", G_TYPE_INT, filter->height, "height", G_TYPE_INT, filter->height,
"framerate", G_TYPE_DOUBLE, 0., NULL); "framerate", G_TYPE_DOUBLE, 0., NULL);
...@@ -360,7 +360,7 @@ gst_gdk_pixbuf_type_find (GstTypeFind *tf, gpointer ignore) ...@@ -360,7 +360,7 @@ gst_gdk_pixbuf_type_find (GstTypeFind *tf, gpointer ignore)
gchar **mlist = gdk_pixbuf_format_get_mime_types(format); gchar **mlist = gdk_pixbuf_format_get_mime_types(format);
gst_type_find_suggest (tf, GST_TYPE_FIND_MINIMUM, gst_type_find_suggest (tf, GST_TYPE_FIND_MINIMUM,
gst_caps2_new_simple (mlist[0], NULL)); gst_caps_new_simple (mlist[0], NULL));
} }
gdk_pixbuf_loader_close (pixbuf_loader, NULL); gdk_pixbuf_loader_close (pixbuf_loader, NULL);
...@@ -380,7 +380,7 @@ plugin_init (GstPlugin *plugin) ...@@ -380,7 +380,7 @@ plugin_init (GstPlugin *plugin)
gst_type_find_register (plugin, "image/*", GST_RANK_MARGINAL, gst_type_find_register (plugin, "image/*", GST_RANK_MARGINAL,
gst_gdk_pixbuf_type_find, NULL, gst_gdk_pixbuf_type_find, NULL,
gst_caps2_copy(GST_CAPS2_ANY), NULL); gst_caps_copy(GST_CAPS_ANY), NULL);
/* plugin initialisation succeeded */ /* plugin initialisation succeeded */
return TRUE; return TRUE;
......
...@@ -54,7 +54,7 @@ static void gst_jpegdec_init (GstJpegDec *jpegdec); ...@@ -54,7 +54,7 @@ static void gst_jpegdec_init (GstJpegDec *jpegdec);
static void gst_jpegdec_chain (GstPad *pad, GstData *_data); static void gst_jpegdec_chain (GstPad *pad, GstData *_data);
static GstPadLinkReturn static GstPadLinkReturn
gst_jpegdec_link (GstPad *pad, const GstCaps2 *caps); gst_jpegdec_link (GstPad *pad, const GstCaps *caps);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
/*static guint gst_jpegdec_signals[LAST_SIGNAL] = { 0 }; */ /*static guint gst_jpegdec_signals[LAST_SIGNAL] = { 0 }; */
...@@ -80,27 +80,27 @@ gst_jpegdec_get_type(void) { ...@@ -80,27 +80,27 @@ gst_jpegdec_get_type(void) {
return jpegdec_type; return jpegdec_type;
} }
static GstCaps2* static GstCaps*
jpeg_caps_factory (void) jpeg_caps_factory (void)
{ {
return gst_caps2_new_simple ("image/jpeg", return gst_caps_new_simple ("image/jpeg",
"width", GST_TYPE_INT_RANGE, 16, 4096, "width", GST_TYPE_INT_RANGE, 16, 4096,
"height", GST_TYPE_INT_RANGE, 16, 4096, "height", GST_TYPE_INT_RANGE, 16, 4096,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE,
NULL); NULL);
} }
static GstCaps2* static GstCaps*
raw_caps_factory (void) raw_caps_factory (void)
{ {
return gst_caps2_from_string (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420")); return gst_caps_from_string (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"));
} }
static void static void
gst_jpegdec_base_init (gpointer g_class) gst_jpegdec_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *raw_caps, *jpeg_caps; GstCaps *raw_caps, *jpeg_caps;
raw_caps = raw_caps_factory (); raw_caps = raw_caps_factory ();
jpeg_caps = jpeg_caps_factory (); jpeg_caps = jpeg_caps_factory ();
...@@ -197,18 +197,18 @@ gst_jpegdec_init (GstJpegDec *jpegdec) ...@@ -197,18 +197,18 @@ gst_jpegdec_init (GstJpegDec *jpegdec)
} }
static GstPadLinkReturn static GstPadLinkReturn
gst_jpegdec_link (GstPad *pad, const GstCaps2 *caps) gst_jpegdec_link (GstPad *pad, const GstCaps *caps)
{ {
GstJpegDec *jpegdec = GST_JPEGDEC (gst_pad_get_parent (pad)); GstJpegDec *jpegdec = GST_JPEGDEC (gst_pad_get_parent (pad));
GstStructure *structure; GstStructure *structure;
structure = gst_caps2_get_nth_cap (caps, 0); structure = gst_caps_get_structure (caps, 0);
gst_structure_get_double (structure, "framerate", &jpegdec->fps); gst_structure_get_double (structure, "framerate", &jpegdec->fps);
gst_structure_get_int (structure, "width", &jpegdec->width); gst_structure_get_int (structure, "width", &jpegdec->width);
gst_structure_get_int (structure, "height", &jpegdec->height); gst_structure_get_int (structure, "height", &jpegdec->height);
caps = gst_caps2_new_simple ("video/x-raw-yuv", caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I','4','2','0'), "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I','4','2','0'),
"width", G_TYPE_INT, jpegdec->width, "width", G_TYPE_INT, jpegdec->width,
"height", G_TYPE_INT, jpegdec->height, "height", G_TYPE_INT, jpegdec->height,
...@@ -405,7 +405,7 @@ gst_jpegdec_chain (GstPad *pad, GstData *_data) ...@@ -405,7 +405,7 @@ gst_jpegdec_chain (GstPad *pad, GstData *_data)
jpegdec->height = height; jpegdec->height = height;
gst_pad_try_set_caps (jpegdec->srcpad, gst_pad_try_set_caps (jpegdec->srcpad,
gst_caps2_new_simple ("video/x-raw-yuv", gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I','4','2','0'), "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I','4','2','0'),
"width", G_TYPE_INT, width, "width", G_TYPE_INT, width,
"height", G_TYPE_INT, height, "height", G_TYPE_INT, height,
......
...@@ -51,7 +51,7 @@ static void gst_jpegenc_class_init (GstJpegEnc *klass); ...@@ -51,7 +51,7 @@ static void gst_jpegenc_class_init (GstJpegEnc *klass);
static void gst_jpegenc_init (GstJpegEnc *jpegenc); static void gst_jpegenc_init (GstJpegEnc *jpegenc);
static void gst_jpegenc_chain (GstPad *pad, GstData *_data); static void gst_jpegenc_chain (GstPad *pad, GstData *_data);
static GstPadLinkReturn gst_jpegenc_link (GstPad *pad, const GstCaps2 *caps); static GstPadLinkReturn gst_jpegenc_link (GstPad *pad, const GstCaps *caps);
static GstData *gst_jpegenc_get (GstPad *pad); static GstData *gst_jpegenc_get (GstPad *pad);
...@@ -83,27 +83,27 @@ gst_jpegenc_get_type (void) ...@@ -83,27 +83,27 @@ gst_jpegenc_get_type (void)
return jpegenc_type; return jpegenc_type;
} }
static GstCaps2* static GstCaps*
jpeg_caps_factory (void) jpeg_caps_factory (void)
{ {
return gst_caps2_new_simple ("video/x-jpeg", return gst_caps_new_simple ("video/x-jpeg",
"width", GST_TYPE_INT_RANGE, 16, 4096, "width", GST_TYPE_INT_RANGE, 16, 4096,
"height", GST_TYPE_INT_RANGE, 16, 4096, "height", GST_TYPE_INT_RANGE, 16, 4096,
"framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE, "framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE,
NULL); NULL);
} }
static GstCaps2* static GstCaps*
raw_caps_factory (void) raw_caps_factory (void)
{ {
return gst_caps2_from_string (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420")); return gst_caps_from_string (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("I420"));
} }
static void static void
gst_jpegenc_base_init (gpointer g_class) gst_jpegenc_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps2 *raw_caps, *jpeg_caps; GstCaps *raw_caps, *jpeg_caps;
raw_caps = raw_caps_factory (); raw_caps = raw_caps_factory ();
jpeg_caps = jpeg_caps_factory (); jpeg_caps = jpeg_caps_factory ();
...@@ -193,17 +193,17 @@ gst_jpegenc_init (GstJpegEnc *jpegenc) ...@@ -193,17 +193,17 @@ gst_jpegenc_init (GstJpegEnc *jpegenc)
} }