[Bug 683995] New: [0.11] [API change] No parent parameter in GstPadLinkFunction

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Sep 13 16:55:49 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=683995
  GStreamer | gstreamer (core) | git

           Summary: [0.11] [API change] No parent parameter in
                    GstPadLinkFunction
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: blocker
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: olivier.crete at ocrete.ca
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: 3.5/3.6


Created an attachment (id=224288)
 View: https://bugzilla.gnome.org/attachment.cgi?id=224288
 Review: https://bugzilla.gnome.org/review?bug=683995&attachment=224288

pad: Add parent parameter to link function

While looking at the GstPadLinkFunction, I found two strange things:

1. There is no parent pointer passed, even though every user in the main
modules seems to fetch its parent as its first action.
2. The documentation says that a link function on a src pad should call the one
on it's peer sink pad, that sound pretty painful to implement safely, as the
object lock is released some other thread could be unlinking/releasing the sink
pad while this happens.

If there is a good reason for either of those behaviours ?

I'm attaching a proposed patch that adds a parent pointer, calls both functions
independently and rejects the link if the parent is required but gone. Please
discuss.

Also, please don't merge this patch without updating the other modules, if you
think it's a good idea, I can do the fixing.

The unlink function happens under the object lock, so none of these problems
apply.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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