summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-12-11 05:36:46 +0000
committerDavid Schleef <ds@schleef.org>2003-12-11 05:36:46 +0000
commit458a99e2dd99445720e5a7c3e027a609aaa921f9 (patch)
tree647e8f642a7f446228a26f1a5f413ba07bbb25ae
parent1c2aeb0087f21c8fdaa8fe9e9a200bf1a11c5c6f (diff)
downloadgstreamer-plugins-bad-458a99e2dd99445720e5a7c3e027a609aaa921f9.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.h21
-rw-r--r--gst-libs/gst/video/video.h8
-rw-r--r--gst/mixmatrix/mixmatrix.c19
-rw-r--r--gst/mpegaudioparse/gstmpegaudioparse.c15
-rw-r--r--gst/qtdemux/qtdemux.c14
5 files changed, 39 insertions, 38 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/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/mixmatrix/mixmatrix.c b/gst/mixmatrix/mixmatrix.c
index 90e043466..6bbdf1d78 100644
--- a/gst/mixmatrix/mixmatrix.c
+++ b/gst/mixmatrix/mixmatrix.c
@@ -88,8 +88,7 @@ enum {
ARG_MATRIXPTR,
};
-#if 0
-static GstStaticPadTemplate mixmatrix_sink_factory =
+static GstStaticPadTemplate mixmatrix_sink_template =
GST_STATIC_PAD_TEMPLATE (
"sink%d",
GST_PAD_SINK,
@@ -97,14 +96,13 @@ GST_STATIC_PAD_TEMPLATE (
GST_STATIC_CAPS ( GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS )
);
-static GstStaticPadTemplate mixmatrix_src_factory =
+static GstStaticPadTemplate mixmatrix_src_template =
GST_STATIC_PAD_TEMPLATE (
"src%d",
GST_PAD_SRC,
GST_PAD_REQUEST,
GST_STATIC_CAPS ( GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS )
);
-#endif
static void gst_mixmatrix_class_init (GstMixMatrixClass *klass);
static void gst_mixmatrix_base_init (GstMixMatrixClass *klass);
@@ -118,7 +116,6 @@ static GstPadLinkReturn gst_mixmatrix_connect (GstPad *pad, const GstCaps2 *caps
static void gst_mixmatrix_loop (GstElement *element);
-static GstPadTemplate *srctempl, *sinktempl;
static guint gst_mixmatrix_signals[LAST_SIGNAL] = { 0 };
static GstElementClass *parent_class = NULL;
@@ -148,8 +145,10 @@ gst_mixmatrix_base_init (GstMixMatrixClass *klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- gst_element_class_add_pad_template (element_class, sinktempl);
- gst_element_class_add_pad_template (element_class, srctempl);
+ gst_element_class_add_pad_template (element_class,
+ gst_static_pad_template_get (&mixmatrix_sink_template));
+ gst_element_class_add_pad_template (element_class,
+ gst_static_pad_template_get (&mixmatrix_src_template));
gst_element_class_set_details (element_class, &mixmatrix_details);
}
@@ -362,7 +361,8 @@ gst_mixmatrix_request_new_pad (GstElement *element, GstPadTemplate *templ, const
if (padnum >= mix->sinkpadalloc)
mixmatrix_resize(mix, ROUND_UP(padnum,mix->grpsize), mix->sinkpadalloc);
- pad = gst_pad_new_from_template(sinktempl, name);
+ pad = gst_pad_new_from_template(
+ gst_static_pad_template_get (&mixmatrix_sink_template), name);
GST_PAD_ELEMENT_PRIVATE(pad) = GINT_TO_POINTER(padnum);
gst_element_add_pad(GST_ELEMENT(mix), pad);
// g_signal_connect(G_OBJECT(pad), "unlink", G_CALLBACK(sink_unlinked), mix);
@@ -385,7 +385,8 @@ gst_mixmatrix_request_new_pad (GstElement *element, GstPadTemplate *templ, const
if (padnum >= mix->srcpadalloc)
mixmatrix_resize(mix, ROUND_UP(padnum,mix->grpsize), mix->srcpadalloc);
- pad = gst_pad_new_from_template(srctempl, name);
+ pad = gst_pad_new_from_template(
+ gst_static_pad_template_get (&mixmatrix_src_template), name);
GST_PAD_ELEMENT_PRIVATE(pad) = GINT_TO_POINTER(padnum);
gst_element_add_pad(GST_ELEMENT(mix), pad);
// g_signal_connect(G_OBJECT(pad), "unlink", G_CALLBACK(sink_unlinked), mix);
diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c
index 26536767c..193673fca 100644
--- a/gst/mpegaudioparse/gstmpegaudioparse.c
+++ b/gst/mpegaudioparse/gstmpegaudioparse.c
@@ -32,7 +32,6 @@ static GstElementDetails mp3parse_details = {
"Erik Walthinsen <omega@cse.ogi.edu>"
};
-#if 0
static GstStaticPadTemplate mp3_src_template =
GST_STATIC_PAD_TEMPLATE (
"src",
@@ -52,7 +51,6 @@ GST_STATIC_PAD_TEMPLATE (
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/mpeg")
);
-#endif
/* GstMPEGAudioParse signals and args */
enum {
@@ -67,7 +65,6 @@ enum {
/* FILL ME */
};
-static GstPadTemplate *sink_temp, *src_temp;
static void gst_mp3parse_class_init (GstMPEGAudioParseClass *klass);
static void gst_mp3parse_base_init (GstMPEGAudioParseClass *klass);
@@ -247,8 +244,10 @@ gst_mp3parse_base_init (GstMPEGAudioParseClass *klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- gst_element_class_add_pad_template (element_class, sink_temp);
- gst_element_class_add_pad_template (element_class, src_temp);
+ gst_element_class_add_pad_template (element_class,
+ gst_static_pad_template_get (&mp3_sink_template));
+ gst_element_class_add_pad_template (element_class,
+ gst_static_pad_template_get (&mp3_src_template));
gst_element_class_set_details (element_class, &mp3parse_details);
}
@@ -279,13 +278,15 @@ gst_mp3parse_class_init (GstMPEGAudioParseClass *klass)
static void
gst_mp3parse_init (GstMPEGAudioParse *mp3parse)
{
- mp3parse->sinkpad = gst_pad_new_from_template(sink_temp, "sink");
+ mp3parse->sinkpad = gst_pad_new_from_template(
+ gst_static_pad_template_get (&mp3_sink_template), "sink");
gst_element_add_pad(GST_ELEMENT(mp3parse),mp3parse->sinkpad);
gst_pad_set_chain_function(mp3parse->sinkpad,gst_mp3parse_chain);
gst_element_set_loop_function (GST_ELEMENT(mp3parse),NULL);
- mp3parse->srcpad = gst_pad_new_from_template(src_temp, "src");
+ mp3parse->srcpad = gst_pad_new_from_template(
+ gst_static_pad_template_get (&mp3_src_template), "src");
gst_element_add_pad(GST_ELEMENT(mp3parse),mp3parse->srcpad);
/*gst_pad_set_type_id(mp3parse->srcpad, mp3frametype); */
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 0ae640b28..541817592 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -1541,7 +1541,7 @@ static GstCaps2 *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc)
case GST_MAKE_FOURCC('r','a','w',' '):
/* uncompressed RGB */
return gst_caps2_from_string ("video/x-raw-rgb, "
- "endianness = (int) " G_STRINGIFY(G_BIG_ENDIAN));
+ "endianness = (int) BIG_ENDIAN");
/*"bpp", GST_PROPS_INT(x),
"depth", GST_PROPS_INT(x),
"red_mask", GST_PROPS_INT(x),
@@ -1599,36 +1599,36 @@ static GstCaps2 *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc)
return gst_caps2_from_string ("audio/x-raw-int, "
"width = (int) 16, "
"depth = (int) 16, "
- "endianness = (int) " G_STRINGIFY(G_BIG_ENDIAN) ", "
+ "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, "
"width = (int) 16, "
"depth = (int) 16, "
- "endianness = (int) " G_STRINGIFY(G_LITTLE_ENDIAN) ", "
+ "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, "
"width = (int) 64, "
- "endianness = (int) " G_STRINGIFY(G_BIG_ENDIAN));
+ "endianness = (int) G_BIG_ENDIAN");
case GST_MAKE_FOURCC('f','l','3','2'):
return gst_caps2_from_string ("audio/x-raw-float, "
"width = (int) 32, "
- "endianness = (int) " G_STRINGIFY(G_BIG_ENDIAN));
+ "endianness = (int) G_BIG_ENDIAN");
case GST_MAKE_FOURCC('i','n','2','4'):
/* FIXME */
return gst_caps2_from_string ("audio/x-raw-int, "
"width = (int) 24, "
"depth = (int) 32, "
- "endianness = (int) " G_STRINGIFY(G_BIG_ENDIAN) ", "
+ "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, "
"width = (int) 32, "
"depth = (int) 32, "
- "endianness = (int) " G_STRINGIFY(G_BIG_ENDIAN) ", "
+ "endianness = (int) G_BIG_ENDIAN, "
"signed = (boolean) true");
case GST_MAKE_FOURCC('u','l','a','w'):
/* FIXME */