GNOME Bugzilla – Bug 760382
grl_source_resolve_sync to return correct GrlMedia
Last modified: 2018-09-24 09:39:54 UTC
source: return the new media on _resolve_sync
Created attachment 318611 [details] [review] source: return the new media on _resolve_sync grl_source_resolve_sync should return the filled GrlMedia and this could be a different GrlMedia of the one provided as parameter.
Created attachment 318612 [details] [review] tests: lua-factory on grl_source_resolve_sync() grl_source_resolve_sync might return a different GrlMedia then the one provieded as argument. That'll soon be true for all lua sources from lua-factory after: https://bugzilla.gnome.org/show_bug.cgi?id=753141 So, tests handling lua sources that uses grl_source_resolve_sync() should properly handle that.
Actually, plugins must send back the passed media with the new requested information inside, and not a new one media. This also applies to remove(), where plugin inform back the media removed.
Created attachment 318867 [details] [review] core: check if resolved/removed media is correct When resolving a media (or removing), the plugin must send back the passed media with the new requested information. Verify that indeed the source is doing this.
Review of attachment 318867 [details] [review]: ::: src/grl-source.c @@ +1984,3 @@ + GRL_WARNING ("Source %s is resolving a different media!", grl_source_get_id (source)); + } + So, this one instead of my patch or should both of them be combined? resolve_sync returns (GrlMedia *) so I guess it should be possible or we should change it to not be possible at all. in the case of async resolve version, I guess this could be a GRL_ERROR and we could patch the documentation to express plugin-dev to use the same GrlMedia @@ +2399,3 @@ + /* Verify we removed the right media */ + if (media && media != rrc->media) { + GRL_WARNING ("Source %s removed a different media!", grl_source_get_id (source)); Shouldn't be an GRL_ERROR here?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/grilo/issues/76.