GNOME Bugzilla – Bug 150546
[api] Error for calling gst_pad_push in a get function is not informative
Last modified: 2005-01-31 17:39:42 UTC
Calling gst_pad_push from a get function should provide a more informative error than: (process:20393): GStreamer-WARNING **: internal error: push on pad ffdemux_mpegts0:sink but it has no chainhandler
I don't think that this is the problem it is complaining about. AFAICT, there is no check for pushing from a get function.
See http://bugzilla.gnome.org/show_bug.cgi?id=150449 for the context this came up in. http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/udp/gstudpsrc.c?r1=1.26&r2=1.27 and http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/udp/gstudpsrc.h?r1=1.9&r2=1.10 for the fix I did. I think the problem is that schedulers _don't_ check for pushing from a get function. It's not a case they handle, and results in an error as I think it should, it's just not one that tells you anything about what is going on.
Created attachment 36681 [details] [review] proposed patch Patch adds a g_return_if_fail for the getfunction.
Applied.
Eh, no, make check breaks now. Working on it...
Created attachment 36694 [details] [review] better approach This adds flags to realpads to see in what function they are (get, chain) and assures that get-based pads don't push and chain-based pads don't pull. Includes tests for the testsuite (both fail as expected).
Created attachment 36696 [details] [review] more This adds one more test to assure that other actions are still allowed. Kind of redundant, but it never hurts.
Comment on attachment 36696 [details] [review] more Testsuite is added, but the gstpad.[ch] patch isn't (yet). Wim prefers doing this in the scheduler since we're currently having an overload of flags.
Applied patch after all...