if (caps == NULL)
{
/* ERROR: could not get caps of pad */
- g_warning ("gstaudio: warning: could not get caps of pad %p (%s)\n",
- pad, GST_PAD_NAME (pad));
+ g_warning ("gstaudio: could not get caps of pad %s:%s\n",
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return 0;
}
/* get caps of pad */
caps = GST_PAD_CAPS (pad);
- if (caps == NULL)
+ if (caps == NULL) {
/* ERROR: could not get caps of pad */
+ g_warning ("gstaudio: could not get caps of pad %s:%s\n",
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return 0;
+ }
else {
gst_caps_get_int (caps, "rate", &rate);
return rate;
if (caps == NULL)
{
/* ERROR: could not get caps of pad */
- g_warning ("gstaudio: warning: could not get caps of pad %p (%s)\n",
- pad, GST_PAD_NAME (pad));
+ g_warning ("gstaudio: could not get caps of pad %s:%s\n",
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
length = 0.0;
}
else
GstCaps *caps = NULL;
caps = GST_PAD_CAPS (pad);
- /* FIXME : Please change this to a better warning method ! */
if (caps == NULL)
- printf ("WARNING: gstaudio: could not get caps of pad !\n");
+ {
+ g_warning ("gstaudio: could not get caps of pad %s:%s\n",
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
+ }
gst_caps_get_int (caps, "width", &width);
gst_caps_get_boolean (caps, "signed", &is_signed);