+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>
}
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];
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
;
/* --- 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;