GNOME Bugzilla – Bug 709208
search instead of browse vs upnp server that does not support search via parentID
Last modified: 2014-02-22 07:01:38 UTC
Created attachment 256201 [details] [review] initialize caps filter to none. It turns out the root of this issue was: commit 5b88159eaa8d06a5f17c092cbb69b79e62d48f2b grl_init_caps /* by default, type filtering is not considered to be supported. The source * has to explicitly modify its caps. */ is now followed by self->priv->type_filter = GRL_TYPE_FILTER_ALL; instead of GRL_TYPE_FILTER_NONE. We cannot revert the above commit as it introduce GRL_TYPE_FILTER_ALL which is used in grilo-plugins upnp at least. Though I reverted the changes in grl_caps_init and grl_caps_test_option and now totem and rhtyhmbox browse instead of search. The issue is that grl_upnp_source_get_caps set the search and browse caps to FILTER_ALL if filtered is supported and do not touch them otherwise. But grl_caps_new instantiate a caps with filter initalized to FILTER_ALL ... so grl_upnp_source_get_caps always returns caps with FILTER_ALL . With this change for totem checks if caps supports video before set the options filter and as I changed it to initialize as NONE , the options filter stayed at FILTER_ALL, all is fine now. For rhythmbox creates the options from the caps : "options = grl_operation_options_new (caps);" then grl_operation_options_set_type_filter > grl_caps_test_option (get supported_filter from caps, ie FILTER_NONE via grl_caps_get_type_filter ; then "and" the supported_filter with the requested filter and return the filter FILTER_NONE which equals 0) ... thus in grl_operation_options_set_type_filter , ret values zero and the operation options filter is not set (left as FILTER_ALL) . It is fine now too.
commit b1e79ceedea7ee4b2d057ac00c28b13aa8056bce Author: Alban Browaeys <prahal@yahoo.com> Date: Tue Oct 1 18:31:21 2013 +0200 core: initialize caps filter to none. Sync with the comment above telling the filter is to be initialized to none. Partially revert commit 5b88159eaa8d06a5f17c092cbb69b79e62d48f2b The issue is that grl_upnp_source_get_caps set the search and browse caps to FILTER_ALL if filtered is supported and do not touch them otherwise. But grl_caps_new instantiate a caps with filter initalized to FILTER_ALL ... so grl_upnp_source_get_caps always returns caps with FILTER_ALL . Fixes browse vs search for grilo plugin upnp at least against servers that has no or incomplete search capabilities. https://bugzilla.gnome.org/show_bug.cgi?id=709208 src/grl-caps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
*** Bug 721303 has been marked as a duplicate of this bug. ***
*** Bug 722943 has been marked as a duplicate of this bug. ***