After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746645 - input-selector: Allow setting pads active
input-selector: Allow setting pads active
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 739620
Blocks:
 
 
Reported: 2015-03-23 13:34 UTC by Jan Alexander Steffens (heftig)
Modified: 2017-03-07 08:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.12 KB, patch)
2015-03-23 13:34 UTC, Jan Alexander Steffens (heftig)
none Details | Review
patch 1/2 (2.61 KB, patch)
2015-03-31 07:06 UTC, Jan Alexander Steffens (heftig)
none Details | Review
patch 2/2 (1.86 KB, patch)
2015-03-31 07:08 UTC, Jan Alexander Steffens (heftig)
none Details | Review

Description Jan Alexander Steffens (heftig) 2015-03-23 13:34:57 UTC
Created attachment 300135 [details] [review]
patch

Makes the pad's 'active' property writeable and allows writing TRUE to it in order to set the pad active.
Comment 1 Tim-Philipp Müller 2015-03-24 13:56:48 UTC
This I find a bit weird API-wise, because you can only activate it but not de-activate it. Do we have similar API on any other elements?

If only activation is allowed an action signal would perhaps be a cleaner solution.
Comment 2 Jan Alexander Steffens (heftig) 2015-03-24 14:00:55 UTC
I suppose deactivation could set active_pad to NULL, in which case input-selector will switch to the oldest existing pad the next tiem something happens.
Comment 3 Jan Alexander Steffens (heftig) 2015-03-31 07:06:21 UTC
Created attachment 300643 [details] [review]
patch 1/2

input-selector: Fold debugging and locking into _set_active_pad

Also renames the function to _set_active_sinkpad for consistency
with _is_active_sinkpad and _get_active_sinkpad.
Comment 4 Jan Alexander Steffens (heftig) 2015-03-31 07:08:51 UTC
Created attachment 300644 [details] [review]
patch 2/2

input-selector: Allow setting pads active

Makes the pad's 'active' property writable.


Here's another implementation that doesn't reject FALSE and doesn't use g_object_set.
Comment 5 Jan Alexander Steffens (heftig) 2015-03-31 07:14:28 UTC
Hm, now I'm noticing that setting FALSE on already deactivated pads would still screw with the selector, so this isn't good either. I guess I'll do the signal variant.
Comment 6 Jan Alexander Steffens (heftig) 2017-03-07 08:06:44 UTC
This was a bad idea and I'm giving up on this one. :p