diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@sisa.samsung.com> | 2014-05-01 01:58:03 -0400 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@sisa.samsung.com> | 2014-05-10 18:30:24 -0400 |
commit | d2138beb1858806fc9e471b8d6a267d6a3011403 (patch) | |
tree | 9663622f335768868ba40e2b40725ff159b84699 /sys | |
parent | ecae7a1a41f9b3f68175c63b14ca44bdb9407cb4 (diff) | |
download | gstreamer-plugins-bad-d2138beb1858806fc9e471b8d6a267d6a3011403.tar.gz |
dvbsrc: fix up error reporting
This patch builds on previous work done by
Fabrizio (Misto) Milo <mistobaan@gmail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=641204
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dvb/gstdvbsrc.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index 9e2402366..184bd99ec 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c @@ -1625,7 +1625,8 @@ gst_dvbsrc_tune (GstDvbSrc * object) props.props = dvb_prop; if (ioctl (object->fd_frontend, FE_GET_PROPERTY, &props) < 0) { - g_warning ("Error enumarating delsys: %s", strerror (errno)); + GST_WARNING_OBJECT (object, "Error enumerating delsys: %s", + g_strerror (errno)); return FALSE; } @@ -1640,7 +1641,8 @@ gst_dvbsrc_tune (GstDvbSrc * object) props.num = 1; props.props = dvb_prop; if (ioctl (object->fd_frontend, FE_SET_PROPERTY, &props) < 0) { - g_warning ("Error resetting tuner: %s", strerror (errno)); + GST_WARNING_OBJECT (object, "Error resetting tuner: %s", + g_strerror (errno)); } /* First three entries are reserved */ n = 3; @@ -1730,7 +1732,7 @@ gst_dvbsrc_tune (GstDvbSrc * object) set_prop (dvb_prop, &n, DTV_MODULATION, object->modulation); break; default: - g_error ("Unknown frontend type: %d", object->delsys); + GST_ERROR_OBJECT (object, "Unknown frontend type %u", object->delsys); return FALSE; } g_usleep (100000); @@ -1746,7 +1748,8 @@ gst_dvbsrc_tune (GstDvbSrc * object) GST_DEBUG_OBJECT (object, "Setting %d properties", props.num); if (ioctl (object->fd_frontend, FE_SET_PROPERTY, &props) < 0) { - g_warning ("Error tuning channel: %s", strerror (errno)); + GST_WARNING_OBJECT (object, "Error tuning channel: %s", + g_strerror (errno)); } for (i = 0; i < 50; i++) { g_usleep (100000); @@ -1805,7 +1808,8 @@ gst_dvbsrc_set_pes_filters (GstDvbSrc * object) close (*fd); if ((*fd = open (demux_dev, O_RDWR)) < 0) { - g_error ("Error opening demuxer: %s (%s)", strerror (errno), demux_dev); + GST_ERROR_OBJECT (object, "Error opening demuxer: %s (%s)", + g_strerror (errno), demux_dev); g_free (demux_dev); } g_return_if_fail (*fd != -1); @@ -1821,7 +1825,7 @@ gst_dvbsrc_set_pes_filters (GstDvbSrc * object) if (ioctl (*fd, DMX_SET_PES_FILTER, &pes_filter) < 0) GST_WARNING_OBJECT (object, "Error setting PES filter on %s: %s", - demux_dev, strerror (errno)); + demux_dev, g_strerror (errno)); } g_free (demux_dev); |