[Bug 749227] New: gst_rtsp_server_attach() is misleading

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon May 11 07:18:12 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=749227

            Bug ID: 749227
           Summary: gst_rtsp_server_attach() is misleading
    Classification: Platform
           Product: GStreamer
           Version: unspecified
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-rtsp-server
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: xclaesse at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

gst_rtsp_server_attach() returns a source ID which mislead to using
g_source_remove() on it, but that will fail if the source was not attached to
the default main context.

Also if I understand correctly the code, the GSource keeps a ref on the
GstRTSPServer object, so the server will be leaked until caller explicitly
destroy the source. The doc should tell it.

What I suggest is:

1) Deprecate gst_rtsp_server_attach() since it's just a small helper around
gst_rtsp_server_create_source() that just creates more confusion.

2) Add a note in gst_rtsp_server_create_source() that it will keep a ref on the
server until the source is destroyed. I'm not sure if we should suggest
g_source_unref() or g_source_destroy() here though.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list