diff options
author | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2008-12-23 15:26:30 +0000 |
---|---|---|
committer | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2008-12-23 15:26:30 +0000 |
commit | ef7d946e23b14c3837c2b414c0b9684b3f79a5b4 (patch) | |
tree | d7066cfbbf3d7d8989e50c37c401f3b867cc780b | |
parent | 382bbcbd2b83bdd17ff4e127ee429901985b95ad (diff) | |
download | gst-plugins-bad-ef7d946e23b14c3837c2b414c0b9684b3f79a5b4.tar.gz gst-plugins-bad-ef7d946e23b14c3837c2b414c0b9684b3f79a5b4.tar.bz2 gst-plugins-bad-ef7d946e23b14c3837c2b414c0b9684b3f79a5b4.zip |
sys/dvb/gstdvbsrc.c: Post bus message with dvb read failure when unable to read from device.
Original commit message from CVS:
* sys/dvb/gstdvbsrc.c:
Post bus message with dvb read failure when unable to read from
device.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sys/dvb/gstdvbsrc.c | 9 |
2 files changed, 13 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2008-12-23 Zaheer Abbas Merali <zaheerabbas at merali dot org> + + * sys/dvb/gstdvbsrc.c: + Post bus message with dvb read failure when unable to read from + device. + 2008-12-23 Wim Taymans <wim.taymans@collabora.co.uk> Patch by: Luotao Fu <l dot fu at pengutronix dot de> diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index 0bbaba15..6a57029a 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c @@ -860,7 +860,8 @@ gst_dvbsrc_plugin_init (GstPlugin * plugin) } static GstBuffer * -read_device (int fd, int adapter_number, int frontend_number, int size) +read_device (int fd, int adapter_number, int frontend_number, int size, + GstDvbSrc * object) { int count = 0; struct pollfd pfd[1]; @@ -911,6 +912,10 @@ read_device (int fd, int adapter_number, int frontend_number, int size) GST_WARNING ("Unable to read after %u attempts from device: /dev/dvb/adapter%d/dvr%d (%d)", attempts, adapter_number, frontend_number, errno); + gst_element_post_message (GST_ELEMENT_CAST (object), + gst_message_new_element (GST_OBJECT (object), + gst_structure_empty_new ("dvb-read-failure"))); + } } else if (errno == -EINTR) { // poll interrupted ; @@ -944,7 +949,7 @@ gst_dvbsrc_create (GstPushSrc * element, GstBuffer ** buf) /* --- Read TS from DVR device --- */ GST_DEBUG_OBJECT (object, "Reading from DVR device"); *buf = read_device (object->fd_dvr, object->adapter_number, - object->frontend_number, buffer_size); + object->frontend_number, buffer_size, object); if (*buf != NULL) { GstCaps *caps; |