gstreamer/gstreamer-sharp/Version.cs
Sebastian Dröge aa7bb8fa1c Use internal glib-sharp copy everywhere and make it work side-by-side with real glib-sharp
glib-sharp will only get a new release with the new API that we need for
3.0 in a year or something. Instead of waiting a year before we can release
something we now have our own internal copy of glib-sharp trunk that will
be dropped once glib-sharp 3.0 is released.

Everything is now compilable and working without any additional patches.
2009-08-05 16:57:20 +02:00

66 lines
1.3 KiB
C#

//
// Version.cs: Lightweight Version Object for GStreamer
//
// Authors:
// Aaron Bockover (abockover@novell.com)
//
// Copyright (C) 2006 Novell, Inc.
//
using System;
using System.Runtime.InteropServices;
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 = Gst.GLib.Marshaller.Utf8PtrToString (version_string_ptr);
}
return version_string;
}
}
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;
}
}
[DllImport("libgstreamer-0.10.dll") ]
private static extern void gst_version (out uint major, out uint minor, out uint micro, out uint nano);
[DllImport("libgstreamer-0.10.dll") ]
private static extern IntPtr gst_version_string();
}
}