2005-06-02 Wim Taymans <wim@fluendo.com>
+ * gst/rtsp/README:
+ * gst/rtsp/gstrtspsrc.c: (gst_rtsp_proto_get_type),
+ (gst_rtspsrc_class_init), (gst_rtspsrc_create_stream),
+ (gst_rtspsrc_add_element), (gst_rtspsrc_set_state),
+ (gst_rtspsrc_stream_setup_rtp),
+ (gst_rtspsrc_stream_configure_transport), (find_stream),
+ (gst_rtspsrc_loop), (gst_rtspsrc_open), (gst_rtspsrc_play),
+ (gst_rtspsrc_change_state):
+ * gst/rtsp/rtsptransport.c: (rtsp_transport_new),
+ (rtsp_transport_init), (parse_mode), (parse_range),
+ (rtsp_transport_parse), (rtsp_transport_free):
+ RTSP cleanups.
+
+2005-06-02 Wim Taymans <wim@fluendo.com>
+
* gst/effectv/gstquark.c: (gst_quarktv_chain):
* gst/goom/gstgoom.c: (gst_goom_chain):
* gst/videobox/Makefile.am:
the data will be received on the same connection as the RTSP connection.
At this point, we remove the UDP source elements as we don't need them anymore. We
- setup the rtpdec session manager element though as follows:
+ set up the rtpsess session manager element though as follows:
+---------------------------------------------+
| +------------+ |
GstElementStateReturn ret;
GList *streams;
+ ret = GST_STATE_SUCCESS;
+
/* for all streams */
for (streams = src->streams; streams; streams = g_list_next (streams)) {
GstRTSPStream *stream;
outpad = stream->rtpdecrtcp;
}
- if ((chainfunc = GST_RPAD_CHAINFUNC (outpad))) {
+ /* and chain buffer to internal element */
+ {
GstBuffer *buf;
buf = gst_buffer_new_and_alloc (size);
memcpy (GST_BUFFER_DATA (buf), data, size);
- if (chainfunc (outpad, buf) != GST_FLOW_OK)
+ if (gst_pad_chain (outpad, buf) != GST_FLOW_OK)
goto need_pause;
}
}
}
}
-
return TRUE;
+ /* ERRORS */
invalid_url:
{
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
break;
case GST_STATE_READY_TO_PAUSED:
rtspsrc->interleaved = FALSE;
- gst_rtspsrc_open (rtspsrc);
+ if (!gst_rtspsrc_open (rtspsrc))
+ goto open_failed;
/* need to play now for the preroll, might delay that to
* next state when we have NO_PREROLL as a return value */
gst_rtspsrc_play (rtspsrc);
ret = gst_rtspsrc_set_state (rtspsrc, GST_STATE_PENDING (rtspsrc));
if (ret != GST_STATE_SUCCESS)
- goto error;
+ goto done;
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element);
switch (transition) {
break;
}
-error:
+done:
return ret;
+
+open_failed:
+ {
+ return GST_STATE_FAILURE;
+ }
}
static void
parse_mode (RTSPTransport * transport, gchar * str)
{
- if (strstr (str, "\"PLAY\""))
- transport->mode_play = TRUE;
- else
- transport->mode_play = FALSE;
- if (strstr (str, "\"RECORD\""))
- transport->mode_record = TRUE;
- else
- transport->mode_record = FALSE;
+ transport->mode_play = (strstr (str, "\"PLAY\"") != NULL);
+ transport->mode_record = (strstr (str, "\"RECORD\"") != NULL);
}
static void