GNOME Bugzilla – Bug 739620
input-selector: _activate_sinkpad conflates two different functions
Last modified: 2015-03-24 13:49:39 UTC
Seems input-selector contains a lot of bit-rot. gst_input_selector_activate_sinkpad is used to: 1) get the current active sink pad, falling back to the first existing pad, 2) Set the "active" field on the given pad to TRUE. The function 2) seems to be a remnant from when _activate_sinkpad still used the given pad as the fallback pad. This function should be split into two separate functions. Also, it seems the "active" field of the sink pad is just used to determine whether the running-time property returns 0. However, since this field is set on any activity it cannot be used to determine whether gst_segment_to_running_time works or not. This should probably be changed to check if the segment is defined and return GST_CLOCK_TIME_NONE if it is not. In addition, Bug 736891 is something to clean up. The block signal can only be undone by state-change.
Created attachment 290985 [details] [review] patch 1/3
Created attachment 290986 [details] [review] patch 2/3
Created attachment 290987 [details] [review] patch 3/3
Please review the patches (they are on top of the patch for bug 736891).
I'll merge them once bug 736891 is done
Created attachment 300132 [details] [review] patch 1/3 Rebased to master (and bug 736891).
Created attachment 300133 [details] [review] patch 2/3
Created attachment 300134 [details] [review] patch 3/3
Pushed, thanks. commit 27644a6bd2ca96cf6e02a7508c31e89d5389113b Author: Jan Alexander Steffens (heftig) <jsteffens@make.tv> Date: Wed Nov 19 13:08:45 2014 +0100 input-selector: Rename _activate_sinkpad to _get_active_sinkpad Removes the now unused 'pad' parameter and renames the function to something more appropriate. https://bugzilla.gnome.org/show_bug.cgi?id=739620 commit bf8a71104c70faab0cf03ab94f4fd94bb22e5e1f Author: Jan Alexander Steffens (heftig) <jsteffens@make.tv> Date: Wed Nov 19 13:03:21 2014 +0100 input-selector: Remove pad's 'active' field This is now never read. https://bugzilla.gnome.org/show_bug.cgi?id=739620 commit 6f24f4917d6cdde5cdb6935f3ff6eb21948c714b Author: Jan Alexander Steffens (heftig) <jsteffens@make.tv> Date: Wed Nov 19 12:59:12 2014 +0100 input-selector: Use segment-presence for running_time check When determining whether the running_time of a pad can be calculated, check if the segment is in TIME format instead of using the 'active' field. Since the latter is set through *any* activity, it's not a reliable indicator of segment presence. https://bugzilla.gnome.org/show_bug.cgi?id=739620