From 6e0855034567eb50e9e2b1d897e6d0f39f10ec4b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 29 Sep 2006 15:37:29 +0000 Subject: gst/rtsp/URLS: Add some more URLs. Original commit message from CVS: * gst/rtsp/URLS: Add some more URLs. * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_class_init), (gst_rtspsrc_init), (gst_rtspsrc_finalize), (gst_rtspsrc_set_property), (gst_rtspsrc_get_property), (gst_rtspsrc_stream_setup_rtp), (gst_rtspsrc_loop_interleaved), (gst_rtspsrc_loop_udp), (gst_rtspsrc_loop_send_cmd), (gst_rtspsrc_loop), (gst_rtspsrc_send), (gst_rtspsrc_parse_methods), (gst_rtspsrc_open), (gst_rtspsrc_close), (gst_rtspsrc_play), (gst_rtspsrc_pause), (gst_rtspsrc_handle_message), (gst_rtspsrc_change_state): * gst/rtsp/gstrtspsrc.h: Add timeout property to control UDP timeouts. Fix error messages. Also start a loop function when operating in UDP mode so that we can do some more stuff async. Handle element messages from udpsrc to detect timeouts. If a timeout happens we currently generate an error. API: rtspsrc::timeout property. * gst/udp/gstudpsrc.c: (gst_udpsrc_class_init), (gst_udpsrc_create): Really implement the timeout in microseconds and not milliseconds. --- gst/udp/gstudpsrc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gst/udp') diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index ba395e38..3d4d72f2 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -89,8 +89,8 @@ * * * #guint64 - * "timeout": the timeout that expired when - * waiting for data. + * "timeout": the timeout in microseconds that + * expired when waiting for data. * * * @@ -250,8 +250,8 @@ gst_udpsrc_class_init (GstUDPSrcClass * klass) UDP_DEFAULT_BUFFER_SIZE, G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_TIMEOUT, g_param_spec_uint64 ("timeout", "Timeout", - "Post a message after this timeout (in microseconds) (0 = disabled)", - 0, G_MAXUINT64, UDP_DEFAULT_TIMEOUT, G_PARAM_READWRITE)); + "Post a message after timeout microseconds (0 = disabled)", 0, + G_MAXUINT64, UDP_DEFAULT_TIMEOUT, G_PARAM_READWRITE)); gstbasesrc_class->start = gst_udpsrc_start; gstbasesrc_class->stop = gst_udpsrc_stop; @@ -331,8 +331,8 @@ gst_udpsrc_create (GstPushSrc * psrc, GstBuffer ** buf) udpsrc->timeout); if (udpsrc->timeout > 0) { - timeval.tv_sec = udpsrc->timeout / 1000; - timeval.tv_usec = (udpsrc->timeout % 1000) * 1000; + timeval.tv_sec = udpsrc->timeout / 1000000; + timeval.tv_usec = udpsrc->timeout % 1000000; timeout = &timeval; } else { timeout = NULL; -- cgit