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 649098 - Running a playbin2 element and gst-rtsp-server withn same code does not work.
Running a playbin2 element and gst-rtsp-server withn same code does not work.
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-01 17:37 UTC by Fabian Deutsch
Modified: 2011-05-06 09:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A non-working example. (1.48 KB, text/x-vala)
2011-05-01 17:37 UTC, Fabian Deutsch
Details
A cleaned testcase. (944 bytes, text/x-vala)
2011-05-05 09:18 UTC, Fabian Deutsch
Details
GST_DEBUG=3 log (9.70 KB, text/x-log)
2011-05-05 09:19 UTC, Fabian Deutsch
Details
test case in c (3.43 KB, text/x-csrc)
2011-05-05 09:20 UTC, Fabian Deutsch
Details

Description Fabian Deutsch 2011-05-01 17:37:55 UTC
Created attachment 186983 [details]
A non-working example.

I am using gst-rtsp on a current Fedora 15 b:

Name        : gstreamer-rtsp
Version     : 0.10.7
Release     : 3.fc15
Architecture: x86_64

The problem appears when I try to run a playbin2 element within the same code, frmo where I am running an RtspServer instance. (The playbin2 is connecting to this instance). 

An example is attached.
Comment 1 Sebastian Dröge (slomo) 2011-05-03 07:36:00 UTC
What exactly is the problem you're seeing? The sample doesn't work for me either but this looks like it is just using the wrong port and then times out after some time.
Comment 2 Fabian Deutsch 2011-05-03 07:48:11 UTC
Well. It looks to me that the server as well as the client use the correct port, but no connection is established:
tcp        0      0 0.0.0.0:8554                0.0.0.0:*                   LISTEN      500        524581     27379/t             

tcp        0      0 127.0.0.1:35322             127.0.0.1:8554              VERBUNDEN   500        524589     27379/t
Comment 3 Fabian Deutsch 2011-05-05 09:18:32 UTC
Created attachment 187262 [details]
A cleaned testcase.
Comment 4 Fabian Deutsch 2011-05-05 09:19:38 UTC
Created attachment 187263 [details]
GST_DEBUG=3 log
Comment 5 Fabian Deutsch 2011-05-05 09:20:05 UTC
Created attachment 187264 [details]
test case in c
Comment 6 Fabian Deutsch 2011-05-05 09:20:31 UTC
Maybe I am just using the mainloop wrong and it is no bug at all ...
Comment 7 Fabian Deutsch 2011-05-05 09:23:33 UTC
The log shows, that the playbin2 times out, waiting for a response from the server. But maybe the server can't answer while the client is waiting, as the mainloop is blocked by the waiting client.
The server detectes that a client tried to connect and is adding it - after the client itself timed out.
Comment 8 Fabian Deutsch 2011-05-05 09:39:16 UTC
Adding another timeout with highest priority shows that the mainloop is blocked:

Example cb:
    Timeout.add_seconds_full (-100, 1, () => {
        debug ("-------------- Hangs? ----------------------");
        return true;
    });
Comment 9 Fabian Deutsch 2011-05-05 09:54:00 UTC
Responsible seems to be gst_rtsp_connection_receive, which is using gst_poll_wait - which is actually blocking the mainthread (?).
Comment 10 Fabian Deutsch 2011-05-06 08:57:22 UTC
Or could it be the GST_RTSP_CONN_LOCK (
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/rtsp/gstrtspsrc.c#n1714 ) ?
Comment 11 Wim Taymans 2011-05-06 09:03:46 UTC
The mainloop of the server needs to be running before it can accept connection. One way is to start the server mainloop in a new thread.
Comment 12 Fabian Deutsch 2011-05-06 09:46:23 UTC
Client and Server need to be run in different contexts, therefor marked as
invalid.