[gst-devel] move warnings to stderr
vishnu at pobox.com
vishnu at pobox.com
Tue Oct 2 16:42:01 CEST 2001
i'm communicating with my gstreamer app over a pipe, so i need to
move any diagnostics going to stdout to stderr. Here's a patch
for the plugins i'm using.
--
Victory to the Divine Mother!!
http://sahajayoga.org
-------------- next part --------------
diff -up 'joshua/plugins/filters/colorspace/colorspace.c' 'current/plugins/filters/colorspace/colorspace.c'
Index: ././plugins/filters/colorspace/colorspace.c
--- ././plugins/filters/colorspace/colorspace.c Sun Sep 30 17:03:11 2001
+++ ././plugins/filters/colorspace/colorspace.c Sun Sep 30 22:24:43 2001
@@ -109,7 +109,7 @@ colorspace_setup_converter (GstColorspac
from_space = gst_caps_get_fourcc_int (from_caps, "format");
to_space = gst_caps_get_fourcc_int (to_caps, "format");
- g_print ("set up converter for %08lx to %08lx\n", from_space, to_space);
+ g_warning ("set up converter for %08lx to %08lx\n", from_space, to_space);
switch (from_space) {
case GST_MAKE_FOURCC ('R','G','B',' '):
@@ -154,7 +154,7 @@ colorspace_setup_converter (GstColorspac
#endif
case GST_MAKE_FOURCC ('Y','U','Y','2'):
case GST_MAKE_FOURCC ('I','4','2','0'):
- fprintf (stderr, "colorspace: RGB to YUV implement me\n");
+ g_error ("colorspace: RGB to YUV implement me");
break;
}
break;
@@ -162,7 +162,7 @@ colorspace_setup_converter (GstColorspac
case GST_MAKE_FOURCC ('I','4','2','0'):
switch (to_space) {
case GST_MAKE_FOURCC ('R','G','B',' '):
- fprintf (stderr, "colorspace: YUV to RGB\n");
+ g_warning ("colorspace: YUV to RGB");
space->destbpp = gst_caps_get_int (to_caps, "bpp");
space->converter = gst_colorspace_yuv2rgb_get_converter (from_caps, to_caps);
@@ -238,7 +238,7 @@ colorspace_negotiate_src (GstPad *pad, G
case GST_MAKE_FOURCC ('Y','U','Y','2'):
case GST_MAKE_FOURCC ('I','4','2','0'):
//space->srccaps = original;
- fprintf (stderr, "found something suitable\n");
+ //fprintf (stderr, "found something suitable\n");
return GST_PAD_NEGOTIATE_AGREE;
default:
*caps = NULL;
@@ -273,8 +273,8 @@ colorspace_negotiate_sink (GstPad *pad,
default:
break;
}
- g_print ("colorspace: no common format found\n");
- g_print ("colorspace: src: %08lx\n", gst_caps_get_fourcc_int (original, "format"));
+ g_warning ("colorspace: no common format found\n");
+ g_warning ("colorspace: src: %08lx\n", gst_caps_get_fourcc_int (original, "format"));
// peers couldn't agree, we need to help
space->sinkcaps = original;
@@ -297,7 +297,7 @@ colorspace_negotiate_sink (GstPad *pad,
*/
if (gst_pad_renegotiate (space->srcpad)) {
- g_print ("found something suitable\n");
+ g_warning ("found something suitable\n");
if (colorspace_setup_converter (space)) {
return GST_PAD_NEGOTIATE_AGREE;
}
diff -up 'joshua/plugins/mpeg2/parse/mpeg2parse.c' 'current/plugins/mpeg2/parse/mpeg2parse.c'
Index: ././plugins/mpeg2/parse/mpeg2parse.c
--- ././plugins/mpeg2/parse/mpeg2parse.c Sun Sep 30 17:03:18 2001
+++ ././plugins/mpeg2/parse/mpeg2parse.c Sun Sep 30 22:25:53 2001
@@ -749,7 +749,7 @@ parse_pes (Mpeg2Parse *mpeg2parse)
gst_element_add_pad(GST_ELEMENT(mpeg2parse),(*outpad));
}
else {
- g_print ("mpeg2parse: cannot create pad %s, no template for %02x\n", name, id);
+ g_warning ("mpeg2parse: cannot create pad %s, no template for %02x", name, id);
}
if (name)
g_free (name);
@@ -893,7 +893,7 @@ gst_mpeg2parse_loop (GstElement *element
default:
if (mpeg2parse->MPEG2 && ((mpeg2parse->id < 0xBD) || (mpeg2parse->id > 0xFE))) {
- printf("mpeg2parse: ******** unknown id 0x%02X\n",mpeg2parse->id);
+ g_warning ("mpeg2parse: ******** unknown id 0x%02X",mpeg2parse->id);
}
else {
if (mpeg2parse->MPEG2)
diff -up 'joshua/plugins/oss/gstosssink.c' 'current/plugins/oss/gstosssink.c'
Index: ././plugins/oss/gstosssink.c
--- ././plugins/oss/gstosssink.c Sun Sep 30 17:03:18 2001
+++ ././plugins/oss/gstosssink.c Sun Sep 30 22:23:04 2001
@@ -343,7 +343,7 @@ gst_osssink_sync_parms (GstOssSink *osss
ioctl (osssink->fd, SNDCTL_DSP_GETBLKSIZE, &frag);
ioctl (osssink->fd, SNDCTL_DSP_GETOSPACE, &ospace);
- g_print ("osssink: setting sound card to %dHz %d bit %s (%d bytes buffer, %d fragment)\n",
+ g_warning ("osssink: setting sound card to %dHz %d bit %s (%d bytes buffer, %d fragment)\n",
osssink->frequency, osssink->format,
(osssink->channels == 2) ? "stereo" : "mono", ospace.bytes, frag);
GST_INFO (GST_CAT_PLUGIN_INFO, "osssink: setting sound card to %dHz %d bit %s (%d bytes buffer, %d fragment)",
More information about the gstreamer-devel
mailing list