2006-06-04 Michael Dominic K. <michaldominik@gmail.com>

* sample/DecodeBinTranscoder.cs: Fixing ambigious cast.

	* gstreamer-sharp/glue/clock.c:
	* gstreamer-sharp/Clock.custom: Changing the gint64 to guint64 and
	long to ulong respectively. The clocktime (GstClockTime) is measured
	in nanoseconds as unsigned long inside GStreamer. 
	This is introducing a small schizophrenia since some functions (such
	as queries, seeks) take signed long (-1 to mark infinity or error).
	This is the expected Gst behaviour.
	Just sticking silently to long (instead of ulong) will bork us 	sooner
	or later, especially for custom-build low level routines/elements.
	Comments welcome.



git-svn-id: svn://anonsvn.mono-project.com/source/branches/abock/gstreamer-sharp@61438 e3ebcda4-bce8-0310-ba0a-eca2169e7518
This commit is contained in:
Michael Dominic K 2006-06-04 13:11:24 +00:00
parent 51f65dd9e0
commit 6566359e35
4 changed files with 33 additions and 22 deletions

View file

@ -1,21 +1,32 @@
2006-06-04 Michael Dominic K. <michaldominik@gmail.com>
* sample/DecodeBinTranscoder.cs: Fixing ambigious cast.
* gstreamer-sharp/glue/clock.c:
* gstreamer-sharp/Clock.custom: Changing the gint64 to guint64 and
long to ulong respectively. The clocktime (GstClockTime) is measured
in nanoseconds as unsigned long inside GStreamer.
This is introducing a small schizophrenia since some functions (such
as queries, seeks) take signed long (-1 to mark infinity or error).
This is the expected Gst behaviour.
Just sticking silently to long (instead of ulong) will bork us sooner
or later, especially for custom-build low level routines/elements.
Comments welcome.
2006-05-31 Michael Dominic K. <michaldominik@gmail.com>
* tests/PadTest.cs:
* tests/Makefile.am:
Introducing a new test for Gst.Pad. All fixtures pass.
* tests/Makefile.am: Introducing a new test for Gst.Pad. All fixtures pass.
* tests/CapsTest.cs:
Adding a new fixture for caps union testing (passes).
* tests/CapsTest.cs: Adding a new fixture for caps union testing (passes).
Fixing some code-style errors.
2006-05-30 Michael Dominic K. <michaldominik@gmail.com>
* README:
Fixing a broken svn link to gtk-sharp sources.
* README: Fixing a broken svn link to gtk-sharp sources.
* tests/CapsTest.cs:
* tests/Makefile.am:
Introducing a new test for Gst.Caps. All fixtures pass.
* tests/Makefile.am: Introducing a new test for Gst.Caps. All fixtures pass.
2006-05-25 Aaron Bockover <aaron@abock.org>

View file

@ -1,20 +1,20 @@
[DllImport("gstsharpglue-0.10")]
private extern static long gstsharp_gst_clock_get_gst_second();
private extern static ulong gstsharp_gst_clock_get_gst_second();
public static readonly long GstSecond = gstsharp_gst_clock_get_gst_second();
public static readonly ulong GstSecond = gstsharp_gst_clock_get_gst_second();
[DllImport("gstsharpglue-0.10")]
private extern static long gstsharp_gst_clock_get_gst_msecond();
private extern static ulong gstsharp_gst_clock_get_gst_msecond();
public static readonly long GstMSecond = gstsharp_gst_clock_get_gst_second();
public static readonly ulong GstMSecond = gstsharp_gst_clock_get_gst_second();
[DllImport("gstsharpglue-0.10")]
private extern static long gstsharp_gst_clock_get_gst_usecond();
private extern static ulong gstsharp_gst_clock_get_gst_usecond();
public static readonly long GstUSecond = gstsharp_gst_clock_get_gst_second();
public static readonly ulong GstUSecond = gstsharp_gst_clock_get_gst_second();
[DllImport("gstsharpglue-0.10")]
private extern static long gstsharp_gst_clock_get_gst_nsecond();
private extern static ulong gstsharp_gst_clock_get_gst_nsecond();
public static readonly long GstNSecond = gstsharp_gst_clock_get_gst_second();
public static readonly ulong GstNSecond = gstsharp_gst_clock_get_gst_second();

View file

@ -1,22 +1,22 @@
#include <glib.h>
#include <gst/gstclock.h>
gint64 gstsharp_gst_clock_get_gst_second()
guint64 gstsharp_gst_clock_get_gst_second()
{
return GST_SECOND;
}
gint64 gstsharp_gst_clock_get_gst_msecond()
guint64 gstsharp_gst_clock_get_gst_msecond()
{
return GST_MSECOND;
}
gint64 gstsharp_gst_clock_get_gst_usecond()
guint64 gstsharp_gst_clock_get_gst_usecond()
{
return GST_USECOND;
}
gint64 gstsharp_gst_clock_get_gst_nsecond()
guint64 gstsharp_gst_clock_get_gst_nsecond()
{
return GST_NSECOND;
}

View file

@ -184,8 +184,8 @@ public class DecodeBinTranscoder : IDisposable
transcoder.Progress += delegate(object o, ProgressArgs args) {
Console.Write("\rEncoding: {0} / {1} ({2:00.00}%) ",
new TimeSpan((args.Position / Clock.GstSecond) * TimeSpan.TicksPerSecond),
new TimeSpan((args.Duration / Clock.GstSecond) * TimeSpan.TicksPerSecond),
new TimeSpan((args.Position / (long) Clock.GstSecond) * TimeSpan.TicksPerSecond),
new TimeSpan((args.Duration / (long) Clock.GstSecond) * TimeSpan.TicksPerSecond),
((double)args.Position / (double)args.Duration) * 100.0);
};