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 673491 - Remove "default" get_caps implemetations
Remove "default" get_caps implemetations
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
git master
Other Linux
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2012-04-04 10:49 UTC by Bastien Nocera
Modified: 2012-11-01 23:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
all: Remove ->get_caps stubs (20.10 KB, patch)
2012-04-13 17:59 UTC, Bastien Nocera
none Details | Review
all: Remove ->get_caps stubs (16.12 KB, patch)
2012-11-01 23:16 UTC, Juan A. Suarez Romero
committed Details | Review

Description Bastien Nocera 2012-04-04 10:49:10 UTC
All the plugins have the same get_caps implementation:

static GrlCaps *
grl_<plugin_name>_source_get_caps (GrlMetadataSource *source,
                                    GrlSupportedOps operation)
{
  static GrlCaps *caps = NULL;

  if (caps == NULL)
    caps = grl_caps_new (); 

  return caps;
}

Remove all those, and use the default implementation from the class. That'll also stop us leaking the caps object for each plugin.
Comment 1 Bastien Nocera 2012-04-13 17:55:02 UTC
There's already a default implementation:
http://git.gnome.org/browse/grilo/tree/src/grl-metadata-source.c#n1616
Comment 2 Bastien Nocera 2012-04-13 17:59:33 UTC
Created attachment 212016 [details] [review]
all: Remove ->get_caps stubs

The default implementation does the exact same thing, and this
saves us some code.
Comment 3 Juan A. Suarez Romero 2012-11-01 23:16:31 UTC
Created attachment 227845 [details] [review]
all: Remove ->get_caps stubs

The default implementation does the exact same thing, and this
saves us some code.

https://bugzilla.gnome.org/show_bug.cgi?id=673491

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Comment 4 Juan A. Suarez Romero 2012-11-01 23:17:54 UTC
commit 33f410586efff2c8a089068c981c7db54dff438b
Author: Bastien Nocera <hadess@hadess.net>
Date:   Thu Nov 1 23:15:05 2012 +0000

    all: Remove ->get_caps stubs
    
    The default implementation does the exact same thing, and this
    saves us some code.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673491
    
    Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

 src/apple-trailers/grl-apple-trailers.c |   16 ----------------
 src/bliptv/grl-bliptv.c                 |   16 ----------------
 src/bookmarks/grl-bookmarks.c           |   16 ----------------
 src/flickr/grl-flickr.c                 |   16 ----------------
 src/jamendo/grl-jamendo.c               |   16 ----------------
 src/optical-media/grl-optical-media.c   |   19 -------------------
 src/podcasts/grl-podcasts.c             |   16 ----------------
 src/shoutcast/grl-shoutcast.c           |   16 ----------------
 src/upnp/grl-upnp.c                     |   16 ----------------
 src/vimeo/grl-vimeo.c                   |   16 ----------------
 src/youtube/grl-youtube.c               |   16 ----------------
 11 files changed, 179 deletions(-)


Attachment 227845 [details] pushed as 33f4105 - all: Remove ->get_caps stubs