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