diff --git a/doc/en/Gst/Bus.xml b/doc/en/Gst/Bus.xml index 8eef0b877c..dce2cd8271 100644 --- a/doc/en/Gst/Bus.xml +++ b/doc/en/Gst/Bus.xml @@ -139,12 +139,7 @@ System.Void To be added.To be added. - 0.9.5.99 - - Property - Gst.BusSyncHandler - To be added.To be added.To be added. - 0.9.5.99 + 0.9.5.99Property0.9.5.99Gst.BusSyncHandlerTo be added.To be added.To be added. Event GLib.Signal("sync-message") diff --git a/doc/en/Gst/Clock.xml b/doc/en/Gst/Clock.xml index b8dc82e72f..fe57966005 100644 --- a/doc/en/Gst/Clock.xml +++ b/doc/en/Gst/Clock.xml @@ -33,21 +33,11 @@ - + Constructor0.9.5.99To be added.To be added. Constructor To be added.To be added.To be added. - 0.9.5.99 - - Constructor - - To be added.To be added.To be added.To be added. - 0.9.5.99 - - Constructor - - To be added.To be added.To be added.To be added.To be added. 0.9.5.99 Method @@ -60,7 +50,7 @@ System.UInt64 To be added.To be added.To be added.To be added. - 0.9.5.99 + 0.9.5.99Method0.9.5.99System.VoidTo be added.To be added.Property0.9.5.99Gst.ClockEntryTo be added.To be added.To be added.Property0.9.5.99Gst.ClockEntry[]To be added.To be added.To be added.Property0.9.5.99System.UInt64To be added.To be added.To be added.Property0.9.5.99System.BooleanTo be added.To be added.To be added. Method System.Void @@ -71,82 +61,24 @@ Property GLib.GType To be added.To be added.To be added. - 0.9.5.99 - - Method - System.Int32 - - To be added.To be added.To be added.To be added.To be added. - 0.9.5.99 - - Method - System.UInt64 - - To be added.To be added.To be added.To be added. - 0.9.5.99 - - Method - System.IntPtr - - To be added.To be added.To be added.To be added. - 0.9.5.99 - - Method - System.Void - - To be added.To be added.To be added. - 0.9.5.99 - - Method - System.Void - - To be added.To be added.To be added. - 0.9.5.99 - - Method - Gst.ClockReturn - - To be added.To be added.To be added.To be added.To be added. - 0.9.5.99 - - Method - Gst.ClockReturn - - To be added.To be added.To be added.To be added.To be added. - 0.9.5.99 + 0.9.5.99Property0.9.5.99System.UInt64To be added.To be added.To be added. Property System.UInt64 To be added.To be added.To be added. - 0.9.5.99 - - Property - Gst.Clock - To be added.To be added.To be added. - 0.9.5.99Field0.9.5.99System.UInt641000000000To be added.To be added.Field0.9.5.99System.UInt641000000000To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideChangeResolution")System.UInt64To be added.To be added.To be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideGetInternalTime")System.UInt64To be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideGetResolution")System.UInt64To be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideUnschedule")System.VoidTo be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWait")Gst.ClockReturnTo be added.To be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWaitAsync")Gst.ClockReturnTo be added.To be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWaitJitter")Gst.ClockReturnTo be added.To be added.To be added.To be added.To be added. - - Property - System.UInt64 - To be added.To be added.To be added. - 0.9.5.99Field0.9.5.99System.UInt641000000000To be added.To be added. + 0.9.5.99Property0.9.5.99System.UInt64To be added.To be added.To be added.Property0.9.5.99Gst.ClockTo be added.To be added.To be added.Field0.9.5.99System.UInt641000000To be added.To be added.Method0.9.5.99Gst.ClockEntryTo be added.To be added.To be added.To be added.To be added.Method0.9.5.99Gst.ClockEntryTo be added.To be added.To be added.To be added.Field0.9.5.99System.UInt641To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideChangeResolution")System.UInt64To be added.To be added.To be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideGetInternalTime")System.UInt64To be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideGetResolution")System.UInt64To be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideUnschedule")System.VoidTo be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWaitAsync")Gst.ClockReturnTo be added.To be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWaitJitter")Gst.ClockReturnTo be added.To be added.To be added.To be added.To be added.Property0.9.5.99System.UInt64To be added.To be added.To be added.Property0.9.5.99System.UInt64To be added.To be added.To be added.Property0.9.5.99System.UInt64To be added.To be added.To be added.Field0.9.5.99System.UInt641000000000To be added.To be added. Method System.Void To be added.To be added.To be added.To be added.To be added.To be added. - 0.9.5.99 - - Method - System.Boolean - - To be added.To be added.To be added.To be added. 0.9.5.99 Method System.UInt64 To be added.To be added.To be added.To be added. - 0.9.5.99 + 0.9.5.99Method0.9.5.99System.VoidTo be added.To be added.Method0.9.5.99System.VoidTo be added.To be added. Property GLib.Property("stats") @@ -157,13 +89,13 @@ Property System.UInt64 To be added.To be added.To be added. - 0.9.5.99Method0.9.5.99System.BooleanTo be added.To be added.To be added.To be added.Field0.9.5.99System.UInt6418446744073709551615To be added.To be added. + 0.9.5.99Property0.9.5.99System.Int32To be added.To be added.To be added.Method0.9.5.99System.BooleanTo be added.To be added.To be added.To be added.Field0.9.5.99System.UInt6418446744073709551615To be added.To be added. Property GLib.Property("timeout") System.UInt64 To be added.To be added.To be added. - 0.9.5.99Method0.9.5.99System.UInt64To be added.To be added.To be added.To be added.Field0.9.5.99System.UInt641000000000To be added.To be added. + 0.9.5.99Property0.9.5.99System.UInt64[]To be added.To be added.To be added.Method0.9.5.99System.BooleanTo be added.To be added.To be added.Method0.9.5.99System.UInt64To be added.To be added.To be added.To be added.Field0.9.5.99System.UInt641000To be added.To be added.Method0.9.5.99System.VoidTo be added.To be added.Method0.9.5.99System.BooleanTo be added.To be added.To be added.To be added.Method0.9.5.99System.BooleanTo be added.To be added.To be added.To be added. Property GLib.Property("window-size") diff --git a/doc/en/Gst/ClockCallback.xml b/doc/en/Gst/ClockCallback.xml index f45c270e5c..be2b12995d 100644 --- a/doc/en/Gst/ClockCallback.xml +++ b/doc/en/Gst/ClockCallback.xml @@ -1,5 +1,5 @@ - + gstreamer-sharp 0.9.5.99 @@ -10,7 +10,7 @@ - + System.Boolean diff --git a/doc/en/Gst/ClockEntry.xml b/doc/en/Gst/ClockEntry.xml index 7ef04ca1da..0a89685da6 100644 --- a/doc/en/Gst/ClockEntry.xml +++ b/doc/en/Gst/ClockEntry.xml @@ -1,11 +1,11 @@ - + gstreamer-sharp 0.9.5.99 - System.ValueType + GLib.Opaque @@ -18,55 +18,19 @@ - + + + + + Constructor0.9.5.99To be added.To be added.To be added. Property Gst.Clock To be added.To be added.To be added. 0.9.5.99 - + Property Gst.ClockCallback To be added.To be added.To be added. - 0.9.5.99 - - Field - System.UInt64 - To be added.To be added. - 0.9.5.99 - - Method - Gst.ClockEntry - - To be added.To be added.To be added.To be added. - 0.9.5.99 - - Field - System.Int32 - To be added.To be added. - 0.9.5.99 - - Field - Gst.ClockReturn - To be added.To be added. - 0.9.5.99 - - Field - System.UInt64 - To be added.To be added. - 0.9.5.99 - - Field - Gst.ClockEntryType - To be added.To be added. - 0.9.5.99 - - Field - Gst.ClockEntry - To be added.To be added. - 0.9.5.99 - - - - + 0.9.5.99Property0.9.5.99System.UInt64To be added.To be added.To be added.Property0.9.5.99Gst.ClockReturnTo be added.To be added.To be added.Property0.9.5.99System.UInt64To be added.To be added.To be added.Property0.9.5.99Gst.ClockEntryTypeTo be added.To be added.To be added.Method0.9.5.99System.VoidTo be added.To be added.Method0.9.5.99Gst.ClockReturnTo be added.To be added.To be added.To be added.Method0.9.5.99Gst.ClockReturnTo be added.To be added.To be added.To be added. diff --git a/doc/en/Gst/ElementFactory.xml b/doc/en/Gst/ElementFactory.xml index 129634720e..6562fa47cc 100644 --- a/doc/en/Gst/ElementFactory.xml +++ b/doc/en/Gst/ElementFactory.xml @@ -22,7 +22,16 @@ - + + + + + + + + + + Constructor @@ -102,24 +111,5 @@ Property Gst.StaticPadTemplate[] To be added.To be added.To be added. - 0.9.5.99 - - Property - System.String[] - To be added.To be added.To be added. - 0.9.5.99 - - Property - System.Int32 - To be added.To be added.To be added. - 0.9.5.99 - - - - - - - - - + 0.9.5.99Property0.9.5.99System.String[]To be added.To be added.To be added.Property0.9.5.99System.Int32To be added.To be added.To be added. diff --git a/doc/en/Gst/Index.xml b/doc/en/Gst/Index.xml index 90ea48bd66..5cbc5ff729 100644 --- a/doc/en/Gst/Index.xml +++ b/doc/en/Gst/Index.xml @@ -76,12 +76,7 @@ GLib.Signal("entry-added") Gst.EntryAddedHandler To be added.To be added. - 0.9.5.99 - - Property - Gst.IndexFilter - To be added.To be added.To be added. - 0.9.5.99 + 0.9.5.99Property0.9.5.99Gst.IndexFilterTo be added.To be added.To be added. Property Gst.IndexFilter diff --git a/doc/en/Gst/Plugin.xml b/doc/en/Gst/Plugin.xml index de1ac6b595..66db07f985 100644 --- a/doc/en/Gst/Plugin.xml +++ b/doc/en/Gst/Plugin.xml @@ -48,12 +48,7 @@ System.Int32 To be added.To be added.To be added. - 0.9.5.99 - - Property - System.String - To be added.To be added.To be added. - 0.9.5.99 + 0.9.5.99Property0.9.5.99System.StringTo be added.To be added.To be added. Property GLib.GType diff --git a/doc/en/Gst/PluginFeature.xml b/doc/en/Gst/PluginFeature.xml index 47e0cded6c..c42e491e49 100644 --- a/doc/en/Gst/PluginFeature.xml +++ b/doc/en/Gst/PluginFeature.xml @@ -38,12 +38,7 @@ Property GLib.GType To be added.To be added.To be added. - 0.9.5.99Method0.9.5.99Gst.PluginFeatureTo be added.To be added.To be added. - - Property - System.UInt32 - To be added.To be added.To be added. - 0.9.5.99 + 0.9.5.99Method0.9.5.99Gst.PluginFeatureTo be added.To be added.To be added.Property0.9.5.99System.UInt32To be added.To be added.To be added. Method System.Boolean diff --git a/doc/en/Gst/Segment.xml b/doc/en/Gst/Segment.xml index bdc0efd38d..2e67d801a1 100644 --- a/doc/en/Gst/Segment.xml +++ b/doc/en/Gst/Segment.xml @@ -100,7 +100,7 @@ System.Void To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added. - 0.9.5.99Method0.9.5.99System.VoidTo be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added. + 0.9.5.99Method0.9.5.99System.VoidTo be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added. Method System.Boolean diff --git a/doc/en/Gst/TypeFindFactory.xml b/doc/en/Gst/TypeFindFactory.xml index 5d9137a63d..67c732f2a0 100644 --- a/doc/en/Gst/TypeFindFactory.xml +++ b/doc/en/Gst/TypeFindFactory.xml @@ -36,17 +36,7 @@ System.Void To be added.To be added.To be added. - 0.9.5.99 - - Property - Gst.Caps - To be added.To be added.To be added. - 0.9.5.99 - - Property - System.String - To be added.To be added.To be added. - 0.9.5.99 + 0.9.5.99Property0.9.5.99Gst.CapsTo be added.To be added.To be added.Property0.9.5.99System.StringTo be added.To be added.To be added. Property GLib.GType diff --git a/doc/en/index.xml b/doc/en/index.xml index d47dce52e0..179d1bbacf 100644 --- a/doc/en/index.xml +++ b/doc/en/index.xml @@ -32,7 +32,7 @@ - + diff --git a/gstreamer-sharp/Clock.custom b/gstreamer-sharp/Clock.custom index 7507970130..493946ec91 100644 --- a/gstreamer-sharp/Clock.custom +++ b/gstreamer-sharp/Clock.custom @@ -1,33 +1,152 @@ - -[DllImport ("gstreamersharpglue-0.10") ] -private extern static ulong gstsharp_gst_clock_get_gst_second(); - -public static readonly ulong Second = gstsharp_gst_clock_get_gst_second(); - -[DllImport ("gstreamersharpglue-0.10") ] -private extern static ulong gstsharp_gst_clock_get_gst_msecond(); - -public static readonly ulong MSecond = gstsharp_gst_clock_get_gst_second(); - -[DllImport ("gstreamersharpglue-0.10") ] -private extern static ulong gstsharp_gst_clock_get_gst_usecond(); - -public static readonly ulong USecond = gstsharp_gst_clock_get_gst_second(); - -[DllImport ("gstreamersharpglue-0.10") ] -private extern static ulong gstsharp_gst_clock_get_gst_nsecond(); - -public static readonly ulong NSecond = gstsharp_gst_clock_get_gst_second(); - -[DllImport ("gstreamersharpglue-0.10") ] -private extern static ulong gstsharp_gst_clock_get_time_none(); - -public static readonly ulong TimeNone = gstsharp_gst_clock_get_time_none(); - -[DllImport ("gstreamersharpglue-0.10") ] -private extern static bool gstsharp_gst_clock_time_is_valid (ulong time); +public static readonly ulong Second = 1000000000; +public static readonly ulong MSecond = 1000000; +public static readonly ulong USecond = 1000; +public static readonly ulong NSecond = 1; +public static readonly ulong TimeNone = 0xffffffffffffffff; public static bool TimeIsValid (ulong time) { - return gstsharp_gst_clock_time_is_valid (time); + return (time != TimeNone); } +[DllImport ("gstreamersharpglue-0.10") ] +extern static uint gstsharp_gst_clock_get_entries_changed_offset (); + +static uint entries_changed_offset = gstsharp_gst_clock_get_entries_changed_offset (); +private IntPtr EntriesChangedPtr { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + entries_changed_offset); + return (*raw_ptr); + } + } +} + +[DllImport ("libglib-2.0-0.dll") ] +static extern void g_cond_wait (IntPtr cond, IntPtr mutex); +[DllImport ("libglib-2.0-0.dll") ] +static extern bool g_cond_timed_wait (IntPtr cond, IntPtr mutex, ref _TimeVal abs_time); +[DllImport ("libglib-2.0-0.dll") ] +static extern void g_cond_broadcast (IntPtr cond); + +public void Wait () { + g_cond_wait (EntriesChangedPtr, LockPtr); +} + +[StructLayout (LayoutKind.Sequential) ] +private struct _TimeVal { + public IntPtr sec; + public IntPtr usec; +} + +public bool Wait (uint mseconds) { + _TimeVal tv = new _TimeVal (); + long sec = mseconds / 1000; + long usec = 1000 * (mseconds - sec * 1000); + tv.sec = (IntPtr) (sec); + tv.usec = (IntPtr) (usec); + return g_cond_timed_wait (EntriesChangedPtr, LockPtr, ref tv); +} + +public bool Wait (TimeSpan timespan) { + _TimeVal tv = new _TimeVal (); + long sec = (long) timespan.TotalSeconds; + long usec = 1000 * ( ( (long) timespan.TotalMilliseconds) - sec * 1000); + tv.sec = (IntPtr) (sec); + tv.usec = (IntPtr) (usec); + return g_cond_timed_wait (EntriesChangedPtr, LockPtr, ref tv); +} + +public void Broadcast () { + g_cond_broadcast (EntriesChangedPtr); +} + +[DllImport ("gstreamersharpglue-0.10") ] +extern static uint gstsharp_gst_clock_get_slave_lock_offset (); + +static uint slave_lock_offset = gstsharp_gst_clock_get_slave_lock_offset (); +private IntPtr SlaveLockPtr { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + slave_lock_offset); + return (*raw_ptr); + } + } +} + +[DllImport ("libglib-2.0-0.dll") ] +static extern void g_mutex_lock (IntPtr mutex); +[DllImport ("libglib-2.0-0.dll") ] +static extern void g_mutex_unlock (IntPtr mutex); +[DllImport ("libglib-2.0-0.dll") ] +static extern bool g_mutex_trylock (IntPtr mutex); + +public void SlaveLock () { + g_mutex_lock (SlaveLockPtr); +} + +public void SlaveUnlock () { + g_mutex_unlock (SlaveLockPtr); +} + +public bool TrySlaveLock () { + return g_mutex_trylock (SlaveLockPtr); +} + +[DllImport ("gstreamer-0.10.dll") ] +static extern IntPtr gst_clock_get_master (IntPtr raw); +[DllImport ("gstreamer-0.10.dll") ] +static extern bool gst_clock_set_master (IntPtr raw, IntPtr master); +public Gst.Clock Master { + get { + IntPtr raw_ret = gst_clock_get_master (Handle); + Gst.Clock ret = GLib.Object.GetObject (raw_ret, true) as Gst.Clock; + return ret; + } + set { + if (!gst_clock_set_master (Handle, value == null ? IntPtr.Zero : value.Handle)) + throw new Exception (); + } +} + +[DllImport ("gstreamersharpglue-0.10") ] +extern static uint gstsharp_gst_clock_get_entries_offset (); + +static uint entries_offset = gstsharp_gst_clock_get_entries_offset (); +private IntPtr EntriesPtr { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + entries_offset); + return (*raw_ptr); + } + } +} + +protected Gst.ClockEntry[] Entries { + get { + return (Gst.ClockEntry[]) GLib.Marshaller.ListPtrToArray (EntriesPtr, typeof(GLib.List), false, false, typeof(Gst.ClockEntry)); + } +} + +[DllImport ("gstreamersharpglue-0.10") ] +extern static uint gstsharp_gst_clock_get_times_offset (); + +static uint times_offset = gstsharp_gst_clock_get_times_offset (); +private IntPtr TimesPtr { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + times_offset); + return (*raw_ptr); + } + } +} + +protected ulong[] Times { + get { + ulong[] ret = new ulong[4 * WindowSize]; + for (int i = 0; i < 4 * WindowSize; i++) + ret[i] = (ulong) Marshal.ReadInt64 (TimesPtr, 8 * i); + return ret; + } +} + + diff --git a/gstreamer-sharp/ClockEntry.custom b/gstreamer-sharp/ClockEntry.custom new file mode 100644 index 0000000000..e412d13798 --- /dev/null +++ b/gstreamer-sharp/ClockEntry.custom @@ -0,0 +1,18 @@ +[DllImport ("gstreamersharpglue-0.10") ] +static extern GstSharp.ClockCallbackNative gstsharp_gst_clock_entry_get_func (IntPtr raw); +[DllImport ("gstreamersharpglue-0.10") ] +static extern void gstsharp_gst_clock_entry_set_func (IntPtr raw, GstSharp.ClockCallbackNative func); + +private GstSharp.ClockCallbackWrapper wrapper; + +public Gst.ClockCallback Func { + set { + wrapper = new GstSharp.ClockCallbackWrapper (value); + gstsharp_gst_clock_entry_set_func (Handle, wrapper.NativeDelegate); + } + + get { + return GstSharp.ClockCallbackWrapper.GetManagedDelegate (gstsharp_gst_clock_entry_get_func (Handle)); + } +} + diff --git a/gstreamer-sharp/Gstreamer.metadata b/gstreamer-sharp/Gstreamer.metadata index 53e0785451..2be8c03400 100644 --- a/gstreamer-sharp/Gstreamer.metadata +++ b/gstreamer-sharp/Gstreamer.metadata @@ -75,6 +75,8 @@ MiniObjectFlags.Last << 8 true + + true Last MiniObjectFlags.Last << 0 @@ -121,6 +123,108 @@ EmitChildAdded EmitChildRemoved + protected + true + true + protected + true + true + protected + true + true + protected + true + true + protected + true + true + 1 + 1 + protected + true + true + protected + true + true + protected + true + true + protected + true + true + ClockID + protected + true + true + 1 + + 1 + 1 + 1 + 1 + GstClockEntry* + 1 + 1 + /api/namespace/struct[@name='ClockEntry'] + /api/namespace/struct[@name='ClockEntry'] + /api/namespace/struct[@name='ClockEntry'] + /api/namespace/struct[@name='ClockEntry'] + /api/namespace/struct[@name='ClockEntry'] + + + + + + + + + + + + + + + + + + + + + true + private + public + true + public + true + public + true + public + true + public + true + 1 + GstClockEntry* + GstClockEntry* + Ref + + + Unref + + + Unschedule + + + Wait + + + WaitAsync + + + + GstClockEntry* + + GstClockEntry* + MiniObjectFlags.Last << 0 MiniObjectFlags.Last << 1 MiniObjectFlags.Last << 2 @@ -147,6 +251,10 @@ GstStaticPadTemplate false false + + 1 + + 1 @@ -250,6 +358,8 @@ 1 1 + + 1 1 @@ -385,10 +495,14 @@ BinFlags.Last << 4 1 + + 1 SetFeatureName GetFeatureName 1 + + 1 @@ -573,6 +687,11 @@ 1 + + 1 + + 1 + 1 diff --git a/gstreamer-sharp/Makefile.am b/gstreamer-sharp/Makefile.am index 4c3a127096..5f5f96734d 100644 --- a/gstreamer-sharp/Makefile.am +++ b/gstreamer-sharp/Makefile.am @@ -56,6 +56,7 @@ customs = \ Bus.custom \ Caps.custom \ Clock.custom \ + ClockEntry.custom \ Debug.custom \ Element.custom \ Message.custom \ diff --git a/gstreamer-sharp/Object.custom b/gstreamer-sharp/Object.custom index b00e0d1393..b1e76e29b7 100644 --- a/gstreamer-sharp/Object.custom +++ b/gstreamer-sharp/Object.custom @@ -39,7 +39,7 @@ public Gst.Object Parent { extern static uint gstsharp_gst_object_get_lock_offset (); static uint lock_offset = gstsharp_gst_object_get_lock_offset (); -private IntPtr LockPtr { +internal IntPtr LockPtr { get { unsafe { IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + lock_offset); diff --git a/gstreamer-sharp/glue/Makefile.am b/gstreamer-sharp/glue/Makefile.am index 0e706d921d..06676d1537 100644 --- a/gstreamer-sharp/glue/Makefile.am +++ b/gstreamer-sharp/glue/Makefile.am @@ -3,7 +3,8 @@ lib_LTLIBRARIES = libgstreamersharpglue-0.10.la libgstreamersharpglue_0_10_la_SOURCES = \ buffer.c \ caps.c \ - clock.c \ + clock.c \ + clockentry.c \ message.c \ event.c \ bin.c \ diff --git a/gstreamer-sharp/glue/clock.c b/gstreamer-sharp/glue/clock.c index 414ad608af..a45970803c 100644 --- a/gstreamer-sharp/glue/clock.c +++ b/gstreamer-sharp/glue/clock.c @@ -1,38 +1,22 @@ -#include -#include +#include -guint64 -gstsharp_gst_clock_get_gst_second () -{ - return GST_SECOND; +uint +gstsharp_gst_clock_get_entries_changed_offset (void) { + return (uint) G_STRUCT_OFFSET (GstClock, entries_changed); } -guint64 -gstsharp_gst_clock_get_gst_msecond () -{ - return GST_MSECOND; +uint +gstsharp_gst_clock_get_slave_lock_offset (void) { + return (uint) G_STRUCT_OFFSET (GstClock, slave_lock); } -guint64 -gstsharp_gst_clock_get_gst_usecond () -{ - return GST_USECOND; +uint +gstsharp_gst_clock_get_entries_offset (void) { + return (uint) G_STRUCT_OFFSET (GstClock, entries); } -guint64 -gstsharp_gst_clock_get_gst_nsecond () -{ - return GST_NSECOND; +uint +gstsharp_gst_clock_get_times_offset (void) { + return (uint) G_STRUCT_OFFSET (GstClock, times); } -guint64 -gstsharp_gst_clock_get_time_none () -{ - return GST_CLOCK_TIME_NONE; -} - -gboolean -gstsharp_gst_clock_time_is_valid (GstClockTime time) -{ - return GST_CLOCK_TIME_IS_VALID (time); -} diff --git a/gstreamer-sharp/glue/clockentry.c b/gstreamer-sharp/glue/clockentry.c new file mode 100644 index 0000000000..cc6d05c7ed --- /dev/null +++ b/gstreamer-sharp/glue/clockentry.c @@ -0,0 +1,13 @@ +#include + +GstClockCallback +gstsharp_gst_clock_entry_get_func (GstClockEntry * entry) +{ + return entry->func; +} + +void +gstsharp_gst_clock_entry_set_func (GstClockEntry * entry, GstClockCallback func) +{ + entry->func = func; +}