gstreamer/gstreamer-sharp/Version.cs
Aaron Bockover 88b3b2c712 2006-05-20 Aaron Bockover <aaron@abock.org>
* autogen.sh: Fixed a left over configure.in to configure.ac

    * confiugre.ac: Added check foo for NUnit

    * gstreamer-sharp.mdp:
    * gstreamer-sharp.mds: Added MonoDevelop solution

    * source/Makefile.am: Cleaned and fixed

    * tests/ConsoleUi.cs:
    * tests/ApplicationTest.cs:
    * tests/BinTest.cs:
    * tests/Makefile.am: Added NUnit test framework and a few tests for
    Gst.Application and Gst.Bin

    * gstreamer-sharp/CommonTags.cs:
    * gstreamer-sharp/*.custom:
    * gstreamer-sharp/glue/*.c: Cleaned up

    * gstreamer-sharp/Application.cs: New application bindings; fixed
    to work properly with GStreamer 0.10

    * gstreamer-sharp/Version.cs: New Gst.Version class

    * gstreamer-sharp/Makefile.am: Added Version.cs

    * gstreamer-sharp/plugins-base/PlayBin.cs: Fixed and extended PlayBin
    element binding with new (but not all) properties

    * Makefile.am: Added tests



git-svn-id: svn://anonsvn.mono-project.com/source/branches/abock/gstreamer-sharp@60902 e3ebcda4-bce8-0310-ba0a-eca2169e7518
2006-05-20 22:35:40 +00:00

66 lines
No EOL
1.6 KiB
C#

//
// 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
{
public class Version
{
private uint major;
private uint minor;
private uint micro;
private uint nano;
private string version_string;
internal Version()
{
gst_version(out major, out minor, out micro, out nano);
}
public override string ToString()
{
return String.Format("{0}.{1}.{2}.{3}", major, minor, micro, nano);
}
public string Description {
get {
if(version_string == null) {
IntPtr version_string_ptr = gst_version_string();
version_string = GLib.Marshaller.Utf8PtrToString(version_string_ptr);
}
return version_string;
}
}
public uint Major {
get { return major; }
}
public uint Minor {
get { return minor; }
}
public uint Micro {
get { return micro; }
}
public uint Nano {
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();
}
}