core: Switch to new GMutex/GCond API.
authorJens Georg <mail@jensge.org>
Sun, 19 Feb 2012 09:17:42 +0000 (11:17 +0200)
committerJens Georg <mail@jensge.org>
Mon, 26 Mar 2012 15:33:39 +0000 (17:33 +0200)
Also use initializer to work around bgo#670366

configure.ac
src/rygel/rygel-http-gst-sink.vala

index 1b121a7..8977fb4 100644 (file)
@@ -28,6 +28,7 @@ LT_PREREQ([2.2.6])
 LT_INIT([dlopen disable-static])
 
 dnl Required versions of library packages
+GLIB_REQUIRED=2.31.13
 VALA_REQUIRED=0.15.1
 GSSDP_REQUIRED=0.11.0
 GUPNP_REQUIRED=0.17.1
@@ -47,6 +48,9 @@ GSTREAMER_TAG_REQUIRED=0.10.28
 GSTREAMER_APP_REQUIRED=0.10.28
 LIBSQLITE3_REQUIRED=3.5
 
+PKG_CHECK_MODULES(LIBGLIB, glib-2.0 >= $GLIB_REQUIRED)
+VALAFLAGS="--target-glib=2.32 $VALAFLAGS"
+
 PKG_CHECK_MODULES(LIBGSSDP, gssdp-1.0 >= $GSSDP_REQUIRED)
 PKG_CHECK_MODULES(LIBGUPNP, gupnp-1.0 >= $GUPNP_REQUIRED)
 PKG_CHECK_MODULES(LIBGUPNP_AV, gupnp-av-1.0 >= $GUPNP_AV_REQUIRED)
index 330f88f..17cebce 100644 (file)
@@ -39,8 +39,8 @@ internal class Rygel.HTTPGstSink : BaseSink {
     private int64 bytes_sent;
     private int64 max_bytes;
 
-    private Mutex buffer_mutex;
-    private Cond buffer_condition;
+    private Mutex buffer_mutex = Mutex ();
+    private Cond buffer_condition = Cond ();
 
     static construct {
         var caps = new Caps.any ();
@@ -55,8 +55,6 @@ internal class Rygel.HTTPGstSink : BaseSink {
         this.chunks_buffered = 0;
         this.bytes_sent = 0;
         this.max_bytes = int64.MAX;
-        this.buffer_mutex = new Mutex ();
-        this.buffer_condition = new Cond ();
 
         this.cancellable = new Cancellable ();
         this.priority = response.priority;