X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstversion.h.in;h=a74c2d172359ae07588b0498d0e9912933afb803;hb=b89b1802df44829a0c034db5807bc893ad3c7774;hp=0cfd4dbe25c0c7f1683bc4b5ae62fa7101f46511;hpb=d574ab8126f0ede0e32d9e4028e30d32888d2f22;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstversion.h.in b/gst/gstversion.h.in index 0cfd4db..a74c2d1 100644 --- a/gst/gstversion.h.in +++ b/gst/gstversion.h.in @@ -16,18 +16,76 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. */ - #ifndef __GST_VERSION_H__ #define __GST_VERSION_H__ -#define GST_VERSION_MAJOR @GST_VERSION_MAJOR@ -#define GST_VERSION_MINOR @GST_VERSION_MINOR@ -#define GST_VERSION_MICRO @GST_VERSION_MICRO@ +#include + +/** + * SECTION:gstversion + * @short_description: GStreamer version macros. + * + * Use the GST_VERSION_* macros e.g. when defining own plugins. The GStreamer + * runtime checks if these plugin and core version match and refuses to use a + * plugin compiled against a different version of GStreamer. + * You can also use the macros to keep the GStreamer version information in + * your application. + * + * Use the gst_version() function if you want to know which version of + * GStreamer you are currently linked against. + * + * The version macros get defined by including "gst/gst.h". + */ + +G_BEGIN_DECLS + +/** + * GST_VERSION_MAJOR: + * + * The major version of GStreamer at compile time: + */ +#define GST_VERSION_MAJOR (@GST_VERSION_MAJOR@) +/** + * GST_VERSION_MINOR: + * + * The minor version of GStreamer at compile time: + */ +#define GST_VERSION_MINOR (@GST_VERSION_MINOR@) +/** + * GST_VERSION_MICRO: + * + * The micro version of GStreamer at compile time: + */ +#define GST_VERSION_MICRO (@GST_VERSION_MICRO@) +/** + * GST_VERSION_NANO: + * + * The nano version of GStreamer at compile time: + * Actual releases have 0, GIT versions have 1, prerelease versions have 2-... + */ +#define GST_VERSION_NANO (@GST_VERSION_NANO@) + +/** + * GST_CHECK_VERSION: + * @major: a number indicating the major version + * @minor: a number indicating the minor version + * @micro: a number indicating the micro version + * + * Check whether a GStreamer version equal to or greater than + * major.minor.micro is present. + */ +#define GST_CHECK_VERSION(major,minor,micro) \ + (GST_VERSION_MAJOR > (major) || \ + (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR > (minor)) || \ + (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR == (minor) && \ + GST_VERSION_MICRO >= (micro)) || \ + (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR == (minor) && \ + GST_VERSION_MICRO + 1 == (micro) && GST_VERSION_NANO > 0)) -void gst_version (guint *major, guint *minor, guint *micro); +G_END_DECLS -#endif /* __GST_H__ */ +#endif /* __GST_VERSION_H__ */