diff --git a/ChangeLog b/ChangeLog index 02b947a041..d7f0316388 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,21 +1,32 @@ +2006-06-04 Michael Dominic K. + + * 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. * 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. - * 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 diff --git a/gstreamer-sharp/Clock.custom b/gstreamer-sharp/Clock.custom index 99c0f215fd..71d568be7c 100644 --- a/gstreamer-sharp/Clock.custom +++ b/gstreamer-sharp/Clock.custom @@ -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(); diff --git a/gstreamer-sharp/glue/clock.c b/gstreamer-sharp/glue/clock.c index 4a17cf8290..83f89eef96 100644 --- a/gstreamer-sharp/glue/clock.c +++ b/gstreamer-sharp/glue/clock.c @@ -1,22 +1,22 @@ #include #include -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; } diff --git a/sample/DecodeBinTranscoder.cs b/sample/DecodeBinTranscoder.cs index 4e353f403d..b12285e4bc 100644 --- a/sample/DecodeBinTranscoder.cs +++ b/sample/DecodeBinTranscoder.cs @@ -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); };