summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gstreamer-sharp/Clock.custom38
-rwxr-xr-xgstreamer-sharp/glue/clock.c37
2 files changed, 56 insertions, 19 deletions
diff --git a/gstreamer-sharp/Clock.custom b/gstreamer-sharp/Clock.custom
index f9f873d..a8501e5 100644
--- a/gstreamer-sharp/Clock.custom
+++ b/gstreamer-sharp/Clock.custom
@@ -21,15 +21,15 @@ private IntPtr EntriesChangedPtr {
}
}
-[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);
+[DllImport ("gstreamersharpglue-0.10.dll") ]
+static extern void gstsharp_g_cond_wait (IntPtr cond, IntPtr mutex);
+[DllImport ("gstreamersharpglue-0.10.dll") ]
+static extern bool gstsharp_g_cond_timed_wait (IntPtr cond, IntPtr mutex, ref _TimeVal abs_time);
+[DllImport ("gstreamersharpglue-0.10.dll") ]
+static extern void gstsharp_g_cond_broadcast (IntPtr cond);
public void Wait () {
- g_cond_wait (EntriesChangedPtr, LockPtr);
+ gstsharp_g_cond_wait (EntriesChangedPtr, LockPtr);
}
[StructLayout (LayoutKind.Sequential) ]
@@ -44,7 +44,7 @@ public bool Wait (uint mseconds) {
long usec = 1000 * (mseconds - sec * 1000);
tv.sec = (IntPtr) (sec);
tv.usec = (IntPtr) (usec);
- return g_cond_timed_wait (EntriesChangedPtr, LockPtr, ref tv);
+ return gstsharp_g_cond_timed_wait (EntriesChangedPtr, LockPtr, ref tv);
}
public bool Wait (TimeSpan timespan) {
@@ -53,11 +53,11 @@ public bool Wait (TimeSpan timespan) {
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);
+ return gstsharp_g_cond_timed_wait (EntriesChangedPtr, LockPtr, ref tv);
}
public void Broadcast () {
- g_cond_broadcast (EntriesChangedPtr);
+ gstsharp_g_cond_broadcast (EntriesChangedPtr);
}
[DllImport ("gstreamersharpglue-0.10.dll") ]
@@ -73,23 +73,23 @@ private IntPtr SlaveLockPtr {
}
}
-[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);
+[DllImport ("gstreamersharpglue-0.10.dll") ]
+static extern void gstsharp_g_mutex_lock (IntPtr mutex);
+[DllImport ("gstreamersharpglue-0.10.dll") ]
+static extern void gstsharp_g_mutex_unlock (IntPtr mutex);
+[DllImport ("gstreamersharpglue-0.10.dll") ]
+static extern bool gstsharp_g_mutex_trylock (IntPtr mutex);
public void SlaveLock () {
- g_mutex_lock (SlaveLockPtr);
+ gstsharp_g_mutex_lock (SlaveLockPtr);
}
public void SlaveUnlock () {
- g_mutex_unlock (SlaveLockPtr);
+ gstsharp_g_mutex_unlock (SlaveLockPtr);
}
public bool TrySlaveLock () {
- return g_mutex_trylock (SlaveLockPtr);
+ return gstsharp_g_mutex_trylock (SlaveLockPtr);
}
[DllImport ("libgstreamer-0.10.dll") ]
diff --git a/gstreamer-sharp/glue/clock.c b/gstreamer-sharp/glue/clock.c
index 7cf5e7e..fc851f6 100755
--- a/gstreamer-sharp/glue/clock.c
+++ b/gstreamer-sharp/glue/clock.c
@@ -23,3 +23,40 @@ gstsharp_gst_clock_get_times_offset (void)
{
return (guint) G_STRUCT_OFFSET (GstClock, times);
}
+
+void
+gstsharp_g_cond_wait (GCond * cond, GMutex * mutex)
+{
+ g_cond_wait (cond, mutex);
+}
+
+gboolean
+gstsharp_g_cond_timed_wait (GCond *cond, GMutex *mutex, GTimeVal *abs_time)
+{
+ return g_cond_timed_wait (cond, mutex, abs_time);
+}
+
+void
+gstsharp_g_cond_broadcast (GCond *cond)
+{
+ g_cond_broadcast (cond);
+}
+
+void
+gstsharp_g_mutex_lock (GMutex *mutex)
+{
+ g_mutex_lock (mutex);
+}
+
+void
+gstsharp_g_mutex_unlock (GMutex *mutex)
+{
+ g_mutex_unlock (mutex);
+}
+
+gboolean
+gstsharp_g_mutex_trylock (GMutex *mutex)
+{
+ return g_mutex_trylock (mutex);
+}
+