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 709208 - search instead of browse vs upnp server that does not support search via parentID
search instead of browse vs upnp server that does not support search via pare...
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: core
git master
Other Linux
: Normal major
: ---
Assigned To: grilo-maint
grilo-maint
: 721303 722943 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-10-01 16:37 UTC by Alban Browaeys
Modified: 2014-02-22 07:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initialize caps filter to none. (1.59 KB, patch)
2013-10-01 16:37 UTC, Alban Browaeys
committed Details | Review

Description Alban Browaeys 2013-10-01 16:37:33 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.
Comment 1 Juan A. Suarez Romero 2013-10-15 07:36:23 UTC
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(-)
Comment 2 Bastien Nocera 2014-02-22 06:53:50 UTC
*** Bug 721303 has been marked as a duplicate of this bug. ***
Comment 3 Bastien Nocera 2014-02-22 07:01:38 UTC
*** Bug 722943 has been marked as a duplicate of this bug. ***