+2004-06-08 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * gst/tcp/gsttcpclientsrc.c: (gst_tcpclientsrc_get):
+ * gst/tcp/gsttcpserversrc.c: (gst_tcpserversrc_get):
+ return EOS instead of NULL in _get
+
2004-06-08 Wim Taymans <wim@fluendo.com>
* gst/tcp/gsttcp.c: (gst_tcp_gdp_read_header),
if (ret <= 0) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("select failed: %s", g_strerror (errno)));
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
/* ask how much is available for reading on the socket */
if (ret < 0) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("ioctl failed: %s", g_strerror (errno)));
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
GST_LOG_OBJECT (src, "ioctl says %d bytes available", readsize);
buf = gst_buffer_new_and_alloc (readsize);
if (!(caps = gst_tcp_gdp_read_caps (GST_ELEMENT (src), src->sock_fd))) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("Could not read caps through GDP"));
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
src->caps_received = TRUE;
string = gst_caps_to_string (caps);
if (!gst_pad_try_set_caps (pad, caps)) {
g_warning ("Could not set caps");
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
}
if (!(data = gst_tcp_gdp_read_header (GST_ELEMENT (src), src->sock_fd))) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("Could not read data header through GDP"));
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
if (GST_IS_EVENT (data))
return data;
if (ret < 0) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
gst_buffer_unref (buf);
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
/* if we read 0 bytes, and we're blocking, we hit eos */
return GST_DATA (buf);
}
-
static void
gst_tcpclientsrc_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
if (ret <= 0) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("select failed: %s", g_strerror (errno)));
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
/* ask how much is available for reading on the socket */
ret = ioctl (src->client_sock_fd, FIONREAD, &readsize);
if (ret < 0) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("ioctl failed: %s", g_strerror (errno)));
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
buf = gst_buffer_new_and_alloc (readsize);
if (!(caps = gst_tcpserversrc_gdp_read_caps (src))) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("Could not read caps through GDP"));
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
src->caps_received = TRUE;
string = gst_caps_to_string (caps);
if (!gst_pad_try_set_caps (pad, caps)) {
g_warning ("Could not set caps");
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
}
if (!(data = gst_tcpserversrc_gdp_read_header (src))) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("Could not read data header through GDP"));
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
if (GST_IS_EVENT (data))
return data;
if (ret < 0) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
gst_buffer_unref (buf);
- return NULL;
+ return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
/* if we read 0 bytes, and we're blocking, we hit eos */