Discussion:
[Bug 763313] New: gst-rtsp-server: matching of media fails when using different IPs/hostnames
"GStreamer" (GNOME Bugzilla)
2016-03-08 12:08:43 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=763313

Bug ID: 763313
Summary: gst-rtsp-server: matching of media fails when using
different IPs/hostnames
Classification: Platform
Product: GStreamer
Version: 1.7.2
OS: Linux
Status: NEW
Severity: critical
Priority: Normal
Component: gst-rtsp-server
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@gmail.com
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---

I forward the local port 8554 to port 3000 on my gateway.

I can access the stream via LAN at: rtsp://192.168.0.1:8554/stream
and I can access the stream via the internet at: rtsp://myurl:3000/stream

I cannot access both streams at the same time. If the first client is attached
on the LAN, I can only access the LAN stream and vice-versa.


test case 1: LAN client and Internet client

0:00:06.711999431 10608 0x14167b0 FIXME default
gstutils.c:3764:gst_pad_create_stream_id_internal:<rpicamsrc0:src> Creating
random stream-id, consider implementing a deterministic way of creating a
stream-id
0:00:06.713950395 10608 0x1416780 FIXME default
gstutils.c:3764:gst_pad_create_stream_id_internal:<appsrc0:src> Creating random
stream-id, consider implementing a deterministic way of creating a stream-id
0:00:06.912338832 10608 0x13d2690 FIXME rtspmedia
rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs
fixing
0:00:07.046474422 10608 0x13d2690 FIXME rtspmedia
rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs
fixing
0:00:07.047287408 10608 0x13d2690 WARN rtspmedia
rtsp-media.c:3451:gst_rtsp_media_suspend: media 0x13ff138 was not prepared
0:00:12.645305854 10608 0x13d2690 WARN rtspmedia
rtsp-media.c:3712:gst_rtsp_media_set_state: media 0x13ff138 was not prepared
0:00:13.441799548 10608 0x1476af0 FIXME default
gstutils.c:3764:gst_pad_create_stream_id_internal:<rpicamsrc1:src> Creating
random stream-id, consider implementing a deterministic way of creating a
stream-id
0:00:13.443320520 10608 0x1476ac0 FIXME default
gstutils.c:3764:gst_pad_create_stream_id_internal:<appsrc1:src> Creating random
stream-id, consider implementing a deterministic way of creating a stream-id
0:00:13.629415178 10608 0x129dd20 FIXME rtspmedia
rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs
fixing
0:00:13.773946582 10608 0x129dd20 FIXME rtspmedia
rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs
fixing
0:00:13.774754567 10608 0x129dd20 WARN rtspmedia
rtsp-media.c:3451:gst_rtsp_media_suspend: media 0x13ff278 was not prepared
here attaches the second client from a different network <<<
0:00:23.922597300 10608 0x143d580 FIXME default
gstutils.c:3764:gst_pad_create_stream_id_internal:<rpicamsrc2:src> Creating
random stream-id, consider implementing a deterministic way of creating a
stream-id
0:00:23.924215271 10608 0x143d490 FIXME default
gstutils.c:3764:gst_pad_create_stream_id_internal:<appsrc2:src> Creating random
stream-id, consider implementing a deterministic way of creating a stream-id
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
0:00:23.951330784 10608 0x143d580 ERROR rpicamsrc
RaspiCapture.c:1241:raspi_capture_set_format_and_start: camera component
couldn't be enabled
0:00:23.957637671 10608 0x143d580 WARN basesrc
gstbasesrc.c:2948:gst_base_src_loop:<rpicamsrc2> error: Internal data flow
error.
0:00:23.958480656 10608 0x143d580 WARN basesrc
gstbasesrc.c:2948:gst_base_src_loop:<rpicamsrc2> error: streaming task paused,
reason error (-5)
0:00:23.960889613 10608 0x145f690 WARN rtspmedia
rtsp-media.c:2278:default_handle_message: 0x13ff3b8: got error Internal data
flow error. (gstbasesrc.c(2948): gst_base_src_loop ():
/GstPipeline:media-pipeline/GstBin:bin2/GstRpiCamSrc:rpicamsrc2:
streaming task paused, reason error (-5))
0:00:23.963292570 10608 0x129dd20 WARN rtspmedia
rtsp-media.c:2573:wait_preroll: failed to preroll pipeline
0:00:23.964245552 10608 0x129dd20 WARN rtspmedia
rtsp-media.c:2877:gst_rtsp_media_prepare: failed to preroll pipeline
0:00:24.007065783 10608 0x129dd20 ERROR rtspclient
rtsp-client.c:763:find_media: client 0x1312c60: can't prepare media
0:00:24.011692700 10608 0x129dd20 ERROR rtspclient
rtsp-client.c:2286:handle_describe_request: client 0x1312c60: no media


test case 2: 2 LAN clients

0:00:06.180315159 10665 0x2107b0 FIXME default
gstutils.c:3764:gst_pad_create_stream_id_internal:<rpicamsrc0:src> Creating
random stream-id, consider implementing a deterministic way of creating a
stream-id
0:00:06.182136126 10665 0x210780 FIXME default
gstutils.c:3764:gst_pad_create_stream_id_internal:<appsrc0:src> Creating random
stream-id, consider implementing a deterministic way of creating a stream-id
0:00:06.377422624 10665 0x1cc690 FIXME rtspmedia
rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs
fixing
0:00:06.383724511 10665 0x1cc690 FIXME rtspmedia
rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs
fixing
0:00:06.384523497 10665 0x1cc690 WARN rtspmedia
rtsp-media.c:3451:gst_rtsp_media_suspend: media 0x1f9138 was not prepared
here it comes the second client from the same network <<<
0:00:10.797286359 10665 0x1cc690 FIXME rtspmedia
rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs
fixing
0:00:10.803551247 10665 0x1cc690 FIXME rtspmedia
rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs
fixing
0:00:17.166038147 10665 0x1cc690 FIXME rtspmedia
rtsp-media.c:3425:gst_rtsp_media_suspend: suspend for dynamic pipelines needs
fixing
0:00:17.242016784 10665 0x1cc690 WARN rtspmedia
rtsp-media.c:3712:gst_rtsp_media_set_state: media 0x1f9138 was not prepared
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-03-08 12:17:55 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=763313

bomba_____ <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-03-08 12:25:18 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=763313

Jan Schmidt <***@noraisin.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
CC| |***@noraisin.net

--- Comment #1 from Jan Schmidt <***@noraisin.net> ---
You haven't set your pipeline as shared, so the second client triggers an
attempt to open the camera a second time, which fails.

Use

gst_rtsp_media_factory_set_shared (factory, TRUE);

in your server app.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-03-08 13:25:57 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=763313

--- Comment #2 from bomba_____ <***@gmail.com> ---
Hello Jan!

From my server app:

/* share media with more than one client */
gst_rtsp_media_factory_set_shared (factory, TRUE);


and it works! I can access with a second, third, fourth client but only from
the same network of the first one accessing the stream.

I'm afraid this is not the problem in this issue.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-03-08 13:49:37 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=763313

Sebastian Dröge (slomo) <***@coaxion.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@coaxion.net

--- Comment #3 from Sebastian Dröge (slomo) <***@coaxion.net> ---
The problem is probably matching the URI/path when a new client connects. It
probably looks at the hostname part too, and then doesn't find a media for it.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-02 12:25:04 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=763313

--- Comment #4 from bomba_____ <***@gmail.com> ---
It looks like that the problematic part is the service port. If I keep '8554'
on both sides of the tunnel, I can access the stream locally and remotely.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-02 16:24:10 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=763313

--- Comment #5 from bomba_____ <***@gmail.com> ---
gst-rtsp-server/gst/rtsp-server/rtsp-media-factory.c +1278

static gchar *
default_gen_key (GstRTSPMediaFactory * factory, const GstRTSPUrl * url)
{
gchar *result;
const gchar *pre_query;
const gchar *query;
guint16 port;

pre_query = url->query ? "?" : "";
query = url->query ? url->query : "";

gst_rtsp_url_get_port (url, &port);

result = g_strdup_printf ("%u%s%s%s", port, url->abspath, pre_query, query);

return result;
}


Why result is composed using the port? This actually causes the problem.

result = g_strdup_printf ("%s%s%s", url->abspath, pre_query, query);

Fixes it. Is it safe?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-02 16:40:41 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=763313

--- Comment #6 from bomba_____ <***@gmail.com> ---
Created attachment 344792
--> https://bugzilla.gnome.org/attachment.cgi?id=344792&action=edit
Proposed patch
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-05-06 13:01:50 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=763313

Vivia Nikolaidou <***@ahiru.eu> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
CC| |***@ahiru.eu
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-11-03 15:39:51 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=763313

GStreamer system administrator <***@gstreamer.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |OBSOLETE

--- Comment #7 from GStreamer system administrator <***@gstreamer.net> ---
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been
closed from further activity.

You can subscribe and participate further through the new bug through this link
to our GitLab instance:
https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/21.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...