plugin: add accessor for release date time string in plugin description
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 29 Apr 2012 15:20:50 +0000 (16:20 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 29 Apr 2012 15:20:50 +0000 (16:20 +0100)
API: gst_plugin_get_release_date_string()

docs/gst/gstreamer-sections.txt
gst/gstplugin.c
gst/gstplugin.h
win32/common/libgstreamer.def

index 1904a6b..152dcc9 100644 (file)
@@ -1994,6 +1994,7 @@ gst_plugin_get_package
 gst_plugin_get_origin
 gst_plugin_get_source
 gst_plugin_get_version
+gst_plugin_get_release_date_string
 gst_plugin_get_module
 gst_plugin_is_loaded
 gst_plugin_get_cache_data
index 413ffd7..625022b 100644 (file)
@@ -993,6 +993,29 @@ gst_plugin_get_origin (GstPlugin * plugin)
 }
 
 /**
+ * gst_plugin_get_release_date_string:
+ * @plugin: plugin to get the release date of
+ *
+ * Get the release date (and possibly time) in form of a string, if available.
+ *
+ * For normal GStreamer plugin releases this will usually just be a date in
+ * the form of "YYYY-MM-DD", while pre-releases and builds from git may contain
+ * a time component after the date as well, in which case the string will be
+ * formatted like "YYYY-MM-DDTHH:MMZ" (e.g. "2012-04-30T09:30Z").
+ *
+ * There may be plugins that do not have a valid release date set on them.
+ *
+ * Returns: the date string of the plugin, or %NULL if not available.
+ */
+const gchar *
+gst_plugin_get_release_date_string (GstPlugin * plugin)
+{
+  g_return_val_if_fail (plugin != NULL, NULL);
+
+  return plugin->desc.release_datetime;
+}
+
+/**
  * gst_plugin_get_module:
  * @plugin: plugin to query
  *
index f1be63b..f4aa55e 100644 (file)
@@ -329,6 +329,7 @@ const gchar*                gst_plugin_get_license          (GstPlugin *plugin);
 const gchar*           gst_plugin_get_source           (GstPlugin *plugin);
 const gchar*           gst_plugin_get_package          (GstPlugin *plugin);
 const gchar*           gst_plugin_get_origin           (GstPlugin *plugin);
+const gchar*           gst_plugin_get_release_date_string (GstPlugin *plugin);
 const GstStructure*    gst_plugin_get_cache_data       (GstPlugin * plugin);
 void                   gst_plugin_set_cache_data       (GstPlugin * plugin, GstStructure *cache_data);
 
index bfddc37..5a6c419 100644 (file)
@@ -765,6 +765,7 @@ EXPORTS
        gst_plugin_get_name
        gst_plugin_get_origin
        gst_plugin_get_package
+       gst_plugin_get_release_date_string
        gst_plugin_get_source
        gst_plugin_get_type
        gst_plugin_get_version