Commit ea40cc5d authored by David Schleef's avatar David Schleef

Fixes to get gst-register working

Original commit message from CVS:
Fixes to get gst-register working
parent 2f33fbac
......@@ -52,7 +52,7 @@ GST_STATIC_PAD_TEMPLATE (
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (
GST_AUDIO_INT_PAD_TEMPLATE_CAPS ", "
GST_AUDIO_INT_PAD_TEMPLATE_CAPS "; "
"audio/x-alaw, "
"rate = (int) [ 8000, 48000 ], "
"channels = (int) [ 1, 2 ]"
......
......@@ -170,7 +170,7 @@ gst_avi_demux_base_init (gpointer g_class)
gst_caps2_append_cap (audcaps, structure);
}
audiosrctempl = gst_pad_template_new ("audio_%02d", GST_PAD_SRC,
GST_PAD_SOMETIMES, audcaps, NULL);
GST_PAD_SOMETIMES, audcaps);
vidcaps = gst_caps2_new_empty ();
for (i = 0; vid_list[i] != 0; i++) {
......@@ -179,7 +179,7 @@ gst_avi_demux_base_init (gpointer g_class)
}
gst_caps2_append_cap (vidcaps, gst_avi_demux_iavs_caps ());
videosrctempl = gst_pad_template_new ("video_%02d", GST_PAD_SRC,
GST_PAD_SOMETIMES, vidcaps, NULL);
GST_PAD_SOMETIMES, vidcaps);
gst_element_class_add_pad_template (element_class, audiosrctempl);
gst_element_class_add_pad_template (element_class, videosrctempl);
gst_element_class_add_pad_template (element_class,
......
......@@ -37,11 +37,11 @@ plugin_init (GstPlugin *plugin)
alaw_caps = alaw_factory ();
linear_caps = linear_factory ();
alawenc_src_template = gst_pad_template_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,alaw_caps, NULL);
alawenc_sink_template = gst_pad_template_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,linear_caps, NULL);
alawenc_src_template = gst_pad_template_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,alaw_caps);
alawenc_sink_template = gst_pad_template_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,linear_caps);
alawdec_src_template = gst_pad_template_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,linear_caps, NULL);
alawdec_sink_template = gst_pad_template_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,alaw_caps, NULL);
alawdec_src_template = gst_pad_template_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,linear_caps);
alawdec_sink_template = gst_pad_template_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,alaw_caps);
if (!gst_element_register (plugin, "alawenc",
GST_RANK_NONE, GST_TYPE_ALAWENC) ||
......
......@@ -38,14 +38,14 @@ plugin_init (GstPlugin *plugin)
linear_caps = linear_factory ();
mulawenc_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
mulaw_caps, NULL);
mulaw_caps);
mulawenc_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
linear_caps, NULL);
linear_caps);
mulawdec_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
linear_caps, NULL);
linear_caps);
mulawdec_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
mulaw_caps, NULL);
mulaw_caps);
if (!gst_element_register (plugin, "mulawenc",
GST_RANK_NONE, GST_TYPE_MULAWENC) ||
......
......@@ -2108,14 +2108,14 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *videocontext,
gst_structure_new ("video/x-xvid", NULL),
gst_structure_new ("video/mpeg",
"mpegversion", G_TYPE_INT, 4,
"systemstream", G_TYPE_BOOLEAN, FALSE),
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL),
NULL);
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MSMPEG4V3)) {
caps = gst_caps2_new_full (
gst_structure_new ("video/x-divx",
"divxversion", G_TYPE_INT, 3, NULL),
gst_structure_new ("video/x-msmpeg",
"msmpegversion", G_TYPE_INT, 43),
"msmpegversion", G_TYPE_INT, 43, NULL),
NULL);
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG1) ||
!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG2)) {
......@@ -2182,7 +2182,7 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *videocontext,
"height", GST_TYPE_INT_RANGE, 16, 4096,
"pixel_width", GST_TYPE_INT_RANGE, 0, 255,
"pixel_height", GST_TYPE_INT_RANGE, 0, 255,
"framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXDOUBLE,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE,
NULL);
}
}
......@@ -2222,7 +2222,7 @@ gst_matroskademux_acm_caps (guint16 codec_id,
} else {
caps = gst_caps2_from_string ("audio/x-raw-int, "
"endianness = (int) LITTLE_ENDIAN, "
"signed = (int) { TRUE, FALSE }, "
"signed = (boolean) { TRUE, FALSE }, "
"depth = (int) { 8, 16 }, "
"width = (int) { 8, 16 }");
}
......@@ -2315,7 +2315,7 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext,
"signed", G_TYPE_BOOLEAN, audiocontext->bitdepth == 8, NULL);
} else {
caps = gst_caps2_from_string ("audio/x-raw-int, "
"signed = (int) { TRUE, FALSE }, "
"signed = (boolean) { TRUE, FALSE }, "
"depth = (int) { 8, 16 }, "
"width = (int) { 8, 16 }");
}
......@@ -2475,8 +2475,7 @@ gboolean
gst_matroska_demux_plugin_init (GstPlugin *plugin)
{
gint i;
GstCaps2 *videosrccaps = NULL, *audiosrccaps = NULL,
*subtitlesrccaps = NULL, *temp;
GstCaps2 *videosrccaps, *audiosrccaps, *subtitlesrccaps, *temp;
const gchar *video_id[] = {
GST_MATROSKA_CODEC_ID_VIDEO_UNCOMPRESSED,
GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_SP,
......@@ -2562,8 +2561,9 @@ gst_matroska_demux_plugin_init (GstPlugin *plugin)
videosrctempl = gst_pad_template_new ("video_%02d",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
videosrccaps, NULL);
videosrccaps);
audiosrccaps = gst_caps2_new_empty ();
/* audio src template */
for (i = 0; audio_id[i] != NULL; i++) {
temp = gst_matroska_demux_audio_caps (NULL, audio_id[i], NULL, 0);
......@@ -2576,8 +2576,9 @@ gst_matroska_demux_plugin_init (GstPlugin *plugin)
audiosrctempl = gst_pad_template_new ("audio_%02d",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
audiosrccaps, NULL);
audiosrccaps);
subtitlesrccaps = gst_caps2_new_empty ();
/* subtitle src template */
for (i = 0; subtitle_id[i] != NULL; i++) {
temp = gst_matroska_demux_subtitle_caps (NULL, subtitle_id[i], NULL, 0);
......@@ -2586,7 +2587,7 @@ gst_matroska_demux_plugin_init (GstPlugin *plugin)
subtitlesrctempl = gst_pad_template_new ("subtitle_%02d",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
subtitlesrccaps, NULL);
subtitlesrccaps);
/* create an elementfactory for the matroska_demux element */
if (!gst_element_register (plugin, "matroskademux",
......
......@@ -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 */
......
......@@ -47,8 +47,8 @@ GST_STATIC_PAD_TEMPLATE (
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ( "audio/x-raw-int, "
"endianness = (int) " G_STRINGIFY(G_BYTE_ORDER) ", "
"signed = (int) true, "
"endianness = (int) BYTE_ORDER, "
"signed = (boolean) true, "
"width = (int) 16, "
"depth = (int) 16, "
"rate = (int) [ 1000, 48000 ], "
......
......@@ -50,8 +50,8 @@ GST_STATIC_PAD_TEMPLATE (
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ( "audio/x-raw-int, "
"endianness = (int) " G_STRINGIFY(G_BYTE_ORDER) ", "
"signed = (int) true, "
"endianness = (int) BYTE_ORDER, "
"signed = (boolean) true, "
"width = (int) 16, "
"depth = (int) 16, "
"rate = (int) [ 1000, 48000 ], "
......
......@@ -47,8 +47,8 @@ GST_STATIC_PAD_TEMPLATE (
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ( "audio/x-raw-int, "
"endianness = (int) " G_STRINGIFY(G_BYTE_ORDER) ", "
"signed = (int) true, "
"endianness = (int) BYTE_ORDER, "
"signed = (boolean) true, "
"width = (int) 16, "
"depth = (int) 16, "
"rate = (int) [ 1000, 48000 ], "
......
......@@ -50,8 +50,8 @@ GST_STATIC_PAD_TEMPLATE (
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ( "audio/x-raw-int, "
"endianness = (int) " G_STRINGIFY(G_BYTE_ORDER) ", "
"signed = (int) true, "
"endianness = (int) BYTE_ORDER, "
"signed = (boolean) true, "
"width = (int) 16, "
"depth = (int) 16, "
"rate = (int) [ 1000, 48000 ], "
......
......@@ -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;
......
......@@ -89,9 +89,9 @@ gst_videoflip_src_template_factory(void)
{
/* well, actually RGB too, but since there's no RGB format anyway */
GstCaps2 *caps = gst_caps2_from_string ("video/x-raw-yuv, "
"width = (int) [ 0, " G_STRINGIFY(G_MAXINT) "], "
"height = (int) [ 0, " G_STRINGIFY(G_MAXINT) "], "
"framerate = (double) [ 0, " G_STRINGIFY(G_MAXDOUBLE) "]");
"width = (int) [ 0, MAX ], "
"height = (int) [ 0, MAX ], "
"framerate = (double) [ 0, MAX ]");
caps = gst_caps2_intersect(caps, gst_videoflip_get_capslist ());
......@@ -102,9 +102,9 @@ static GstPadTemplate *
gst_videoflip_sink_template_factory(void)
{
GstCaps2 *caps = gst_caps2_from_string ("video/x-raw-yuv, "
"width = (int) [ 0, " G_STRINGIFY(G_MAXINT) "], "
"height = (int) [ 0, " G_STRINGIFY(G_MAXINT) "], "
"framerate = (double) [ 0, " G_STRINGIFY(G_MAXDOUBLE) "]");
"width = (int) [ 0, MAX ], "
"height = (int) [ 0, MAX ], "
"framerate = (double) [ 0, MAX ]");
caps = gst_caps2_intersect(caps, gst_videoflip_get_capslist ());
......@@ -140,8 +140,10 @@ gst_videoflip_base_init (gpointer g_class)
gst_element_class_set_details (element_class, &videoflip_details);
gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (gst_videoflip_sink_template_factory));
gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (gst_videoflip_src_template_factory));
gst_element_class_add_pad_template (element_class,
gst_videoflip_sink_template_factory ());
gst_element_class_add_pad_template (element_class,
gst_videoflip_src_template_factory ());
}
static void
gst_videoflip_class_init (GstVideoflipClass *klass)
......@@ -214,9 +216,9 @@ gst_videoflip_sink_getcaps (GstPad *pad)
gst_caps2_free (peercaps);
sizecaps = gst_caps2_from_string ("video/x-raw-yuv, "
"width = (int) [ 0, " G_STRINGIFY(G_MAXINT) "], "
"height = (int) [ 0, " G_STRINGIFY(G_MAXINT) "], "
"framerate = (double) [ 0, " G_STRINGIFY(G_MAXDOUBLE) "]");
"width = (int) [ 0, MAX ], "
"height = (int) [ 0, MAX ], "
"framerate = (double) [ 0, MAX ]");
caps = gst_caps2_intersect(capslist, sizecaps);
gst_caps2_free (sizecaps);
......@@ -276,7 +278,7 @@ gst_videoflip_init (GstVideoflip *videoflip)
{
GST_DEBUG ("gst_videoflip_init");
videoflip->sinkpad = gst_pad_new_from_template (
GST_PAD_TEMPLATE_GET (gst_videoflip_sink_template_factory),
gst_videoflip_sink_template_factory(),
"sink");
gst_element_add_pad(GST_ELEMENT(videoflip),videoflip->sinkpad);
gst_pad_set_chain_function(videoflip->sinkpad,gst_videoflip_chain);
......@@ -284,7 +286,7 @@ gst_videoflip_init (GstVideoflip *videoflip)
gst_pad_set_getcaps_function(videoflip->sinkpad,gst_videoflip_sink_getcaps);
videoflip->srcpad = gst_pad_new_from_template (
GST_PAD_TEMPLATE_GET (gst_videoflip_src_template_factory),
gst_videoflip_src_template_factory(),
"src");
gst_element_add_pad(GST_ELEMENT(videoflip),videoflip->srcpad);
gst_pad_set_link_function(videoflip->srcpad,gst_videoflip_src_link);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment