2006-05-20 22:35:40 +00:00
|
|
|
//
|
|
|
|
// Version.cs: Lightweight Version Object for GStreamer
|
|
|
|
//
|
|
|
|
// Authors:
|
|
|
|
// Aaron Bockover (abockover@novell.com)
|
|
|
|
//
|
|
|
|
// (C) 2006 Novell, Inc.
|
|
|
|
//
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
namespace Gst
|
|
|
|
{
|
2009-04-07 08:31:03 +00:00
|
|
|
public static class Version
|
2006-05-20 22:35:40 +00:00
|
|
|
{
|
2009-04-07 08:31:03 +00:00
|
|
|
private static uint major;
|
|
|
|
private static uint minor;
|
|
|
|
private static uint micro;
|
|
|
|
private static uint nano;
|
|
|
|
private static string version_string;
|
2006-05-20 22:35:40 +00:00
|
|
|
|
2009-04-07 08:31:03 +00:00
|
|
|
static Version()
|
2006-05-20 22:35:40 +00:00
|
|
|
{
|
|
|
|
gst_version(out major, out minor, out micro, out nano);
|
|
|
|
}
|
|
|
|
|
2009-04-07 08:31:03 +00:00
|
|
|
public static string Description {
|
2006-05-20 22:35:40 +00:00
|
|
|
get {
|
2009-04-07 08:31:03 +00:00
|
|
|
if (version_string == null) {
|
2006-05-20 22:35:40 +00:00
|
|
|
IntPtr version_string_ptr = gst_version_string();
|
|
|
|
version_string = GLib.Marshaller.Utf8PtrToString(version_string_ptr);
|
|
|
|
}
|
|
|
|
|
|
|
|
return version_string;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-04-07 08:31:03 +00:00
|
|
|
public static uint Major {
|
2006-05-20 22:35:40 +00:00
|
|
|
get { return major; }
|
|
|
|
}
|
|
|
|
|
2009-04-07 08:31:03 +00:00
|
|
|
public static uint Minor {
|
2006-05-20 22:35:40 +00:00
|
|
|
get { return minor; }
|
|
|
|
}
|
|
|
|
|
2009-04-07 08:31:03 +00:00
|
|
|
public static uint Micro {
|
2006-05-20 22:35:40 +00:00
|
|
|
get { return micro; }
|
|
|
|
}
|
|
|
|
|
2009-04-07 08:31:03 +00:00
|
|
|
public static uint Nano {
|
2006-05-20 22:35:40 +00:00
|
|
|
get { return nano; }
|
|
|
|
}
|
|
|
|
|
|
|
|
[DllImport("gstreamer-0.10")]
|
|
|
|
private static extern void gst_version(out uint major, out uint minor, out uint micro, out uint nano);
|
|
|
|
|
|
|
|
[DllImport("gstreamer-0.10")]
|
|
|
|
private static extern IntPtr gst_version_string();
|
|
|
|
}
|
2009-04-07 08:31:03 +00:00
|
|
|
}
|