After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610916 - rtspsrc dosen't work under windows
rtspsrc dosen't work under windows
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.x
Other Windows
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 636893 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-02-24 08:08 UTC by Tibor Kocsis
Modified: 2011-06-15 22:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case for Wim (312.74 KB, application/zip)
2010-03-08 10:04 UTC, Tibor Kocsis
  Details
Fix for the bug report (1.36 KB, patch)
2011-05-16 14:08 UTC, Miguel Angel Cabrera Moya
none Details | Review

Description Tibor Kocsis 2010-02-24 08:08:08 UTC
Hi,

I'm using this pipeline under windows:

gst-launch rtspsrc location="rtsp://..." debug=1 latency=1000
protocols=1 ! rtpmp4vdepay ! mpeg4videoparse ! ffdec_mpeg4 !
ffmpegcolorspace ! directdrawsink

I set the camera to stream 10 seconds then stop the stream, but the
rtspsrc can't go into PAUSED state, just 1 minute later. GST_DEBUG=4
said:

...
0:00:05.812500000  rtspsrc gstrtspsrc.c:5210:gst_rtspsrc_pause:<src01>
wait for connection idle
0:01:00.921875000  rtspsrc gstrtspsrc.c:5212:gst_rtspsrc_pause:<src01>
connection is idle now
...

There is 1 minute between the two message...  Any ideas why it isn't working properly?

Regards
Comment 1 LRN 2010-02-24 08:50:54 UTC
My guess is that something's wrong with rtsp library from -base. Everything that involves I/O is difficult to port to Windows.
Comment 2 Levente Farkas 2010-02-24 10:28:01 UTC
is there any change to fix it in the near future?
Comment 3 LRN 2010-02-24 16:49:57 UTC
I'm planning to port all I/O in GStreamer to GPoll (from GstPoll) once GStreamer raises minimal GLib version requirement high enough (which is expected to happen sometime this year). That will most assuredly break something, that is why i will also make sure that the code passes all related unit tests. Which may lead to fixing this bug. Or not. Depends on completeness of rtsp unit tests.
Comment 4 Wim Taymans 2010-03-02 16:52:42 UTC
Can you make a debug log with:

 GST_DEBUG=*rtsp*:5,*rtp*:5,*POLL*:5 gst-launch rtspsrc location="rtsp://..." debug=1 latency=1000 protocols=1 ! rtpmp4vdepay ! mpeg4videoparse ! ffdec_mpeg4 !
ffmpegcolorspace ! directdrawsink >debug.log 2>&1

then compress (like zip, gzip,..) and attach the resulting debug.log file to this bugreport.
Comment 5 Tibor Kocsis 2010-03-08 10:04:05 UTC
Created attachment 155539 [details]
test case for Wim

output for this pipeline:

GST_DEBUG=*rtsp*:5,*rtp*:5,*POLL*:5 gst-launch rtspsrc location="rtsp://..." debug=1 latency=1000 protocols=1 ! rtpmp4vdepay ! mpeg4videoparse ! ffdec_mpeg4 ! ffmpegcolorspace ! directdrawsink >debug.log 2>&1
Comment 6 Tibor Kocsis 2010-03-12 09:11:33 UTC
Hi Wim,

is there any progress in the issue?
Comment 7 Wim Taymans 2010-03-12 09:14:37 UTC
(In reply to comment #6)
> Hi Wim,
> 
> is there any progress in the issue?

Not yet. I'll update this report when there is.
Comment 8 Tobias Mueller 2010-08-29 02:17:35 UTC
Reopening as I guess the requested information has been provided in comment #5.
Comment 9 Andoni Morales 2011-03-09 09:44:49 UTC
*** Bug 636893 has been marked as a duplicate of this bug. ***
Comment 10 Levente Farkas 2011-03-28 10:32:55 UTC
In our investigation to find the problems on windows withj RTSP we found
that the problem is in gst_rtspsrc_close (gstrtspsrc.c:5479) function.
It stops at GST_RTSP_STREAM_LOCK (gstrtspsrc.c:5502) and waits until
gst_rtspsrc_connection_receive (gstrtspsrc.c:3680) timeouts (the
timeout value is 53 seconds).
Although there is gst_rtspsrc_loop_send_cmd (src, CMD_STOP, TRUE)
(gstrtspsrc.c:5492) the flush command doesn't affects the
gst_rtspsrc_connection_receive function but it should stop and return
immediately.
Anybody how knows the source better can help us why this can happened?
thanks in advance.
Comment 11 Levente Farkas 2011-03-28 13:40:49 UTC
in file gstpoll.c line 1482 in the flush there is condition:
    if (flushing && set->controllable && set->waiting > 0) {
where set->controllable always 0 after the fist packet received in
gst_rtspsrc_connection_receive, then it set to 1. so after that function becomes unstoppable, after setting gst_poll_set_controllable (gstrtspconnection.c:2272) FALSE.
if you start to debug a simple example and pause the running during this timeout, then visual studio show you probably in a deadlock situation.
Comment 12 Miguel Angel Cabrera Moya 2011-05-16 14:08:37 UTC
Created attachment 187915 [details] [review]
Fix for the bug report
Comment 13 Wim Taymans 2011-05-16 14:10:29 UTC
yes, patch makes sense to me.
Comment 14 Wim Taymans 2011-05-17 07:33:55 UTC
commit 30b2abaddd84a7f8bc61c8ebdc58b934c94712b4
Author: Miguel Angel Cabrera Moya <madmac2501@gmail.com>
Date:   Mon May 16 15:35:50 2011 +0200

    rtspconnection: not enter in not controllable state unless it is necessary
    
    When closing rtspsrc the state change blocks until the polling in the
    connection timeouts. This is because the second time we loop to read a
    full message controllable is set to FALSE in the poll group, even though no
    message is half read.
    This can be avoided by not setting controllable to FALSE the poll group
    unless we had begin to read a message.
    
    Fixes #610916