mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 14:38:48 +00:00
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:
parent
51f65dd9e0
commit
6566359e35
4 changed files with 33 additions and 22 deletions
27
ChangeLog
27
ChangeLog
|
@ -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>
|
2006-05-31 Michael Dominic K. <michaldominik@gmail.com>
|
||||||
|
|
||||||
* tests/PadTest.cs:
|
* tests/PadTest.cs:
|
||||||
* tests/Makefile.am:
|
* tests/Makefile.am: Introducing a new test for Gst.Pad. All fixtures pass.
|
||||||
Introducing a new test for Gst.Pad. All fixtures pass.
|
|
||||||
|
|
||||||
* tests/CapsTest.cs:
|
* tests/CapsTest.cs: Adding a new fixture for caps union testing (passes).
|
||||||
Adding a new fixture for caps union testing (passes).
|
|
||||||
Fixing some code-style errors.
|
Fixing some code-style errors.
|
||||||
|
|
||||||
2006-05-30 Michael Dominic K. <michaldominik@gmail.com>
|
2006-05-30 Michael Dominic K. <michaldominik@gmail.com>
|
||||||
|
|
||||||
* README:
|
* README: Fixing a broken svn link to gtk-sharp sources.
|
||||||
Fixing a broken svn link to gtk-sharp sources.
|
|
||||||
|
|
||||||
* tests/CapsTest.cs:
|
* tests/CapsTest.cs:
|
||||||
* tests/Makefile.am:
|
* tests/Makefile.am: Introducing a new test for Gst.Caps. All fixtures pass.
|
||||||
Introducing a new test for Gst.Caps. All fixtures pass.
|
|
||||||
|
|
||||||
2006-05-25 Aaron Bockover <aaron@abock.org>
|
2006-05-25 Aaron Bockover <aaron@abock.org>
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
|
|
||||||
[DllImport("gstsharpglue-0.10")]
|
[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")]
|
[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")]
|
[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")]
|
[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();
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gst/gstclock.h>
|
#include <gst/gstclock.h>
|
||||||
|
|
||||||
gint64 gstsharp_gst_clock_get_gst_second()
|
guint64 gstsharp_gst_clock_get_gst_second()
|
||||||
{
|
{
|
||||||
return GST_SECOND;
|
return GST_SECOND;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint64 gstsharp_gst_clock_get_gst_msecond()
|
guint64 gstsharp_gst_clock_get_gst_msecond()
|
||||||
{
|
{
|
||||||
return GST_MSECOND;
|
return GST_MSECOND;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint64 gstsharp_gst_clock_get_gst_usecond()
|
guint64 gstsharp_gst_clock_get_gst_usecond()
|
||||||
{
|
{
|
||||||
return GST_USECOND;
|
return GST_USECOND;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint64 gstsharp_gst_clock_get_gst_nsecond()
|
guint64 gstsharp_gst_clock_get_gst_nsecond()
|
||||||
{
|
{
|
||||||
return GST_NSECOND;
|
return GST_NSECOND;
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,8 +184,8 @@ public class DecodeBinTranscoder : IDisposable
|
||||||
|
|
||||||
transcoder.Progress += delegate(object o, ProgressArgs args) {
|
transcoder.Progress += delegate(object o, ProgressArgs args) {
|
||||||
Console.Write("\rEncoding: {0} / {1} ({2:00.00}%) ",
|
Console.Write("\rEncoding: {0} / {1} ({2:00.00}%) ",
|
||||||
new TimeSpan((args.Position / Clock.GstSecond) * TimeSpan.TicksPerSecond),
|
new TimeSpan((args.Position / (long) Clock.GstSecond) * TimeSpan.TicksPerSecond),
|
||||||
new TimeSpan((args.Duration / Clock.GstSecond) * TimeSpan.TicksPerSecond),
|
new TimeSpan((args.Duration / (long) Clock.GstSecond) * TimeSpan.TicksPerSecond),
|
||||||
((double)args.Position / (double)args.Duration) * 100.0);
|
((double)args.Position / (double)args.Duration) * 100.0);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue