From fb158cb994b90ee089e12fc1292912f2d4b8429a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 29 Apr 2012 16:20:50 +0100 Subject: [PATCH] plugin: add accessor for release date time string in plugin description API: gst_plugin_get_release_date_string() --- docs/gst/gstreamer-sections.txt | 1 + gst/gstplugin.c | 23 +++++++++++++++++++++++ gst/gstplugin.h | 1 + win32/common/libgstreamer.def | 1 + 4 files changed, 26 insertions(+) diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 1904a6bb7c..152dcc9de5 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -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 diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 413ffd75c3..625022ba27 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -992,6 +992,29 @@ gst_plugin_get_origin (GstPlugin * plugin) return plugin->desc.origin; } +/** + * 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 diff --git a/gst/gstplugin.h b/gst/gstplugin.h index f1be63bd6f..f4aa55e7f8 100644 --- a/gst/gstplugin.h +++ b/gst/gstplugin.h @@ -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); diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index bfddc37267..5a6c4198d1 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -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 -- 2.34.1