diff options
author | David Schleef <ds@schleef.org> | 2003-12-11 05:36:47 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2003-12-11 05:36:47 +0000 |
commit | e7d5a998ade1607db9955f868cff0c39a119fb52 (patch) | |
tree | e2ce55d4edb53d2c0fc2a12f03dfab1d0d6746a9 | |
parent | a8ad01a44c71bcb47e5972e9ed49e7276456545a (diff) | |
download | gstreamer-plugins-base-e7d5a998ade1607db9955f868cff0c39a119fb52.tar.gz |
Fixes to get gst-register working
Original commit message from CVS:
Fixes to get gst-register working
-rw-r--r-- | gst-libs/gst/audio/audio.h | 21 | ||||
-rw-r--r-- | gst-libs/gst/video/gstvideofilter.c | 2 | ||||
-rw-r--r-- | gst-libs/gst/video/video.h | 8 | ||||
-rw-r--r-- | gst/sine/gstsinesrc.c | 4 | ||||
-rw-r--r-- | gst/typefind/gsttypefindfunctions.c | 11 | ||||
-rw-r--r-- | gst/videoscale/gstvideoscale.c | 8 | ||||
-rw-r--r-- | gst/videoscale/videoscale.c | 2 | ||||
-rw-r--r-- | gst/videotestsrc/videotestsrc.c | 15 | ||||
-rw-r--r-- | sys/v4l/gstv4lmjpegsrc.c | 4 | ||||
-rw-r--r-- | sys/ximage/ximagesink.c | 2 | ||||
-rw-r--r-- | sys/xvimage/xvimagesink.c | 4 |
11 files changed, 39 insertions, 42 deletions
diff --git a/gst-libs/gst/audio/audio.h b/gst-libs/gst/audio/audio.h index 1c7828c46..73a4043f5 100644 --- a/gst-libs/gst/audio/audio.h +++ b/gst-libs/gst/audio/audio.h @@ -64,30 +64,29 @@ G_BEGIN_DECLS /* "standard" int audio is native order, 16 bit stereo. */ #define GST_AUDIO_INT_STANDARD_PAD_TEMPLATE_CAPS \ "audio/x-raw-int, " \ - "rate = (int) [ 1, " G_STRINGIFY(G_MAXINT) ", " \ + "rate = (int) [ 1, MAX ], " \ "channels = (int) 2, " \ - "endianness = (int) " G_STRINGIFY(G_BYTE_ORDER) ", " \ + "endianness = (int) BYTE_ORDER, " \ "width = (int) 16, " \ "depth = (int) 16, " \ "signed = (boolean) true, " \ - "buffer-frames = (int) [ 1, " G_STRINGIFY(G_MAXINT) "]" + "buffer-frames = (int) [ 1, MAX]" #define GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS \ "audio/x-raw-float, " \ - "rate = (int) [ 1, " G_STRINGIFY(G_MAXINT) ", " \ - "channels = (int) [ 1, " G_STRINGIFY(G_MAXINT) ", " \ - "endianness = (int) { " G_STRINGIFY(G_LITTLE_ENDIAN) ", " \ - G_STRINGIFY(G_BIG_ENDIAN) "}, " \ + "rate = (int) [ 1, MAX ], " \ + "channels = (int) [ 1, MAX ], " \ + "endianness = (int) { LITTLE_ENDIAN , BIG_ENDIAN }, " \ "width = (int) { 32, 64 }, " \ - "buffer-frames = (int) [ 1, " G_STRINGIFY(G_MAXINT) "]" + "buffer-frames = (int) [ 1, MAX]" /* "standard" float audio is native order, 32 bit mono. */ #define GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS \ "audio/x-raw-float, " \ - "rate = (int) [ 1, " G_STRINGIFY(G_MAXINT) ", " \ + "rate = (int) [ 1, MAX ], " \ "channels = (int) 1, " \ - "endianness = (int) " G_STRINGIFY(G_BYTE_ORDER) ", " \ - "buffer-frames = (int) [ 1, " G_STRINGIFY(G_MAXINT) "]" + "endianness = (int) BYTE_ORDER, " \ + "buffer-frames = (int) [ 1, MAX]" /* * this library defines and implements some helper functions for audio diff --git a/gst-libs/gst/video/gstvideofilter.c b/gst-libs/gst/video/gstvideofilter.c index ef773001b..64d2fd50e 100644 --- a/gst-libs/gst/video/gstvideofilter.c +++ b/gst-libs/gst/video/gstvideofilter.c @@ -133,7 +133,7 @@ static GstStructure *gst_videofilter_format_get_structure(GstVideofilterFormat * gst_structure_set(structure, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE, + "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); return structure; diff --git a/gst-libs/gst/video/video.h b/gst-libs/gst/video/video.h index 213494818..fb64271bb 100644 --- a/gst-libs/gst/video/video.h +++ b/gst-libs/gst/video/video.h @@ -31,9 +31,9 @@ #define G_MASK_32_REVERSE 0x0000ff00 #define B_MASK_32_REVERSE 0x00ff0000 -#define R_MASK_24 0xff0000 -#define G_MASK_24 0x00ff00 -#define B_MASK_24 0x0000ff +#define R_MASK_24 "0xff0000" +#define G_MASK_24 "0x00ff00" +#define B_MASK_24 "0x0000ff" #define R_MASK_24_REVERSE 0x0000ff #define G_MASK_24_REVERSE 0x00ff00 @@ -111,7 +111,7 @@ "video/x-raw-rgb, " \ "bpp = (int) 32, " \ "depth = (int) 32, " \ - "endianness = (int) " G_STRINGIFY(G_BIG_ENDIAN) ", " \ + "endianness = (int) BIG_ENDIAN, " \ "red_mask = (int) " R_MASK_32 ", " \ "green_mask = (int) " G_MASK_32 ", " \ "blue_mask = (int) " B_MASK_32 ", " \ diff --git a/gst/sine/gstsinesrc.c b/gst/sine/gstsinesrc.c index 046adab22..bd61fad02 100644 --- a/gst/sine/gstsinesrc.c +++ b/gst/sine/gstsinesrc.c @@ -60,7 +60,7 @@ GST_STATIC_PAD_TEMPLATE ( GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-int, " - "endianness = (int) " G_STRINGIFY(G_BYTE_ORDER) ", " + "endianness = (int) BYTE_ORDER, " "signed = (boolean) true, " "width = (int) 16, " "depth = (int) 16, " @@ -441,7 +441,7 @@ static gboolean gst_sinesrc_force_caps (GstSineSrc *src) { static GstStaticCaps2 static_caps = GST_STATIC_CAPS ("audio/x-raw-int, " - "endianness = (int) " G_STRINGIFY(G_BYTE_ORDER) ", " + "endianness = (int) BYTE_ORDER, " "signed = (boolean) true, " "width = (int) 16, " "depth = (int) 16, " diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 8d5735973..86a791ebc 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -406,7 +406,7 @@ mp3_type_find (GstTypeFind *tf, gpointer unused) /*** video/mpeg systemstream **************************************************/ static GstStaticCaps2 mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, " - "systemstream (boolean) true, mpegversion = (int) [ 1, 2 ]"); + "systemstream = (boolean) true, mpegversion = (int) [ 1, 2 ]"); #define MPEG_SYS_CAPS gst_caps2_copy(gst_static_caps2_get(&mpeg_sys_caps)) #define IS_MPEG_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \ (((guint8 *)data)[1] == 0x00) && \ @@ -567,7 +567,7 @@ mpeg1_sys_type_find (GstTypeFind *tf, gpointer unused) /*** video/mpeg video stream **************************************************/ static GstStaticCaps2 mpeg_video_caps = GST_STATIC_CAPS ("video/mpeg, " - "systemstream (boolean) false"); + "systemstream = (boolean) false"); #define MPEG_VIDEO_CAPS gst_caps2_copy(gst_static_caps2_get(&mpeg_video_caps)) static void mpeg_video_type_find (GstTypeFind *tf, gpointer unused) @@ -839,14 +839,13 @@ bmp_type_find (GstTypeFind *tf, gpointer unused) /*** image/tiff ********************/ static GstStaticCaps2 tiff_caps = GST_STATIC_CAPS ("image/tiff, " - "endianness = int { " G_STRINGIFY(G_BIG_ENDIAN) "," - G_STRINGIFY(G_LITTLE_ENDIAN) "}" ); + "endianness = (int) { BIG_ENDIAN, LITTLE_ENDIAN }" ); #define TIFF_CAPS gst_caps2_copy(gst_static_caps2_get(&tiff_caps)) static GstStaticCaps2 tiff_be_caps = GST_STATIC_CAPS ("image/tiff, " - "endianness = int " G_STRINGIFY(G_BIG_ENDIAN)); + "endianness = (int) BIG_ENDIAN"); #define TIFF_BE_CAPS gst_caps2_copy(gst_static_caps2_get(&tiff_be_caps)) static GstStaticCaps2 tiff_le_caps = GST_STATIC_CAPS ("image/tiff, " - "endianness = int " G_STRINGIFY(G_LITTLE_ENDIAN)); + "endianness = (int) LITTLE_ENDIAN"); #define TIFF_LE_CAPS gst_caps2_copy(gst_static_caps2_get(&tiff_le_caps)) static void tiff_type_find (GstTypeFind *tf, gpointer ununsed) diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c index dd7cceef1..8af7a3dd1 100644 --- a/gst/videoscale/gstvideoscale.c +++ b/gst/videoscale/gstvideoscale.c @@ -136,8 +136,8 @@ gst_videoscale_base_init (gpointer g_class) gst_element_class_set_details (element_class, &videoscale_details); - gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (gst_videoscale_sink_template_factory)); - gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (gst_videoscale_src_template_factory)); + gst_element_class_add_pad_template (element_class, gst_videoscale_sink_template_factory()); + gst_element_class_add_pad_template (element_class, gst_videoscale_src_template_factory()); } static void gst_videoscale_class_init (GstVideoscaleClass *klass) @@ -253,7 +253,7 @@ gst_videoscale_init (GstVideoscale *videoscale) { GST_DEBUG ("gst_videoscale_init"); videoscale->sinkpad = gst_pad_new_from_template ( - GST_PAD_TEMPLATE_GET (gst_videoscale_sink_template_factory), + gst_videoscale_sink_template_factory(), "sink"); gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->sinkpad); gst_pad_set_chain_function(videoscale->sinkpad,gst_videoscale_chain); @@ -261,7 +261,7 @@ gst_videoscale_init (GstVideoscale *videoscale) gst_pad_set_getcaps_function(videoscale->sinkpad,gst_videoscale_getcaps); videoscale->srcpad = gst_pad_new_from_template ( - GST_PAD_TEMPLATE_GET (gst_videoscale_src_template_factory), + gst_videoscale_src_template_factory(), "src"); gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->srcpad); gst_pad_set_link_function(videoscale->srcpad,gst_videoscale_link); diff --git a/gst/videoscale/videoscale.c b/gst/videoscale/videoscale.c index abf103cca..57005e9bc 100644 --- a/gst/videoscale/videoscale.c +++ b/gst/videoscale/videoscale.c @@ -126,7 +126,7 @@ videoscale_get_structure (struct videoscale_format_struct *format) gst_structure_set(structure, "width", GST_TYPE_INT_RANGE, 0, G_MAXINT, "height", GST_TYPE_INT_RANGE, 0, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE, + "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); return structure; diff --git a/gst/videotestsrc/videotestsrc.c b/gst/videotestsrc/videotestsrc.c index 2873b8a33..611aea7fc 100644 --- a/gst/videotestsrc/videotestsrc.c +++ b/gst/videotestsrc/videotestsrc.c @@ -475,10 +475,9 @@ struct fourcc_list_struct * paintrect_find_name (const char *name) } -GstCaps2 *paint_get_caps(struct fourcc_list_struct *format) +GstStructure *paint_get_structure(struct fourcc_list_struct *format) { unsigned int fourcc; - GstCaps2 *caps; g_return_val_if_fail(format, NULL); @@ -492,19 +491,19 @@ GstCaps2 *paint_get_caps(struct fourcc_list_struct *format) }else{ endianness = G_BIG_ENDIAN; } - caps = gst_caps2_new_simple ("video/x-raw-rgb", + return gst_structure_new ("video/x-raw-rgb", "bpp", G_TYPE_INT, format->bitspp, "endianness", G_TYPE_INT, endianness, "depth", G_TYPE_INT, format->depth, "red_mask", G_TYPE_INT, format->red_mask, "green_mask", G_TYPE_INT, format->green_mask, - "blue_mask", G_TYPE_INT, format->blue_mask); + "blue_mask", G_TYPE_INT, format->blue_mask, + NULL); }else{ - caps = gst_caps2_new_simple ("video/x-raw-yuv", - "format", GST_TYPE_FOURCC, fourcc); + return gst_structure_new ("video/x-raw-yuv", + "format", GST_TYPE_FOURCC, fourcc, + NULL); } - - return caps; } void diff --git a/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c index 523e8ecfe..00316d268 100644 --- a/sys/v4l/gstv4lmjpegsrc.c +++ b/sys/v4l/gstv4lmjpegsrc.c @@ -142,7 +142,7 @@ gst_v4lmjpegsrc_base_init (gpointer g_class) GST_STATIC_CAPS ("video/x-jpeg, " "width = (int) [ 0, MAX ], " "height = (int) [ 0, MAX ], " - "framerate = (double) [ 0, MAXDOUBLE ]" + "framerate = (double) [ 0, MAX ]" ) ); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); @@ -588,7 +588,7 @@ gst_v4lmjpegsrc_getcaps (GstPad *pad) return gst_caps2_new_simple ("video/x-jpeg", "width", GST_TYPE_INT_RANGE, vcap->maxwidth/4, vcap->maxwidth, "height", GST_TYPE_INT_RANGE, vcap->maxheight/4, vcap->maxheight, - "framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE, + "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); } diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 0436a5b08..e53479c77 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -460,7 +460,7 @@ gst_ximagesink_xcontext_get (GstXImageSink *ximagesink) "blue_mask", G_TYPE_INT, GINT_FROM_BE (xcontext->visual->blue_mask), "width", GST_TYPE_INT_RANGE, 0, G_MAXINT, "height", GST_TYPE_INT_RANGE, 0, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE, + "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); g_mutex_unlock (ximagesink->x_lock); diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 62714166a..2b85e16a2 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -423,7 +423,7 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext) "red_mask", G_TYPE_INT, formats[i].blue_mask, "width", GST_TYPE_INT_RANGE, 0, G_MAXINT, "height", GST_TYPE_INT_RANGE, 0, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE, + "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); /* For RGB caps we store them and the image @@ -449,7 +449,7 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext) "fourcc", GST_TYPE_FOURCC,formats[i].id, "width", GST_TYPE_INT_RANGE, 0, G_MAXINT, "height", GST_TYPE_INT_RANGE, 0, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE, + "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); break; default: |