gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2050-g76a3e69
Date: Thu, 22 May 2014 11:45:50 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  76a3e697e4bf26c0a7638ebacf1b68e9df8529f2 (commit)
       via  4f69ce50ba230cee222e4ef6df567d37857fa41a (commit)
       via  8a137902ea0ea0778a198a0c5035bc3fb1d77357 (commit)
       via  8312a1db799e99f934a44fa4b738a94a300f203b (commit)
       via  a17e2dd50c773c833c1a8395db73f1bc2bc8d1e5 (commit)
      from  cf3f33ac6a59017e8536fc670887373db8b9020f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=76a3e697e4bf26c0a7638ebacf1b68e9df8529f2


commit 76a3e697e4bf26c0a7638ebacf1b68e9df8529f2
Author: Bastiaan Jacques <address@hidden>
Date:   Thu May 22 13:26:45 2014 +0200

    ISO/IEC 14882:2011 17.6.4.2.1 prevents us from forward-declaring
    types from namespace std.

diff --git a/libcore/MovieLoader.h b/libcore/MovieLoader.h
index 4f0a79e..7ab5c33 100644
--- a/libcore/MovieLoader.h
+++ b/libcore/MovieLoader.h
@@ -21,6 +21,7 @@
 
 #include <boost/intrusive_ptr.hpp>
 #include <string>
+#include <thread>
 #include <boost/ptr_container/ptr_list.hpp>
 #include <boost/noncopyable.hpp>
 #include <condition_variable>
@@ -34,9 +35,6 @@ namespace gnash {
     class movie_definition;
     class as_object;
 }
-namespace std {
-    class thread;
-}
 
 namespace gnash {
 
diff --git a/libcore/parser/SWFMovieDefinition.h 
b/libcore/parser/SWFMovieDefinition.h
index 21cd2f2..47af2bf 100644
--- a/libcore/parser/SWFMovieDefinition.h
+++ b/libcore/parser/SWFMovieDefinition.h
@@ -34,6 +34,7 @@
 #include <string>
 #include <memory> 
 #include <mutex>
+#include <thread>
 #include <condition_variable>
 
 #include "movie_definition.h" // for inheritance
@@ -57,9 +58,6 @@ namespace gnash {
     class RunResources;
     class Font;
 }
-namespace std {
-    class thread;
-}
 
 namespace gnash {
 
diff --git a/libmedia/MediaParser.h b/libmedia/MediaParser.h
index 40d5614..e320470 100644
--- a/libmedia/MediaParser.h
+++ b/libmedia/MediaParser.h
@@ -20,6 +20,7 @@
 #ifndef GNASH_MEDIAPARSER_H
 #define GNASH_MEDIAPARSER_H
 
+#include <thread>
 #include <mutex>
 #include <condition_variable>
 #include <memory>
@@ -41,9 +42,6 @@ namespace gnash {
         struct Id3Info;
     }
 }
-namespace std {
-    class thread;
-}
 
 namespace gnash {
 namespace media {

http://git.savannah.gnu.org/cgit//commit/?id=4f69ce50ba230cee222e4ef6df567d37857fa41a


commit 4f69ce50ba230cee222e4ef6df567d37857fa41a
Author: Bastiaan Jacques <address@hidden>
Date:   Thu May 22 13:24:42 2014 +0200

    Use next() from namespace std.

diff --git a/libcore/asobj/Array_as.cpp b/libcore/asobj/Array_as.cpp
index 2b4cdbe..5d270fd 100644
--- a/libcore/asobj/Array_as.cpp
+++ b/libcore/asobj/Array_as.cpp
@@ -24,6 +24,7 @@
 #include <algorithm>
 #include <cmath>
 #include <functional>
+#include <iterator>
 #include <boost/algorithm/string/case_conv.hpp>
 #include <boost/lexical_cast.hpp>
 
@@ -219,7 +220,7 @@ inplaceMerge(IterType begin, IterType middle, const 
IterType& end, ComparatorTyp
             IterType it = std::find_if(middle, end, 
                 [&](const value_type& v) { return !compare(v, next_high); });
 
-            std::copy(boost::next(middle), it, middle);
+            std::copy(std::next(middle), it, middle);
             *(--it) = next_high;
         }
         ++begin;
diff --git a/librender/cairo/PathParser.cpp b/librender/cairo/PathParser.cpp
index 2d67520..1dcca6a 100644
--- a/librender/cairo/PathParser.cpp
+++ b/librender/cairo/PathParser.cpp
@@ -17,10 +17,11 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 //
 
-#include <boost/utility.hpp>
-#include "PathParser.h"
-#include <map>
 #include <functional>
+#include <iterator>
+#include <map>
+
+#include "PathParser.h"
 #include "log.h"
 
 namespace gnash
@@ -132,7 +133,7 @@ PathParser::append(const UnivocalPath& append_path)
   } else {
 
     for (std::vector<Edge>::const_reverse_iterator prev = edges.rbegin(),
-         it = boost::next(prev), end = edges.rend(); it != end; ++it, ++prev) {
+         it = std::next(prev), end = edges.rend(); it != end; ++it, ++prev) {
       if ((*prev).straight()) {
         lineTo((*it).ap);
       } else {
diff --git a/librender/cairo/PathParser.h b/librender/cairo/PathParser.h
index 82df0b3..2fd86cc 100644
--- a/librender/cairo/PathParser.h
+++ b/librender/cairo/PathParser.h
@@ -19,11 +19,13 @@
 #ifndef GNASH_PATH_PARSER_H
 #define GNASH_PATH_PARSER_H
 
-#include "Geometry.h"
 #include <vector>
 #include <deque>
+#include <boost/utility.hpp>
+#include "Geometry.h"
 #include "SWFCxForm.h"
 
+
 namespace gnash
 {
 
diff --git a/librender/opengl/Renderer_ogl.cpp 
b/librender/opengl/Renderer_ogl.cpp
index 3770373..59fda36 100644
--- a/librender/opengl/Renderer_ogl.cpp
+++ b/librender/opengl/Renderer_ogl.cpp
@@ -24,6 +24,7 @@
 #include "Renderer_ogl.h"
 
 #include <boost/utility.hpp>
+#include <iterator>
 #include <functional>
 #include <list>
 #include <cstring>
@@ -1583,7 +1584,7 @@ public:
         contour.push_back(connector);
 
         const Path* tmp = connector;
-        connector = find_connecting_path(*connector, std::list<const 
Path*>(boost::next(it), end));
+        connector = find_connecting_path(*connector, std::list<const 
Path*>(std::next(it), end));
   
         // make sure we don't iterate over the connecting path in the for loop.
         path_refs.remove(tmp);
diff --git a/librender/openvg/OpenVGRenderer.cpp 
b/librender/openvg/OpenVGRenderer.cpp
index b12c38a..d1f5fbc 100644
--- a/librender/openvg/OpenVGRenderer.cpp
+++ b/librender/openvg/OpenVGRenderer.cpp
@@ -24,8 +24,9 @@
 #include <cstring>
 #include <cmath>
 #include <iostream>
-#include <boost/utility.hpp>
+#include <iterator>
 #include <functional>
+#include <boost/utility.hpp>
 
 #include "log.h"
 #include "RGBA.h"
@@ -960,7 +961,7 @@ Renderer_ovg::get_contours(const PathPtrVec &paths)
             contour.push_back(connector);
             
             const Path* tmp = connector;
-            connector = find_connecting_path(*connector, std::list<const 
Path*>(boost::next(it), end));
+            connector = find_connecting_path(*connector, std::list<const 
Path*>(std::next(it), end));
             
             // make sure we don't iterate over the connecting path in the for 
loop.
             path_refs.remove(tmp);

http://git.savannah.gnu.org/cgit//commit/?id=8a137902ea0ea0778a198a0c5035bc3fb1d77357


commit 8a137902ea0ea0778a198a0c5035bc3fb1d77357
Author: Bastiaan Jacques <address@hidden>
Date:   Thu May 22 12:24:58 2014 +0200

    Switch boost::thread to std::thread. Also add a few missing include 
directives.

diff --git a/cygnal/alloc.cpp b/cygnal/alloc.cpp
index bf74cfc..9ce5902 100644
--- a/cygnal/alloc.cpp
+++ b/cygnal/alloc.cpp
@@ -19,15 +19,15 @@
 
 /// This defines thread safe new/delete operators
 #include <new>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 
-static boost::mutex mem_mutex;
+static std::mutex mem_mutex;
 
 #if 0
 // Wrap new in a mutex, because it is not thread safe.
 void *
 operator new (std::size_t bytes) throw (std::bad_alloc) {
-    boost::mutex::scoped_lock lock(mem_mutex);
+    std::lock_guard<std::mutex> lock(mem_mutex);
     void *ptr = malloc (bytes);
     return ptr;
 }
@@ -35,7 +35,7 @@ operator new (std::size_t bytes) throw (std::bad_alloc) {
 // Wrap delete in a mutex, because it is not thread safe.
 void
 operator delete (void* vptr) throw () {
-    boost::mutex::scoped_lock lock(mem_mutex);
+    std::lock_guard<std::mutex> lock(mem_mutex);
     free (vptr);
 }
 #endif
diff --git a/cygnal/cygnal.cpp b/cygnal/cygnal.cpp
index 130dbe7..c9e9399 100644
--- a/cygnal/cygnal.cpp
+++ b/cygnal/cygnal.cpp
@@ -34,6 +34,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <functional>
+#include <mutex>
+#include <condition_variable>
 
 #include "GnashSleep.h"
 #include "revno.h"
@@ -88,11 +91,6 @@ extern "C"{
 //#include <boost/date_time/local_time/local_time.hpp>
 #include <boost/date_time/time_zone_base.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
-#include <boost/thread/thread.hpp>
-#include <functional>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/condition.hpp>
-#include <boost/thread/tss.hpp>
 
 #ifndef POLLRDHUP
 #define POLLRDHUP 0
@@ -165,11 +163,11 @@ static Cache& cache = Cache::getDefaultInstance();
 //static std::map<std::string, Proc> procs; // = proc::getDefaultInstance();
 
 // This mutex is used to signify when all the threads are done.
-static boost::condition        alldone;
-static boost::mutex    alldone_mutex;
+static std::condition_variable alldone;
+static std::mutex              alldone_mutex;
 
-static boost::condition        noclients;
-static boost::mutex    noclients_mutex;
+static std::condition_variable noclients;
+static std::mutex              noclients_mutex;
 
 const char *proto_str[] = {
     "NONE",
@@ -373,7 +371,7 @@ Cygnal::removeHandler(const std::string &path)
     map<std::string, std::shared_ptr<Handler> >::iterator it;
     it = _handlers.find(path);
     if (it != _handlers.end()) {
-       boost::mutex::scoped_lock lock(_mutex);
+       std::lock_guard<std::mutex> lock(_mutex);
        _handlers.erase(it);
     }
 }
@@ -528,7 +526,7 @@ main(int argc, char *argv[])
 
     // Lock a mutex the main() waits in before exiting. This is
     // because all the actually processing is done by other threads.
-    boost::mutex::scoped_lock lk(alldone_mutex);
+    std::unique_lock<std::mutex> lk(alldone_mutex);
     
     // Start the Admin handler. This allows one to connect to Cygnal
     // at port 1111 and dump statistics to the terminal for tuning
@@ -536,7 +534,7 @@ main(int argc, char *argv[])
     if (admin) {
        Network::thread_params_t admin_data;
        admin_data.port = gnash::ADMIN_PORT;
-       boost::thread admin_thread(std::bind(&admin_handler, &admin_data));
+       std::thread admin_thread(std::bind(&admin_handler, &admin_data));
     }
 
 //    Cvm cvm;
@@ -566,7 +564,7 @@ main(int argc, char *argv[])
        http_data->port = port_offset + gnash::HTTP_PORT;
         http_data->hostname = hostname;
        if (crcfile.getThreadingFlag()) {
-           boost::thread http_thread(std::bind(&connection_handler, 
http_data));
+           std::thread http_thread(std::bind(&connection_handler, http_data));
        } else {
            connection_handler(http_data);
        }
@@ -584,7 +582,7 @@ main(int argc, char *argv[])
        rtmp_data->port = port_offset + gnash::RTMP_PORT;
         rtmp_data->hostname = hostname;
        if (crcfile.getThreadingFlag()) {
-           boost::thread rtmp_thread(std::bind(&connection_handler, 
rtmp_data));
+           std::thread rtmp_thread(std::bind(&connection_handler, rtmp_data));
        } else {
            connection_handler(rtmp_data);
        }
@@ -890,7 +888,7 @@ connection_handler(Network::thread_params_t *args)
                // in. Each port of could have a different protocol.
                std::bind(event_handler, hargs);
                if (crcfile.getThreadingFlag() == true) {
-                   boost::thread event_thread(std::bind(&event_handler, 
hargs));
+                   std::thread event_thread(std::bind(&event_handler, hargs));
                } else {
                    event_handler(hargs);
                    // We're done, close this network connection
@@ -960,7 +958,7 @@ connection_handler(Network::thread_params_t *args)
                    // with a connection_handler for each port we're interested
                    // in. Each port of course has a different protocol.
                    if (crcfile.getThreadingFlag() == true) {
-                       boost::thread event_thread(std::bind(&event_handler, 
args));
+                       std::thread event_thread(std::bind(&event_handler, 
args));
                    } else {
                        event_handler(args);
                        // We're done, close this network connection
diff --git a/cygnal/cygnal.h b/cygnal/cygnal.h
index 3f9e610..f310cee 100644
--- a/cygnal/cygnal.h
+++ b/cygnal/cygnal.h
@@ -20,7 +20,7 @@
 #define __CYGNAL_H__
 
 #include <cstdint>
-#include <boost/thread.hpp>
+#include <thread>
 #include <vector>
 #include <string>
 #include <map>
@@ -80,7 +80,7 @@ private:
     std::vector<std::shared_ptr<peer_t> > _peers;
     std::vector<std::shared_ptr<peer_t> > _active_peers;
     std::map<std::string, std::shared_ptr<Handler> > _handlers;
-    boost::mutex _mutex;
+    std::mutex _mutex;
 };
 
 /// \class cygnal::ThreadCounter of threads currently
@@ -91,13 +91,13 @@ class ThreadCounter
 public:
 
     ThreadCounter() : _tids(0) {};
-    void increment() { boost::mutex::scoped_lock lk(_tid_mutex); ++_tids; };
-    void decrement() { boost::mutex::scoped_lock lk(_tid_mutex); --_tids; };
+    void increment() { std::lock_guard<std::mutex> lk(_tid_mutex); ++_tids; };
+    void decrement() { std::lock_guard<std::mutex> lk(_tid_mutex); --_tids; };
     int num_of_tids() { return _tids; };
 private:
-    boost::mutex  _tid_mutex;
+    std::mutex  _tid_mutex;
     int           _tids;
-    boost::thread _tid_handle;
+    std::thread _tid_handle;
 };
   
 // End of gnash namespace 
diff --git a/cygnal/handler.cpp b/cygnal/handler.cpp
index fe04326..d1abec7 100644
--- a/cygnal/handler.cpp
+++ b/cygnal/handler.cpp
@@ -20,8 +20,7 @@
 #include "gnashconfig.h"
 #endif
 
-#include <boost/thread/thread.hpp>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <memory>
 #include <functional>
 #include <algorithm>
@@ -97,7 +96,7 @@ Handler::addClient(int fd, Network::protocols_supported_e 
proto)
 {
     // GNASH_REPORT_FUNCTION;
 
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     
     log_debug("Adding %d to the client array.", fd);
     switch (proto) {
@@ -143,7 +142,7 @@ Handler::parseFirstRequest(int fd, 
gnash::Network::protocols_supported_e proto)
     string key;
     Network net;
     cygnal::Buffer *buf = 0;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     
     switch (proto) {
       case Network::NONE:
@@ -220,7 +219,7 @@ int
 Handler::recvMsg(int fd)
 {
     // GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
     switch (_protocol[fd]) {
       case Network::NONE:
@@ -251,7 +250,7 @@ Handler::removeClient(int x)
 {
     // GNASH_REPORT_FUNCTION;
 
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
     vector<int>::iterator it;
     for (it = _clients.begin(); it < _clients.end(); ++it) {
diff --git a/cygnal/handler.h b/cygnal/handler.h
index 018011f..29c84b1 100644
--- a/cygnal/handler.h
+++ b/cygnal/handler.h
@@ -21,9 +21,8 @@
 
 #include <map>
 #include <cstdint>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <memory>
-//#include <boost/thread/condition.hpp>
 
 #include <vector>
 #include <string>
@@ -319,7 +318,7 @@ protected:
 
     std::map<int, std::string> _keys;
 private:    
-    boost::mutex                       _mutex;
+    std::mutex                 _mutex;
     
 // Remote Shared Objects. References are an index into this vector.
 //    std::map<std::string, std::shared_ptr<handler_t> > _handlers;
diff --git a/cygnal/http_server.cpp b/cygnal/http_server.cpp
index 8f810cc..7b5f84a 100644
--- a/cygnal/http_server.cpp
+++ b/cygnal/http_server.cpp
@@ -22,7 +22,7 @@
 #include "gnashconfig.h"
 #endif
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <boost/tokenizer.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <boost/date_time/gregorian/gregorian.hpp>
@@ -63,7 +63,7 @@
 using namespace gnash;
 using namespace std;
 
-static boost::mutex stl_mutex;
+static std::mutex stl_mutex;
 
 namespace cygnal
 {
diff --git a/cygnal/libamf/lcshm.cpp b/cygnal/libamf/lcshm.cpp
index e241dc3..9d63490 100644
--- a/cygnal/libamf/lcshm.cpp
+++ b/cygnal/libamf/lcshm.cpp
@@ -551,8 +551,8 @@ LcShm::connect(const string& names)
 bool
 LcShm::connect(key_t key)
 {
-       boost::mutex::scoped_lock lock(_localconnection_mutex);
-   // GNASH_REPORT_FUNCTION;
+    std::lock_guard<std::mutex> lock(_localconnection_mutex);
+    // GNASH_REPORT_FUNCTION;
     
     if (SharedMem::attach() == false) {
         return false;
@@ -596,7 +596,7 @@ LcShm::send(const string&  name , const string&  domainname 
,
             vector<cygnal::Element* >& data )
 {
     //GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_localconnection_mutex);
+    std::lock_guard<std::mutex> lock(_localconnection_mutex);
        
        std::vector<cygnal::Element* >::iterator iter;
                   
@@ -758,7 +758,7 @@ LcShm::send(const string&  name , const string&  domainname 
,
 ///  TODO:
 ///  This function should at do the following work:
 ///  1: Lock the shared memory
-///                    boost::mutex::scoped_lock lock(_localconnection_mutex);
+///                    std::lock_guard<std::mutex> 
lock(_localconnection_mutex);
 ///  2: Check if the current object is the listener
 ///         if findListener()
 ///            Make sure the object is the listener for certain connection name
diff --git a/cygnal/libamf/lcshm.h b/cygnal/libamf/lcshm.h
index d71a880..e3583dd 100644
--- a/cygnal/libamf/lcshm.h
+++ b/cygnal/libamf/lcshm.h
@@ -22,6 +22,7 @@
 #include <cstdint>
 #include <string>
 #include <vector>
+#include <mutex>
 
 #include "amf.h"
 #include "element.h"
@@ -300,7 +301,7 @@ private:
        
        ///Si added
        /// This is the mutex that controls access to the sharedmemory
-    boost::mutex        _localconnection_mutex;
+    std::mutex        _localconnection_mutex;
 
     ///Si 
        ///Moved from LocalConnectoin class to here.
diff --git a/cygnal/libnet/cache.cpp b/cygnal/libnet/cache.cpp
index aa4ade4..d7411ed 100644
--- a/cygnal/libnet/cache.cpp
+++ b/cygnal/libnet/cache.cpp
@@ -22,7 +22,7 @@
 #include "gnashconfig.h"
 #endif
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <string>
@@ -38,7 +38,7 @@ using std::string;
 using std::map;
 using std::endl;
 
-static boost::mutex cache_mutex;
+static std::mutex cache_mutex;
 
 namespace gnash
 {
@@ -78,7 +78,7 @@ void
 Cache::addPath(const std::string &name, const std::string &fullpath)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(cache_mutex);
+    std::lock_guard<std::mutex> lock(cache_mutex);
     _pathnames[name] = fullpath;
 }
 
@@ -86,7 +86,7 @@ void
 Cache::addResponse(const std::string &name, const std::string &response)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(cache_mutex);
+    std::lock_guard<std::mutex> lock(cache_mutex);
 
     _responses[name] = response;
 }
@@ -96,7 +96,7 @@ Cache::addFile(const std::string &name, 
std::shared_ptr<DiskStream> &file)
 {
     // GNASH_REPORT_FUNCTION;
 
-    boost::mutex::scoped_lock lock(cache_mutex);
+    std::lock_guard<std::mutex> lock(cache_mutex);
     log_network(_("Adding file %s to cache."), name);
     _files[name] = file;
 }
@@ -105,7 +105,7 @@ string &
 Cache::findPath(const std::string &name)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(cache_mutex);
+    std::lock_guard<std::mutex> lock(cache_mutex);
 #ifdef USE_STATS_CACHE
     clock_gettime (CLOCK_REALTIME, &_last_access);
     _pathname_lookups++;
@@ -122,7 +122,7 @@ string &
 Cache::findResponse(const std::string &name)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(cache_mutex);
+    std::lock_guard<std::mutex> lock(cache_mutex);
 #ifdef USE_STATS_CACHE
     clock_gettime (CLOCK_REALTIME, &_last_access);
     _response_lookups++;
@@ -141,7 +141,7 @@ Cache::findFile(const std::string &name)
 //    GNASH_REPORT_FUNCTION;
 
     log_network(_("Trying to find %s in the cache."), name);
-    boost::mutex::scoped_lock lock(cache_mutex);
+    std::lock_guard<std::mutex> lock(cache_mutex);
 #ifdef USE_STATS_CACHE
     clock_gettime (CLOCK_REALTIME, &_last_access);
     _file_lookups++;
@@ -158,7 +158,7 @@ void
 Cache::removePath(const std::string &name)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(cache_mutex);
+    std::lock_guard<std::mutex> lock(cache_mutex);
     _pathnames.erase(name);
 }
 
@@ -166,7 +166,7 @@ void
 Cache::removeResponse(const std::string &name)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(cache_mutex);
+    std::lock_guard<std::mutex> lock(cache_mutex);
     _responses.erase(name);
 }
 
@@ -174,7 +174,7 @@ void
 Cache::removeFile(const std::string &name)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(cache_mutex);
+    std::lock_guard<std::mutex> lock(cache_mutex);
     _files.erase(name);
 }
 
@@ -251,7 +251,7 @@ void
 Cache::dump(std::ostream& os) const
 {    
     GNASH_REPORT_FUNCTION;    
-    boost::mutex::scoped_lock lock(cache_mutex);
+    std::lock_guard<std::mutex> lock(cache_mutex);
 
     // Dump all the pathnames
     os << "Pathname cache has " << _pathnames.size() << " files." << endl;
diff --git a/cygnal/libnet/cque.cpp b/cygnal/libnet/cque.cpp
index 50d6202..d341d06 100644
--- a/cygnal/libnet/cque.cpp
+++ b/cygnal/libnet/cque.cpp
@@ -51,7 +51,7 @@ CQue::~CQue()
 //    GNASH_REPORT_FUNCTION;
 //    clear();
     que_t::iterator it;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 //     for (it = _que.begin(); it != _que.end(); it++) {
 //     std::shared_ptr<cygnal::Buffer> ptr = *(it);
 //     if (ptr->size()) {      // FIXME: we probably want to delete ptr anyway,
@@ -65,7 +65,7 @@ void
 CQue::wait()
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lk(_cond_mutex);
+    std::unique_lock<std::mutex> lk(_cond_mutex);
 #ifndef _WIN32
     _cond.wait(lk);
     log_unimpl(_("CQue::wait(win32)"));
@@ -89,7 +89,7 @@ size_t
 CQue::size()
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return _que.size();
 }
 
@@ -97,7 +97,7 @@ bool
 CQue::push(std::shared_ptr<cygnal::Buffer> data)
 {
 //     GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     _que.push_back(data);
 #ifdef USE_STATS_QUEUE
     _stats.totalbytes += data->size();
@@ -123,7 +123,7 @@ CQue::pop()
 {
 //    GNASH_REPORT_FUNCTION;
     std::shared_ptr<cygnal::Buffer> buf;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     if (_que.size()) {
         buf = _que.front();
         _que.pop_front();
@@ -139,7 +139,7 @@ std::shared_ptr<cygnal::Buffer>
 CQue::peek()
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     if (_que.size()) {
         return _que.front();
     }
@@ -151,7 +151,7 @@ void
 CQue::clear()
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     _que.clear();
 }
 
@@ -163,7 +163,7 @@ CQue::remove(std::shared_ptr<cygnal::Buffer> begin, 
std::shared_ptr<cygnal::Buff
     deque<std::shared_ptr<cygnal::Buffer> >::iterator it;
     deque<std::shared_ptr<cygnal::Buffer> >::iterator start;
     deque<std::shared_ptr<cygnal::Buffer> >::iterator stop;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     std::shared_ptr<cygnal::Buffer> ptr;
     for (it = _que.begin(); it != _que.end(); ++it) {
        ptr = *(it);
@@ -184,7 +184,7 @@ CQue::remove(std::shared_ptr<cygnal::Buffer> element)
 {
     GNASH_REPORT_FUNCTION;
     deque<std::shared_ptr<cygnal::Buffer> >::iterator it;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     for (it = _que.begin(); it != _que.end(); ) {
        std::shared_ptr<cygnal::Buffer> ptr = *(it);
        if (ptr->reference() == element->reference()) {
@@ -262,7 +262,7 @@ CQue::dump()
 {
 //    GNASH_REPORT_FUNCTION;
     deque<std::shared_ptr<cygnal::Buffer> >::iterator it;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     std::cerr << std::endl << "CQue \"" << _name << "\" has "<< _que.size()
               << " buffers." << std::endl;
     for (it = _que.begin(); it != _que.end(); ++it) {
diff --git a/cygnal/libnet/cque.h b/cygnal/libnet/cque.h
index eb337f8..02e4178 100644
--- a/cygnal/libnet/cque.h
+++ b/cygnal/libnet/cque.h
@@ -21,8 +21,8 @@
 
 #include <string>
 #include <cstdint>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/condition.hpp>
+#include <mutex>
+#include <condition_variable>
 #include <deque>
 
 #include "getclocktime.hpp"
@@ -84,19 +84,19 @@ public:
     const std::string &getName() { return _name; }
 private:
     // an optional name for the queue, only used for debugging messages to 
make them unique
-    std::string                _name;
+    std::string                        _name;
     // The queue itself
-    que_t              _que;
+    que_t                      _que;
 
     // A condition variable used to signal the other thread when the que has 
data
-    boost::condition   _cond;
+    std::condition_variable    _cond;
     // This is the mutex used by the condition variable. It needs to be 
separate from the
     // one used to lock access to the que.
-    boost::mutex       _cond_mutex;
+    std::mutex                 _cond_mutex;
     // This is the mutex that controls access to the que.
-    boost::mutex       _mutex;
+    std::mutex                 _mutex;
 #ifdef USE_STATS_QUEUE
-    que_stats_t                _stats;
+    que_stats_t                        _stats;
 #endif
 };
     
diff --git a/cygnal/libnet/cqueue.cpp b/cygnal/libnet/cqueue.cpp
index 280358a..3a1b0e9 100644
--- a/cygnal/libnet/cqueue.cpp
+++ b/cygnal/libnet/cqueue.cpp
@@ -18,7 +18,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <boost/date_time/gregorian/gregorian.hpp>
 //#include <boost/date_time/local_time/local_time.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
diff --git a/cygnal/libnet/cqueue.h b/cygnal/libnet/cqueue.h
index f8feec5..671fe5a 100644
--- a/cygnal/libnet/cqueue.h
+++ b/cygnal/libnet/cqueue.h
@@ -23,7 +23,7 @@
 
 
 #include <cstdint>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <boost/date_time/gregorian/gregorian.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <iostream>
diff --git a/cygnal/libnet/diskstream.cpp b/cygnal/libnet/diskstream.cpp
index ab3f833..ec2a5df 100644
--- a/cygnal/libnet/diskstream.cpp
+++ b/cygnal/libnet/diskstream.cpp
@@ -55,9 +55,9 @@
 # include <sys/sendfile.h>
 #endif
 
-#include <boost/thread/mutex.hpp>
-static boost::mutex io_mutex;
-static boost::mutex mem_mutex;
+#include <mutex>
+static std::mutex io_mutex;
+static std::mutex mem_mutex;
 
 using std::string;
 
@@ -472,7 +472,7 @@ DiskStream::loadToMem(size_t filesize, off_t offset)
 
        // lock in case two threads try to load the same file at the
        // same time.
-       boost::mutex::scoped_lock lock(mem_mutex);
+       std::lock_guard<std::mutex> lock(mem_mutex);
        
 #ifdef _WIN32
        HANDLE handle = CreateFileMapping((HANDLE)_get_osfhandle(_filefd), NULL,
@@ -662,7 +662,7 @@ DiskStream::open(const string &filespec, int netfd, 
Statistics &statistics)
     log_debug(_("Trying to open %s"), filespec);
     
     if (getFileStats(filespec)) {
-       boost::mutex::scoped_lock lock(io_mutex);
+       std::lock_guard<std::mutex> lock(io_mutex);
        _filefd = ::open(_filespec.c_str(), O_RDONLY);
        log_debug (_("Opening file %s (fd #%d), %lld bytes in size."),
                   _filespec, _filefd,
diff --git a/cygnal/libnet/http.cpp b/cygnal/libnet/http.cpp
index e9cc4ca..14a9e00 100644
--- a/cygnal/libnet/http.cpp
+++ b/cygnal/libnet/http.cpp
@@ -18,7 +18,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <boost/tokenizer.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <boost/date_time/gregorian/gregorian.hpp>
@@ -62,7 +62,7 @@
 
 using std::string;
 
-static boost::mutex stl_mutex;
+static std::mutex stl_mutex;
 
 namespace gnash
 {
@@ -1554,7 +1554,7 @@ void
 HTTP::dump() {
 //    GNASH_REPORT_FUNCTION;
     
-    boost::mutex::scoped_lock lock(stl_mutex);
+    std::lock_guard<std::mutex> lock(stl_mutex);
         
     log_debug (_("==== The HTTP header breaks down as follows: ===="));
     log_debug (_("Filespec: %s"), _filespec.c_str());
diff --git a/cygnal/libnet/network.cpp b/cygnal/libnet/network.cpp
index ed23717..7925136 100644
--- a/cygnal/libnet/network.cpp
+++ b/cygnal/libnet/network.cpp
@@ -21,7 +21,7 @@
 #include "gnashconfig.h"
 #endif
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <vector>
 
 #include "utility.h"
@@ -922,7 +922,7 @@ Network::readNet(int fd, byte_t *buffer, int nbytes, int 
timeout)
     fd_set              fdset;
     int                 ret = -1;
 
-//     boost::mutex::scoped_lock lock(_net_mutex);
+//     std::lock_guard<std::mutex> lock(_net_mutex);
 
     if (_debug) {
        log_debug(_("Trying to read %d bytes from fd #%d"), nbytes, fd);
@@ -1114,7 +1114,7 @@ Network::writeNet(int fd, const byte_t *buffer, int 
nbytes, int timeout)
     fd_set              fdset;
     int                 ret = -1;
 
-    boost::mutex::scoped_lock lock(_net_mutex);
+    std::lock_guard<std::mutex> lock(_net_mutex);
     
     // We need a writable, and not const point for byte arithmetic.
     byte_t *bufptr = const_cast<byte_t *>(buffer);
@@ -1241,7 +1241,7 @@ Network::addPollFD(struct pollfd &fd, Network::entry_t 
*func)
 //    GNASH_REPORT_FUNCTION;
 
     log_debug(_("%s: adding fd #%d to pollfds"), __PRETTY_FUNCTION__, fd.fd);
-    boost::mutex::scoped_lock lock(_poll_mutex);
+    std::lock_guard<std::mutex> lock(_poll_mutex);
     _handlers[fd.fd] = func;
      _pollfds.push_back(fd);
 //     notify();
@@ -1252,7 +1252,7 @@ Network::addPollFD(struct pollfd &fd)
 {
 //    GNASH_REPORT_FUNCTION;
     log_debug(_("%s: adding fd #%d to pollfds"), __PRETTY_FUNCTION__, fd.fd);
-    boost::mutex::scoped_lock lock(_poll_mutex);
+    std::lock_guard<std::mutex> lock(_poll_mutex);
      _pollfds.push_back(fd);
 //     notify();
 }
@@ -1261,7 +1261,7 @@ struct pollfd
 &Network::getPollFD(int index)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_poll_mutex);
+    std::lock_guard<std::mutex> lock(_poll_mutex);
     return _pollfds[index];
 }
 
@@ -1269,7 +1269,7 @@ struct pollfd *
 Network::getPollFDPtr()
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_poll_mutex);
+    std::lock_guard<std::mutex> lock(_poll_mutex);
     return &_pollfds[0];
 }
 
@@ -1278,7 +1278,7 @@ Network::erasePollFD(int fd)
 {
 //    GNASH_REPORT_FUNCTION;
     log_debug(_("%s: erasing fd #%d from pollfds"), __PRETTY_FUNCTION__, fd);
-    boost::mutex::scoped_lock lock(_poll_mutex);
+    std::lock_guard<std::mutex> lock(_poll_mutex);
     if (_pollfds.size() > 0) {
        vector<struct pollfd>::iterator it;
        for (it=_pollfds.begin(); it<_pollfds.end(); ++it) {
@@ -1294,7 +1294,7 @@ void
 Network::erasePollFD(vector<struct pollfd>::iterator &itt)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_poll_mutex);
+    std::lock_guard<std::mutex> lock(_poll_mutex);
     if (_pollfds.size() == 1) {
        _pollfds.clear();
      } else {
@@ -1306,7 +1306,7 @@ void
 Network::addEntry(int fd, Network::entry_t *func)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_poll_mutex);
+    std::lock_guard<std::mutex> lock(_poll_mutex);
     _handlers[fd] = func;
 }
 
@@ -1314,7 +1314,7 @@ Network::entry_t *
 Network::getEntry(int fd)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_poll_mutex);
+    std::lock_guard<std::mutex> lock(_poll_mutex);
     return _handlers[fd];
 }
 
diff --git a/cygnal/libnet/network.h b/cygnal/libnet/network.h
index 6522b09..3727c73 100644
--- a/cygnal/libnet/network.h
+++ b/cygnal/libnet/network.h
@@ -47,7 +47,7 @@
 
 #include <memory>
 #include <cstdint>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <vector>
 #include <cassert>
 #include <string>
@@ -352,8 +352,8 @@ public:
     std::map<int, entry_t *> _handlers;
     std::vector<struct pollfd> _pollfds;
     // This is the mutex that controls access to the que.
-    boost::mutex       _poll_mutex;
-    boost::mutex       _net_mutex;
+    std::mutex _poll_mutex;
+    std::mutex _net_mutex;
 #ifdef USE_SSL
     std::unique_ptr<SSLClient> _ssl;
 #endif
diff --git a/cygnal/libnet/sshclient.cpp b/cygnal/libnet/sshclient.cpp
index e13d90d..d5a08e5 100644
--- a/cygnal/libnet/sshclient.cpp
+++ b/cygnal/libnet/sshclient.cpp
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <cstdint>
 #include <boost/array.hpp>
 #include <sys/types.h>
@@ -62,7 +62,7 @@ extern "C" {
 using namespace gnash;
 using namespace std;
 
-static boost::mutex stl_mutex;
+static std::mutex stl_mutex;
 
 namespace gnash
 {
@@ -451,7 +451,7 @@ void
 SSHClient::dump() {
 //    GNASH_REPORT_FUNCTION;
     
-    boost::mutex::scoped_lock lock(stl_mutex);
+    std::lock_guard<std::mutex> lock(stl_mutex);
   
     log_debug (_("==== The SSH header breaks down as follows: ===="));
 
diff --git a/cygnal/libnet/sshserver.cpp b/cygnal/libnet/sshserver.cpp
index fc1feb5..99b16c5 100644
--- a/cygnal/libnet/sshserver.cpp
+++ b/cygnal/libnet/sshserver.cpp
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <cstdint>
 #include <boost/array.hpp>
 #include <sys/types.h>
@@ -64,7 +64,7 @@ extern "C" {
 using namespace gnash;
 using namespace std;
 
-static boost::mutex stl_mutex;
+static std::mutex stl_mutex;
 
 namespace gnash
 {
@@ -192,7 +192,7 @@ void
 SSHServer::dump() {
 //    GNASH_REPORT_FUNCTION;
     
-    boost::mutex::scoped_lock lock(stl_mutex);
+    std::lock_guard<std::mutex> lock(stl_mutex);
   
     log_debug (_("==== The SSH header breaks down as follows: ===="));
 
diff --git a/cygnal/libnet/sslclient.cpp b/cygnal/libnet/sslclient.cpp
index 6f8b2e0..54498a3 100644
--- a/cygnal/libnet/sslclient.cpp
+++ b/cygnal/libnet/sslclient.cpp
@@ -21,7 +21,7 @@
 #include "gnashconfig.h"
 #endif
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <cstdint>
 #include <boost/array.hpp>
 #include <sys/types.h>
@@ -66,7 +66,7 @@
 using namespace gnash;
 using namespace std;
 
-static boost::mutex stl_mutex;
+static std::mutex stl_mutex;
 // The debug log used by all the gnash libraries.
 
 static LogFile& dbglogfile = LogFile::getDefaultInstance();
@@ -378,7 +378,7 @@ void
 SSLClient::dump() {
 //    GNASH_REPORT_FUNCTION;
     
-    boost::mutex::scoped_lock lock(stl_mutex);
+    std::lock_guard<std::mutex> lock(stl_mutex);
         
     log_debug(_("==== The SSL header breaks down as follows: ===="));
 }
diff --git a/cygnal/libnet/sslserver.cpp b/cygnal/libnet/sslserver.cpp
index 0f1facb..f99c0af 100644
--- a/cygnal/libnet/sslserver.cpp
+++ b/cygnal/libnet/sslserver.cpp
@@ -21,7 +21,7 @@
 #include "gnashconfig.h"
 #endif
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <cstdint>
 #include <boost/array.hpp>
 #include <sys/types.h>
@@ -69,7 +69,7 @@
 using namespace gnash;
 using namespace std;
 
-static boost::mutex stl_mutex;
+static std::mutex stl_mutex;
 
 namespace gnash
 {
@@ -174,7 +174,7 @@ void
 SSLServer::dump() {
 //    GNASH_REPORT_FUNCTION;
     
-    boost::mutex::scoped_lock lock(stl_mutex);
+    std::lock_guard<std::mutex> lock(stl_mutex);
   
     log_debug (_("==== The SSL header breaks down as follows: ===="));
 }
diff --git a/cygnal/libnet/statistics.cpp b/cygnal/libnet/statistics.cpp
index 58b6a94..acc685d 100644
--- a/cygnal/libnet/statistics.cpp
+++ b/cygnal/libnet/statistics.cpp
@@ -18,7 +18,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <string>
 #include <list>
 #include <iostream>
@@ -27,7 +27,7 @@
 #include "netstats.h"
 #include "statistics.h"
 
-static boost::mutex io_mutex;
+static std::mutex io_mutex;
 
 // The string versions of the codec, used for debugging. If you add
 // another enum type to codec_e, you have to add the string
@@ -96,7 +96,7 @@ Statistics::addStats() {
     st->setBytes(getBytes());
     st->setFileType(getFileType());
     
-    boost::mutex::scoped_lock lock(io_mutex);
+    std::lock_guard<std::mutex> lock(io_mutex);
     _netstats.push_back(st);
     
     return _netstats.size();
@@ -104,7 +104,7 @@ Statistics::addStats() {
 
 void
 Statistics::dump() {   
-    boost::mutex::scoped_lock lock(io_mutex);
+    std::lock_guard<std::mutex> lock(io_mutex);
     std::list<NetStats *>::iterator it;
 
     for (it = _netstats.begin(); it != _netstats.end(); ++it) {
diff --git a/cygnal/proc.cpp b/cygnal/proc.cpp
index 90a1b78..5372744 100644
--- a/cygnal/proc.cpp
+++ b/cygnal/proc.cpp
@@ -147,7 +147,7 @@ Proc::startCGI(const string &filespec, bool outflag, 
std::uint16_t port)
     // fork ourselves silly
     childpid = fork();
     
-//    boost::mutex::scoped_lock lock(_mutex);
+//    std::lock_guard<std::mutex> lock(_mutex);
     
     // childpid is a positive integer, if we are the parent, and fork() worked
     if (childpid > 0) {
@@ -185,7 +185,7 @@ Proc::findCGI(const string &filespec)
 {
 //    GNASH_REPORT_FUNCTION;
     log_debug("Finding \"%s\"", filespec);
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
     return _pids[filespec];
 }
@@ -195,7 +195,7 @@ Proc::stopCGI(void)
 {
 //    GNASH_REPORT_FUNCTION;
     log_unimpl(__PRETTY_FUNCTION__);
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
     return false;
 }
@@ -206,7 +206,7 @@ Proc::stopCGI(const string &filespec)
 //    GNASH_REPORT_FUNCTION;
     log_debug("Stopping \"%s\"", filespec);
 
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     pid_t pid = _pids[filespec];
     
     if (kill (pid, SIGQUIT) == -1) {
@@ -220,7 +220,7 @@ bool
 Proc::setOutput(const string &filespec, bool outflag)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     _output[filespec] = outflag;
     
     return (true);
@@ -230,7 +230,7 @@ bool
 Proc::getOutput(const string &filespec)
 {
 //    GNASH_REPORT_FUNCTION;
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     
     return _output[filespec];
 }
diff --git a/cygnal/proc.h b/cygnal/proc.h
index 876eab9..5799f6b 100644
--- a/cygnal/proc.h
+++ b/cygnal/proc.h
@@ -23,8 +23,7 @@
 #include <string>
 #include <map>
 
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/condition.hpp>
+#include <mutex>
 
 #include "network.h"
 #include "dsodefs.h"
@@ -67,7 +66,7 @@ private:
     std::map<std::string, int>  _cons;
     std::string                 _docroot;
     
-    boost::mutex       _mutex;
+    std::mutex _mutex;
 };
 
 } // end of cygnal namespace
diff --git a/libbase/NetworkAdapter.cpp b/libbase/NetworkAdapter.cpp
index b113806..c71ef31 100644
--- a/libbase/NetworkAdapter.cpp
+++ b/libbase/NetworkAdapter.cpp
@@ -88,14 +88,10 @@ extern "C" {
 #include <cerrno>
 #include <cstdio> // cached data uses a *FILE
 #include <cstdlib> // std::getenv
+#include <mutex>
 
 #include <boost/version.hpp>
 #include <boost/assign/list_of.hpp>
-#include <boost/thread/mutex.hpp>
-
-#if BOOST_VERSION < 103500
-# include <boost/thread/detail/lock.hpp>
-#endif
 
 
 //#define GNASH_CURL_VERBOSE 1
@@ -109,25 +105,15 @@ namespace gnash {
 namespace {
 
 inline
-void lock(boost::mutex& mut)
+void lock(std::mutex& mut)
 {
-#if BOOST_VERSION < 103500
-    // see https://savannah.gnu.org/bugs/index.php?32579#comment7
-    boost::detail::thread::lock_ops<boost::mutex>::lock(mut);
-#else
     mut.lock();
-#endif
 }
 
 inline
-void unlock(boost::mutex& mut)
+void unlock(std::mutex& mut)
 {
-#if BOOST_VERSION < 103500
-    // see https://savannah.gnu.org/bugs/index.php?32579#comment7
-    boost::detail::thread::lock_ops<boost::mutex>::unlock(mut);
-#else
     mut.unlock();
-#endif
 }
 
 
@@ -173,13 +159,13 @@ private:
     CURLSH* _shandle;
 
     // mutex protecting share state
-    boost::mutex _shareMutex;
+    std::mutex _shareMutex;
 
     // mutex protecting shared cookies
-    boost::mutex _cookieMutex;
+    std::mutex _cookieMutex;
 
     // mutex protecting shared dns cache
-    boost::mutex _dnscacheMutex;
+    std::mutex _dnscacheMutex;
 
     /// Import cookies, if requested
     //
diff --git a/libbase/log.cpp b/libbase/log.cpp
index 782ae54..870e10e 100644
--- a/libbase/log.cpp
+++ b/libbase/log.cpp
@@ -29,6 +29,8 @@
 #include <fstream>
 #include <iomanip> 
 #include <string>
+#include <thread>
+#include <mutex>
 #include <boost/format.hpp>
 
 #include <unistd.h> // for getpid
@@ -39,11 +41,6 @@
 using std::cout;
 using std::endl;
 
-namespace {
-    // TODO: drop this and use boost::this_thread::id instead.
-    inline unsigned long int /* pthread_t */ get_thread_id();
-}
-
 namespace gnash {
 
 // Convert each byte into its hex representation
@@ -91,13 +88,13 @@ namespace {
 
     struct Timestamp {
         std::uint64_t startTicks;
-        std::map<int, int> threadMap;
+        std::map<std::thread::id, int> threadMap;
         Timestamp() : startTicks(clocktime::getTicks()) {}
     };
 
     std::ostream& operator<< (std::ostream& o, Timestamp& t)
     {
-        int tid = get_thread_id();
+        std::thread::id tid = std::this_thread::get_id();
         int& htid = t.threadMap[tid];
         if (!htid) {
             htid = t.threadMap.size();
@@ -243,8 +240,7 @@ processLog_action(const boost::format& fmt)
 void
 LogFile::log(const std::string& msg)
 {
-
-    boost::mutex::scoped_lock lock(_ioMutex);
+    std::lock_guard<std::mutex> lock(_ioMutex);
 
     if ( !_verbose ) return; // nothing to do if not verbose
 
@@ -355,7 +351,8 @@ LogFile::openLog(const std::string& filespec)
 bool
 LogFile::closeLog()
 {
-    boost::mutex::scoped_lock lock(_ioMutex);
+    std::lock_guard<std::mutex> lock(_ioMutex);
+
     if (_state == OPEN) {
         _outstream.flush();
         _outstream.close();
@@ -381,48 +378,6 @@ LogFile::removeLog()
 
 } // end of gnash namespace
 
-/// Used in logging.
-#ifdef HAVE_PTHREADS
-#include <pthread.h>
-#else
-# ifdef _WIN32
-extern "C" unsigned long int /* DWORD WINAPI */ GetCurrentThreadId();
-# else
-#include <sys/types.h>
-#include <unistd.h>
-# endif
-#endif
-
-namespace {
-
-inline unsigned long int /* pthread_t */ get_thread_id(void)
-{
-#ifdef HAVE_PTHREADS
-# ifdef __APPLE_CC__
-    return reinterpret_cast<unsigned long int>(pthread_self());
-# else
-    // This isn't a proper style C++ cast, but FreeBSD has a problem with
-    // static_cast for this as pthread_self() returns a pointer. We can
-    // use that too, this ID is only used for the log file to keep output
-    // from seperare threads clear.
-# ifdef _WIN32
-    return GetCurrentThreadId();
-#else
-    return (unsigned long int)pthread_self();
-#endif
-# endif 
-#else
-# ifdef _WIN32
-    return GetCurrentThreadId();
-# else
-    return static_cast<unsigned long int>(getpid());
-# endif
-#endif
-
-}
-
-} // anonymous namespace
-
 // Local Variables:
 // mode: C++
 // indent-tabs-mode: nil
diff --git a/libbase/log.h b/libbase/log.h
index 562e03c..a9dbaf4 100644
--- a/libbase/log.h
+++ b/libbase/log.h
@@ -27,7 +27,7 @@
 #include "dsodefs.h" // for DSOEXPORT
 
 #include <fstream>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <boost/format.hpp>
 
 // This is needed so we can print to the Android log file, which can
@@ -207,7 +207,7 @@ private:
     LogFile ();
 
     /// Mutex for locking I/O during logfile access.
-    boost::mutex _ioMutex;
+    std::mutex _ioMutex;
 
     /// Stream to write to stdout.
     std::ofstream _outstream;
diff --git a/libbase/sharedlib.cpp b/libbase/sharedlib.cpp
index 49f57f7..028eb55 100644
--- a/libbase/sharedlib.cpp
+++ b/libbase/sharedlib.cpp
@@ -43,7 +43,7 @@
 #endif
 
 #include <ltdl.h>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 
 #if defined(WIN32) || defined(_WIN32)
 int        lt_dlsetsearchpath   (const char *search_path);
diff --git a/libbase/sharedlib.h b/libbase/sharedlib.h
index c4dc20c..7802d70 100644
--- a/libbase/sharedlib.h
+++ b/libbase/sharedlib.h
@@ -23,7 +23,7 @@
 #include "gnashconfig.h"
 #endif
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <string>
 #include "dsodefs.h" // DSOEXPORT
 
@@ -48,7 +48,7 @@ namespace gnash {
 /// TODO: document this class
 class SharedLib
 {
-    typedef boost::mutex::scoped_lock scoped_lock;
+    typedef std::lock_guard<std::mutex> scoped_lock;
 
 public:
     // Typedefs for function pointers to keep the code readable
@@ -72,7 +72,7 @@ private:
     lt_dlhandle _dlhandle;
 #endif
     std::string _filespec;
-    boost::mutex _libMutex;    
+    std::mutex _libMutex;
 };
 
 } // end of gnash namespace
diff --git a/libbase/string_table.cpp b/libbase/string_table.cpp
index 5c64318..7477232 100644
--- a/libbase/string_table.cpp
+++ b/libbase/string_table.cpp
@@ -48,7 +48,7 @@ string_table::find(const std::string& t_f, bool 
insert_unfound)
 
                if (insert_unfound) {
                        // First we lock.
-                       boost::mutex::scoped_lock aLock(_lock);
+                       std::lock_guard<std::mutex> lock(_lock);
                        // Then we see if someone else managed to sneak past us.
                        i = _table.get<StringValue>().find(t_f);
                        // If they did, use that value.
@@ -65,14 +65,14 @@ string_table::find(const std::string& t_f, bool 
insert_unfound)
 string_table::key
 string_table::insert(const std::string& to_insert)
 {
-       boost::mutex::scoped_lock aLock(_lock);
+    std::lock_guard<std::mutex> lock(_lock);
     return already_locked_insert(to_insert);
 }
 
 void
 string_table::insert_group(const svt* l, std::size_t size)
 {
-       boost::mutex::scoped_lock aLock(_lock);
+    std::lock_guard<std::mutex> lock(_lock);
     for (std::size_t i = 0; i < size; ++i) {
         // Copy to avoid changing the original table.
         const svt s = l[i];
diff --git a/libbase/string_table.h b/libbase/string_table.h
index cf77fd0..0f14240 100644
--- a/libbase/string_table.h
+++ b/libbase/string_table.h
@@ -28,9 +28,9 @@
 #include <boost/multi_index/hashed_index.hpp>
 #include <boost/multi_index/identity.hpp>
 #include <boost/multi_index/member.hpp>
-#include <boost/thread.hpp>
 #include <string>
 #include <map>
+#include <mutex>
 #include "dsodefs.h"
 
 namespace gnash {
@@ -149,7 +149,7 @@ private:
 
        table _table;
        static const std::string _empty;
-       boost::mutex _lock;
+       std::mutex _lock;
        std::size_t _highestKey;
 
     std::map<key, key> _caseTable;
diff --git a/libcore/FreetypeGlyphsProvider.cpp 
b/libcore/FreetypeGlyphsProvider.cpp
index 2038197..63c002f 100644
--- a/libcore/FreetypeGlyphsProvider.cpp
+++ b/libcore/FreetypeGlyphsProvider.cpp
@@ -241,13 +241,13 @@ private:
 
 // statics
 FT_Library FreetypeGlyphsProvider::m_lib = nullptr;
-boost::mutex FreetypeGlyphsProvider::m_lib_mutex;
+std::mutex FreetypeGlyphsProvider::m_lib_mutex;
 
 // static private
 void
 FreetypeGlyphsProvider::init()
 {
-    boost::mutex::scoped_lock lock(m_lib_mutex);
+    std::lock_guard<std::mutex> lock(m_lib_mutex);
 
     if (m_lib) return; 
 
diff --git a/libcore/FreetypeGlyphsProvider.h b/libcore/FreetypeGlyphsProvider.h
index 6bc06a3..a6f047b 100644
--- a/libcore/FreetypeGlyphsProvider.h
+++ b/libcore/FreetypeGlyphsProvider.h
@@ -22,7 +22,7 @@
 
 #include <string>
 #include <memory> // for unique_ptr
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <cstdint>
 
 #ifdef USE_FREETYPE 
@@ -161,7 +161,7 @@ private:
     static void close();
 
     /// Mutex protecting FreeType library (for initialization basically)
-    static boost::mutex    m_lib_mutex;
+    static std::mutex    m_lib_mutex;
 
     /// FreeType library
     static FT_Library    m_lib;
diff --git a/libcore/LoadVariablesThread.cpp b/libcore/LoadVariablesThread.cpp
index 346d8a2..89c566d 100644
--- a/libcore/LoadVariablesThread.cpp
+++ b/libcore/LoadVariablesThread.cpp
@@ -170,14 +170,14 @@ LoadVariablesThread::LoadVariablesThread(const 
StreamProvider& sp,
 void
 LoadVariablesThread::cancel()
 {
-       boost::mutex::scoped_lock lock(_mutex);
+       std::lock_guard<std::mutex> lock(_mutex);
        _canceled = true;
 }
 
 bool
 LoadVariablesThread::cancelRequested()
 {
-       boost::mutex::scoped_lock lock(_mutex);
+       std::lock_guard<std::mutex> lock(_mutex);
        return _canceled;
 }
 
diff --git a/libcore/LoadVariablesThread.h b/libcore/LoadVariablesThread.h
index 7ed34e7..1b8f6ce 100644
--- a/libcore/LoadVariablesThread.h
+++ b/libcore/LoadVariablesThread.h
@@ -23,9 +23,10 @@
 
 #include <string>
 #include <map>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/mutex.hpp>
+#include <thread>
+#include <mutex>
 #include <functional> 
+#include <cassert>
 
 #include "URL.h" // for inlines
 
@@ -88,7 +89,7 @@ public:
        {
                assert(!_thread.get());
                assert(_stream.get());
-               _thread.reset(new boost::thread(
+               _thread.reset(new std::thread(
                 std::bind(LoadVariablesThread::execLoadingThread, this)));
        }
 
@@ -113,7 +114,7 @@ public:
        ///
        bool completed()
        {
-               boost::mutex::scoped_lock lock(_mutex);
+               std::lock_guard<std::mutex> lock(_mutex);
                if (  _completed && _thread.get() )
                {
                        _thread->join();
@@ -156,7 +157,7 @@ private:
        /// Mutex-protected mutator for thread completion
        void setCompleted()
        {
-               boost::mutex::scoped_lock lock(_mutex);
+               std::lock_guard<std::mutex> lock(_mutex);
                _completed = true;
                //log_debug("Completed");
        }
@@ -197,7 +198,7 @@ private:
 
         std::unique_ptr<IOChannel> _stream;
 
-        std::unique_ptr<boost::thread> _thread;
+        std::unique_ptr<std::thread> _thread;
 
        ValuesMap _vals;
 
@@ -205,7 +206,7 @@ private:
 
        bool _canceled;
 
-       boost::mutex _mutex;
+       std::mutex _mutex;
 };
 
 } // namespace gnash
diff --git a/libcore/MovieLibrary.h b/libcore/MovieLibrary.h
index 7234cf7..b8a98fc 100644
--- a/libcore/MovieLibrary.h
+++ b/libcore/MovieLibrary.h
@@ -26,7 +26,6 @@
 #include <string>
 #include <map>
 #include <algorithm>
-#include <boost/thread/thread.hpp>
 
 namespace gnash {
 
@@ -67,7 +66,7 @@ public:
     bool get(const std::string& key,
             boost::intrusive_ptr<movie_definition>* ret)
     {
-        boost::mutex::scoped_lock lock(_mapMutex);
+        std::lock_guard<std::mutex> lock(_mapMutex);
         LibraryContainer::iterator it = _map.find(key);
         if (it == _map.end()) return false;
         
@@ -88,14 +87,14 @@ public:
         temp.def = mov;
         temp.hitCount = 0;
 
-        boost::mutex::scoped_lock lock(_mapMutex);
+        std::lock_guard<std::mutex> lock(_mapMutex);
         _map[key] = temp;
     }
   
 
     void clear()
     {
-        boost::mutex::scoped_lock lock(_mapMutex);
+        std::lock_guard<std::mutex> lock(_mapMutex);
         _map.clear();
     }
   
@@ -118,14 +117,14 @@ private:
         }
 
         while (_map.size() > max) {
-            boost::mutex::scoped_lock lock(_mapMutex);
+            std::lock_guard<std::mutex> lock(_mapMutex);
             _map.erase(std::min_element(_map.begin(), _map.end(),
                         &findWorstHitCount));
         }
     
     }
 
-       mutable boost::mutex _mapMutex;
+    mutable std::mutex _mapMutex;
   
 };
 
diff --git a/libcore/MovieLoader.cpp b/libcore/MovieLoader.cpp
index 30f68ae..775367f 100644
--- a/libcore/MovieLoader.cpp
+++ b/libcore/MovieLoader.cpp
@@ -22,6 +22,7 @@
 #include <memory> 
 #include <functional>
 #include <algorithm>
+#include <thread>
 
 #include "log.h"
 #include "MovieFactory.h"
@@ -74,7 +75,7 @@ MovieLoader::processRequests()
         log_debug("processRequests: lock on requests: trying");
 #endif
 
-        boost::mutex::scoped_lock lock(_requestsMutex);
+        std::unique_lock<std::mutex> lock(_requestsMutex);
 
 #ifdef GNASH_DEBUG_LOCKING
         log_debug("processRequests: lock on requests: obtained");
@@ -155,8 +156,7 @@ MovieLoader::clear()
 #ifdef GNASH_DEBUG_LOCKING
         log_debug("clear: lock on requests: trying");
 #endif
-
-        boost::mutex::scoped_lock requestsLock(_requestsMutex);
+        std::unique_lock<std::mutex> requestsLock(_requestsMutex);
 
 #ifdef GNASH_DEBUG_LOCKING
         log_debug("clear: lock on requests: obtained");
@@ -166,7 +166,7 @@ MovieLoader::clear()
         log_debug("clear: lock on kill: trying");
 #endif
 
-        boost::mutex::scoped_lock lock(_killMutex);
+        std::unique_lock<std::mutex> lock(_killMutex);
 
 #ifdef GNASH_DEBUG_LOCKING
         log_debug("clear: lock on kill: obtained");
@@ -341,7 +341,7 @@ MovieLoader::processCompletedRequests()
         log_debug("processCompletedRequests: lock on requests: trying");
 #endif
 
-        boost::mutex::scoped_lock requestsLock(_requestsMutex);
+        std::unique_lock<std::mutex> requestsLock(_requestsMutex);
 
 #ifdef GNASH_DEBUG_LOCKING
         log_debug("processCompletedRequests: lock on requests: obtained");
@@ -401,7 +401,7 @@ MovieLoader::processCompletedRequests()
 bool
 MovieLoader::killed()
 {
-    boost::mutex::scoped_lock lock(_killMutex);
+    std::lock_guard<std::mutex> lock(_killMutex);
     return _killed;
 }
 
@@ -438,7 +438,7 @@ MovieLoader::loadMovie(const std::string& urlstr,
     log_debug("loadMovie: lock on requests: trying");
 #endif
 
-    boost::mutex::scoped_lock lock(_requestsMutex);
+    std::lock_guard<std::mutex> lock(_requestsMutex);
 
 #ifdef GNASH_DEBUG_LOCKING
     log_debug("loadMovie: lock on requests: obtained");
@@ -451,7 +451,7 @@ MovieLoader::loadMovie(const std::string& urlstr,
     // Start or wake up the loader thread 
     if (!_thread.get()) {
         _killed=false;
-        _thread.reset(new boost::thread(std::bind(
+        _thread.reset(new std::thread(std::bind(
                         &MovieLoader::processRequests, this)));
     }
     else {
@@ -481,7 +481,7 @@ MovieLoader::setReachable() const
     log_debug("setReachable: lock on requests: trying");
 #endif
 
-    boost::mutex::scoped_lock lock(_requestsMutex);
+    std::lock_guard<std::mutex> lock(_requestsMutex);
 
 #ifdef GNASH_DEBUG_LOCKING
     log_debug("setReachable: lock on requests: obtained");
diff --git a/libcore/MovieLoader.h b/libcore/MovieLoader.h
index a63bf8d..4f0a79e 100644
--- a/libcore/MovieLoader.h
+++ b/libcore/MovieLoader.h
@@ -23,8 +23,7 @@
 #include <string>
 #include <boost/ptr_container/ptr_list.hpp>
 #include <boost/noncopyable.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/condition.hpp>
+#include <condition_variable>
 
 #include "URL.h"
 #include "MovieClip.h" 
@@ -35,6 +34,9 @@ namespace gnash {
     class movie_definition;
     class as_object;
 }
+namespace std {
+    class thread;
+}
 
 namespace gnash {
 
@@ -131,7 +133,7 @@ private:
         ///
         bool getCompleted(boost::intrusive_ptr<movie_definition>& md) const
         {
-            boost::mutex::scoped_lock lock(_mutex);
+            std::lock_guard<std::mutex> lock(_mutex);
             md = _mdef;
             return _completed;
         }
@@ -139,14 +141,14 @@ private:
         /// Only check if request is completed
         bool pending() const
         {
-            boost::mutex::scoped_lock lock(_mutex);
+            std::lock_guard<std::mutex> lock(_mutex);
             return !_completed;
         }
 
         /// Only check if request is completed
         bool completed() const
         {
-            boost::mutex::scoped_lock lock(_mutex);
+            std::lock_guard<std::mutex> lock(_mutex);
             return _completed;
         }
 
@@ -159,7 +161,7 @@ private:
         ///
         void setCompleted(boost::intrusive_ptr<movie_definition> md)
         {
-            boost::mutex::scoped_lock lock(_mutex);
+            std::lock_guard<std::mutex> lock(_mutex);
             _mdef = md;
             _completed = true;
         }
@@ -170,7 +172,7 @@ private:
         bool _usePost;
         std::string _postData;
         boost::intrusive_ptr<movie_definition> _mdef;
-        mutable boost::mutex _mutex;
+        mutable std::mutex _mutex;
         as_object* _handler;
         bool _completed;
     };
@@ -179,7 +181,7 @@ private:
     typedef boost::ptr_list<Request> Requests;
     Requests _requests;
 
-       mutable boost::mutex _requestsMutex;
+    mutable std::mutex _requestsMutex;
 
     void processRequests();
     void processRequest(Request& r);
@@ -196,14 +198,14 @@ private:
 
     bool _killed;
 
-       boost::mutex _killMutex;
+    std::mutex _killMutex;
 
-    boost::condition _wakeup;
+    std::condition_variable _wakeup;
 
     /// needed for some facilities like find_character_by_target
     movie_root& _movieRoot;
 
-    std::unique_ptr<boost::thread> _thread;
+    std::unique_ptr<std::thread> _thread;
 };
 
 } // namespace gnash
diff --git a/libcore/asobj/NetStream_as.cpp b/libcore/asobj/NetStream_as.cpp
index 6383676..db3f2e1 100644
--- a/libcore/asobj/NetStream_as.cpp
+++ b/libcore/asobj/NetStream_as.cpp
@@ -27,7 +27,7 @@
 #include <functional>
 #include <algorithm>
 #include <cstdint>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 
 #include "RunResources.h"
 #include "CharacterProxy.h"
@@ -163,7 +163,7 @@ NetStream_as::processStatusNotifications()
     StatusCode code = invalidStatus;
 
     {
-        boost::mutex::scoped_lock lock(_statusMutex);
+        std::lock_guard<std::mutex> lock(_statusMutex);
         std::swap(code, _statusCode);
     }
 
@@ -180,7 +180,7 @@ void
 NetStream_as::setStatus(StatusCode status)
 {
     // Get a lock to avoid messing with statuses while processing them
-    boost::mutex::scoped_lock lock(_statusMutex);
+    std::lock_guard<std::mutex> lock(_statusMutex);
     _statusCode = status;
 }
 
@@ -204,7 +204,7 @@ NetStream_as::bufferLength()
 std::unique_ptr<image::GnashImage>
 NetStream_as::get_video()
 {
-    boost::mutex::scoped_lock lock(image_mutex);
+    std::lock_guard<std::mutex> lock(image_mutex);
 
     return std::move(_imageframe);
 }
@@ -888,7 +888,7 @@ NetStream_as::pushDecodedAudioFrames(std::uint32_t ts)
     while (1) {
 
         // FIXME: use services of BufferedAudioStreamer for this
-        boost::mutex::scoped_lock lock(_audioStreamer._audioQueueMutex);
+        std::unique_lock<std::mutex> lock(_audioStreamer._audioQueueMutex);
 
         // The sound_handler mixer will pull decoded
         // audio frames off the _audioQueue whenever 
@@ -1339,9 +1339,11 @@ NetStream_as::update()
     if ( ! _parser->getVideoInfo() ) 
     {
         // FIXME: use services of BufferedAudioStreamer for this
-        boost::mutex::scoped_lock lock(_audioStreamer._audioQueueMutex);
-        bool emptyAudioQueue = _audioStreamer._audioQueue.empty();
-        lock.unlock();
+        bool emptyAudioQueue;
+        {
+            std::lock_guard<std::mutex> lock(_audioStreamer._audioQueueMutex);
+            emptyAudioQueue = _audioStreamer._audioQueue.empty();
+        }
 
         if ( emptyAudioQueue )
         {
@@ -1433,7 +1435,7 @@ NetStream_as::bytesTotal ()
 NetStream_as::DecodingState
 NetStream_as::decodingStatus(DecodingState newstate)
 {
-    boost::mutex::scoped_lock lock(_state_mutex);
+    std::lock_guard<std::mutex> lock(_state_mutex);
 
     if (newstate != DEC_NONE) {
         _decoding_state = newstate;
@@ -1507,7 +1509,7 @@ BufferedAudioStreamer::fetch(std::int16_t* samples, 
unsigned int nSamples, bool&
     std::uint8_t* stream = reinterpret_cast<std::uint8_t*>(samples);
     int len = nSamples*2;
 
-    boost::mutex::scoped_lock lock(_audioQueueMutex);
+    std::lock_guard<std::mutex> lock(_audioQueueMutex);
 
 #if 0
     log_debug("audio_streamer called, audioQueue size: %d, "
@@ -1552,7 +1554,7 @@ BufferedAudioStreamer::fetch(std::int16_t* samples, 
unsigned int nSamples, bool&
 void
 BufferedAudioStreamer::push(CursoredBuffer* audio)
 {
-    boost::mutex::scoped_lock lock(_audioQueueMutex);
+    std::lock_guard<std::mutex> lock(_audioQueueMutex);
 
     if ( _auxStreamer )
     {
@@ -1570,7 +1572,7 @@ BufferedAudioStreamer::push(CursoredBuffer* audio)
 void
 BufferedAudioStreamer::cleanAudioQueue()
 {
-    boost::mutex::scoped_lock lock(_audioQueueMutex);
+    std::lock_guard<std::mutex> lock(_audioQueueMutex);
     _audioQueue.clear();
 }
 
diff --git a/libcore/asobj/NetStream_as.h b/libcore/asobj/NetStream_as.h
index 5e98fe8..46b671a 100644
--- a/libcore/asobj/NetStream_as.h
+++ b/libcore/asobj/NetStream_as.h
@@ -29,7 +29,7 @@
 #include <string>
 #include <boost/ptr_container/ptr_deque.hpp>
 #include <memory>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 
 #include "PlayHead.h" // for composition
 #include "Relay.h" // for ActiveRelay inheritance
@@ -131,7 +131,7 @@ public:
 
     /// The queue needs to be protected as sound_handler callback
     /// is invoked by a separate thread (dunno if it makes sense actually)
-    boost::mutex _audioQueueMutex;
+    std::mutex _audioQueueMutex;
 
     // Id of an attached audio streamer, 0 if none
     sound::InputStream* _auxStreamer;
@@ -509,7 +509,7 @@ private:
     std::uint32_t _bufferTime;
 
     // Mutex to insure we don't corrupt the image
-    boost::mutex image_mutex;
+    std::mutex image_mutex;
 
     // The image/videoframe which is given to the renderer
     std::unique_ptr<image::GnashImage> _imageframe;
@@ -530,7 +530,7 @@ private:
 
     // Mutex protecting _playback_state and _decoding_state
     // (not sure a single one is appropriate)
-    boost::mutex _state_mutex;
+    std::mutex _state_mutex;
     
     /// Video decoder
     std::unique_ptr<media::VideoDecoder> _videoDecoder;
@@ -570,7 +570,7 @@ private:
     StatusCode _statusCode;
 
     /// Mutex protecting _statusQueue
-    boost::mutex _statusMutex;
+    std::mutex _statusMutex;
 
 };
 
diff --git a/libcore/asobj/Sound_as.cpp b/libcore/asobj/Sound_as.cpp
index f9f222a..ec61955 100644
--- a/libcore/asobj/Sound_as.cpp
+++ b/libcore/asobj/Sound_as.cpp
@@ -24,7 +24,7 @@
 #include "Sound_as.h"
 
 #include <string>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <cstdint>
 #include <boost/optional.hpp>
 
@@ -239,7 +239,7 @@ private:
 
     bool _soundCompleted;
 
-    boost::mutex _soundCompletedMutex;
+    std::mutex _soundCompletedMutex;
 
     /// Thread-safe setter for _soundCompleted
     void markSoundCompleted(bool completed);
@@ -397,7 +397,7 @@ Sound_as::probeAudio()
         log_debug("Probing audio for end");
 #endif
 
-        boost::mutex::scoped_lock lock(_soundCompletedMutex);
+        std::lock_guard<std::mutex> lock(_soundCompletedMutex);
         if (_soundCompleted) {
             // when _soundCompleted is true we're NOT attached !
             // MediaParser may be still needed,
@@ -459,7 +459,7 @@ Sound_as::markReachableResources() const
 void
 Sound_as::markSoundCompleted(bool completed)
 {
-    boost::mutex::scoped_lock lock(_soundCompletedMutex);
+    std::lock_guard<std::mutex> lock(_soundCompletedMutex);
     _soundCompleted=completed;
 }
 
@@ -711,7 +711,7 @@ Sound_as::start(double secOff, int loops)
         {
             _startTime = secOff * 1000;
             std::uint32_t seekms = std::uint32_t(secOff * 1000);
-            // TODO: boost::mutex::scoped_lock parserLock(_parserMutex);
+            // TODO: std::lock_guard<std::mutex> parserLock(_parserMutex);
             bool seeked = _mediaParser->seek(seekms); // well, we try...
             log_debug("Seeked MediaParser to %d, returned: %d", seekms, 
seeked);
         }
diff --git a/libcore/asobj/XMLSocket_as.cpp b/libcore/asobj/XMLSocket_as.cpp
index 5d65bd8..4ff2fbd 100644
--- a/libcore/asobj/XMLSocket_as.cpp
+++ b/libcore/asobj/XMLSocket_as.cpp
@@ -20,7 +20,6 @@
 
 #include "XMLSocket_as.h"
 
-#include <boost/thread.hpp>
 #include <memory>
 #include <string>
 
diff --git a/libcore/parser/SWFMovieDefinition.cpp 
b/libcore/parser/SWFMovieDefinition.cpp
index 1d25874..9286f84 100644
--- a/libcore/parser/SWFMovieDefinition.cpp
+++ b/libcore/parser/SWFMovieDefinition.cpp
@@ -26,7 +26,8 @@
 
 #include <functional>
 #include <boost/version.hpp>
-#include <boost/thread.hpp>
+#include <thread>
+#include <mutex>
 #include <iomanip>
 #include <memory>
 #include <string>
@@ -89,7 +90,7 @@ SWFMovieLoader::~SWFMovieLoader()
 bool
 SWFMovieLoader::started() const
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
     return _thread.get() != nullptr;
 }
@@ -97,23 +98,17 @@ SWFMovieLoader::started() const
 bool
 SWFMovieLoader::isSelfThread() const
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
     if (!_thread.get()) {
         return false;
     }
-#if BOOST_VERSION < 103500
-    boost::thread this_thread;
-    return this_thread == *_thread;
-#else
-    return boost::this_thread::get_id() == _thread->get_id();
-#endif
-
+    return std::this_thread::get_id() == _thread->get_id();
 }
 
 // static..
 void
-SWFMovieLoader::execute(SWFMovieLoader& ml, SWFMovieDefinition* md)
+SWFMovieLoader::execute(SWFMovieDefinition* md)
 {
     md->read_all_swf();
 }
@@ -125,13 +120,12 @@ SWFMovieLoader::start()
     std::abort();
 #endif
     // don't start SWFMovieLoader thread() which rely
-    // on boost::thread() returning before they are executed. Therefore,
+    // on std::thread() returning before they are executed. Therefore,
     // we must employ locking.
     // Those tests do seem a bit redundant, though...
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
-    _thread.reset(new boost::thread(std::bind(
-                    execute, std::ref(*this), &_movie_def)));
+    _thread.reset(new std::thread(std::bind(execute, &_movie_def)));
 
     return true;
 }
@@ -170,7 +164,7 @@ void
 SWFMovieDefinition::addDisplayObject(std::uint16_t id, SWF::DefinitionTag* c)
 {
     assert(c);
-    boost::mutex::scoped_lock lock(_dictionaryMutex);
+    std::lock_guard<std::mutex> lock(_dictionaryMutex);
     _dictionary.addDisplayObject(id, c);
     addControlTag(c);
 }
@@ -178,7 +172,7 @@ SWFMovieDefinition::addDisplayObject(std::uint16_t id, 
SWF::DefinitionTag* c)
 SWF::DefinitionTag*
 SWFMovieDefinition::getDefinitionTag(std::uint16_t id) const
 {
-    boost::mutex::scoped_lock lock(_dictionaryMutex);
+    std::lock_guard<std::mutex> lock(_dictionaryMutex);
     boost::intrusive_ptr<SWF::DefinitionTag> ch = 
         _dictionary.getDisplayObject(id);
     return ch.get(); 
@@ -372,7 +366,7 @@ SWFMovieDefinition::completeLoad()
 bool
 SWFMovieDefinition::ensure_frame_loaded(size_t framenum) const
 {
-    boost::mutex::scoped_lock lock(_frames_loaded_mutex);
+    std::unique_lock<std::mutex> lock(_frames_loaded_mutex);
 
 #ifndef LOAD_MOVIES_IN_A_SEPARATE_THREAD
     return (framenum <= _frames_loaded);
@@ -505,7 +499,7 @@ SWFMovieDefinition::read_all_swf()
                 "SHOWFRAME tags found in stream. Pretending we loaded "
                 "all advertised frames"), m_frame_count, floaded);
         );
-        boost::mutex::scoped_lock lock(_frames_loaded_mutex);
+        std::lock_guard<std::mutex> lock(_frames_loaded_mutex);
         _frames_loaded = m_frame_count;
         // Notify any thread waiting on frame reached condition
         _frame_reached_condition.notify_all();
@@ -515,14 +509,14 @@ SWFMovieDefinition::read_all_swf()
 size_t
 SWFMovieDefinition::get_loading_frame() const
 {
-    boost::mutex::scoped_lock lock(_frames_loaded_mutex);
+    std::lock_guard<std::mutex> lock(_frames_loaded_mutex);
     return _frames_loaded;
 }
 
 void
 SWFMovieDefinition::incrementLoadedFrames()
 {
-    boost::mutex::scoped_lock lock(_frames_loaded_mutex);
+    std::lock_guard<std::mutex> lock(_frames_loaded_mutex);
 
     ++_frames_loaded;
 
@@ -558,7 +552,7 @@ SWFMovieDefinition::registerExport(const std::string& 
symbol,
 {
     assert(id);
 
-    boost::mutex::scoped_lock lock(_exportedResourcesMutex);
+    std::lock_guard<std::mutex> lock(_exportedResourcesMutex);
 #ifdef DEBUG_EXPORTS
     log_debug("%s registering export %s, %s", get_url(), symbol, id);
 #endif
@@ -569,8 +563,8 @@ SWFMovieDefinition::registerExport(const std::string& 
symbol,
 void
 SWFMovieDefinition::add_frame_name(const std::string& n)
 {
-    boost::mutex::scoped_lock lock1(_namedFramesMutex);
-    boost::mutex::scoped_lock lock2(_frames_loaded_mutex);
+    std::lock_guard<std::mutex> lock1(_namedFramesMutex);
+    std::lock_guard<std::mutex> lock2(_frames_loaded_mutex);
 
     _namedFrames.insert(std::make_pair(n, _frames_loaded));
 }
@@ -579,7 +573,7 @@ bool
 SWFMovieDefinition::get_labeled_frame(const std::string& label,
         size_t& frame_number) const
 {
-    boost::mutex::scoped_lock lock(_namedFramesMutex);
+    std::lock_guard<std::mutex> lock(_namedFramesMutex);
     NamedFrameMap::const_iterator it = _namedFrames.find(label);
     if (it == _namedFrames.end()) return false;
     frame_number = it->second;
@@ -606,7 +600,7 @@ 
SWFMovieDefinition::set_jpeg_loader(std::unique_ptr<image::JpegInput> j_in)
 std::uint16_t
 SWFMovieDefinition::exportID(const std::string& symbol) const
 {
-    boost::mutex::scoped_lock lock(_exportedResourcesMutex);
+    std::lock_guard<std::mutex> lock(_exportedResourcesMutex);
     Exports::const_iterator it = _exportTable.find(symbol);
     return (it == _exportTable.end()) ? 0 : it->second;
 }
diff --git a/libcore/parser/SWFMovieDefinition.h 
b/libcore/parser/SWFMovieDefinition.h
index d154819..21cd2f2 100644
--- a/libcore/parser/SWFMovieDefinition.h
+++ b/libcore/parser/SWFMovieDefinition.h
@@ -33,9 +33,8 @@
 #include <set> 
 #include <string>
 #include <memory> 
-#include <boost/thread/thread.hpp>
-#include <boost/thread/condition.hpp>
-#include <memory>
+#include <mutex>
+#include <condition_variable>
 
 #include "movie_definition.h" // for inheritance
 #include "DefinitionTag.h" // for boost::intrusive_ptr visibility of dtor
@@ -58,6 +57,9 @@ namespace gnash {
     class RunResources;
     class Font;
 }
+namespace std {
+    class thread;
+}
 
 namespace gnash {
 
@@ -88,11 +90,11 @@ private:
 
     SWFMovieDefinition& _movie_def;
 
-    mutable boost::mutex _mutex;
-    std::unique_ptr<boost::thread> _thread;
+    mutable std::mutex _mutex;
+    std::unique_ptr<std::thread> _thread;
 
     /// Entry point for the actual thread
-    static void execute(SWFMovieLoader& ml, SWFMovieDefinition* md);
+    static void execute(SWFMovieDefinition* md);
 
 };
 
@@ -222,7 +224,7 @@ public:
     /// NOTE: this method locks _bytes_loaded_mutex
     ///
     size_t get_bytes_loaded() const {
-        boost::mutex::scoped_lock lock(_bytes_loaded_mutex);
+        std::lock_guard<std::mutex> lock(_bytes_loaded_mutex);
         return _bytes_loaded;
     }
 
@@ -276,7 +278,7 @@ public:
     // See dox in movie_definition.h
     void addControlTag(boost::intrusive_ptr<SWF::ControlTag> tag) {
         assert(tag);
-        boost::mutex::scoped_lock lock(_frames_loaded_mutex);
+        std::lock_guard<std::mutex> lock(_frames_loaded_mutex);
         m_playlist[_frames_loaded].push_back(tag);
     }
 
@@ -298,7 +300,7 @@ public:
     virtual const PlayList* getPlaylist(size_t frame_number) const {
 
 #ifndef NDEBUG
-        boost::mutex::scoped_lock lock(_frames_loaded_mutex);
+        std::lock_guard<std::mutex> lock(_frames_loaded_mutex);
         assert(frame_number <= _frames_loaded);
 #endif
 
@@ -403,7 +405,7 @@ private:
     CharacterDictionary    _dictionary;
 
     /// Mutex protecting _dictionary
-    mutable boost::mutex _dictionaryMutex;
+    mutable std::mutex _dictionaryMutex;
 
     typedef std::map<int, boost::intrusive_ptr<Font> > FontMap;
     FontMap m_fonts;
@@ -424,7 +426,7 @@ private:
     NamedFrameMap _namedFrames;
 
     // Mutex protecting access to _namedFrames
-    mutable boost::mutex _namedFramesMutex;
+    mutable std::mutex _namedFramesMutex;
 
     /// Allow mapping symbol to id case insensitively.
     typedef std::map<std::string, std::uint16_t,
@@ -434,7 +436,7 @@ private:
     Exports _exportTable;
 
     // Mutex protecting access to the export map.
-    mutable boost::mutex _exportedResourcesMutex;
+    mutable std::mutex _exportedResourcesMutex;
 
     /// Movies we import from; hold a ref on these,
     /// to keep them alive
@@ -454,10 +456,10 @@ private:
     /// This is needed because the loader thread will
     /// increment this number, while the virtual machine
     /// thread will read it.
-    mutable boost::mutex _frames_loaded_mutex;
+    mutable std::mutex _frames_loaded_mutex;
 
     /// A semaphore to signal load of a specific frame
-    mutable boost::condition _frame_reached_condition;
+    mutable std::condition_variable _frame_reached_condition;
 
     /// Set this to trigger signaling of loaded frame
     //
@@ -473,7 +475,7 @@ private:
     /// This is needed because the loader thread will
     /// increment this number, while the virtual machine
     /// thread will read it.
-    mutable boost::mutex _bytes_loaded_mutex;
+    mutable std::mutex _bytes_loaded_mutex;
 
     int m_loading_sound_stream;
 
@@ -508,7 +510,7 @@ private:
     /// NOTE: this method locks _bytes_loaded_mutex
     void setBytesLoaded(unsigned long bytes)
     {
-        boost::mutex::scoped_lock lock(_bytes_loaded_mutex);
+        std::lock_guard<std::mutex> lock(_bytes_loaded_mutex);
         _bytes_loaded=bytes;
     }
 
diff --git a/libcore/swf/DefineVideoStreamTag.cpp 
b/libcore/swf/DefineVideoStreamTag.cpp
index 7da4eea..37e4484 100644
--- a/libcore/swf/DefineVideoStreamTag.cpp
+++ b/libcore/swf/DefineVideoStreamTag.cpp
@@ -18,7 +18,7 @@
 
 #include "DefineVideoStreamTag.h"
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <boost/ptr_container/ptr_vector.hpp>
 #include <memory> 
 #include <vector> 
@@ -107,7 +107,7 @@ void
 DefineVideoStreamTag::addVideoFrameTag(
         std::unique_ptr<media::EncodedVideoFrame> frame)
 {
-       boost::mutex::scoped_lock lock(_video_mutex);
+       std::lock_guard<std::mutex> lock(_video_mutex);
     _video_frames.push_back(frame.release());
 }
 
diff --git a/libcore/swf/DefineVideoStreamTag.h 
b/libcore/swf/DefineVideoStreamTag.h
index 9f20a86..2185dd5 100644
--- a/libcore/swf/DefineVideoStreamTag.h
+++ b/libcore/swf/DefineVideoStreamTag.h
@@ -19,7 +19,7 @@
 #ifndef GNASH_SWF_DEFINEVIDEOSTREAMTAG_H
 #define GNASH_SWF_DEFINEVIDEOSTREAMTAG_H
 
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <boost/ptr_container/ptr_vector.hpp>
 #include <memory> 
 #include <vector> 
@@ -116,7 +116,7 @@ public:
     template<typename T>
     size_t visitSlice(const T& t, std::uint32_t from, std::uint32_t to) const {
 
-        boost::mutex::scoped_lock lock(_video_mutex);
+        std::lock_guard<std::mutex> lock(_video_mutex);
 
         // It's assumed that frame numbers are in order.
         EmbeddedFrames::const_iterator lower = std::lower_bound(
@@ -175,7 +175,7 @@ private:
        SWFRect m_bound;
 
     // Mutable for locking in const member functions.
-       mutable boost::mutex _video_mutex;
+       mutable std::mutex _video_mutex;
        
        EmbeddedFrames _video_frames;
 
diff --git a/libmedia/AudioDecoderSpeex.cpp b/libmedia/AudioDecoderSpeex.cpp
index 9367c0a..86157fd 100644
--- a/libmedia/AudioDecoderSpeex.cpp
+++ b/libmedia/AudioDecoderSpeex.cpp
@@ -23,6 +23,7 @@
 
 #include <functional>
 #include <boost/checked_delete.hpp>
+#include <boost/utility.hpp> // noncopyable
 #include <cstdint> // For C99 int types
 
 #ifdef RESAMPLING_SPEEX
diff --git a/libmedia/FLVParser.cpp b/libmedia/FLVParser.cpp
index 152f72d..b0e17b1 100644
--- a/libmedia/FLVParser.cpp
+++ b/libmedia/FLVParser.cpp
@@ -18,6 +18,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
+#include <string>
+#include <iosfwd>
 
 #include "FLVParser.h"
 #include "log.h"
@@ -27,8 +29,6 @@
 #include "SimpleBuffer.h"
 #include "GnashAlgorithm.h"
 
-#include <string>
-#include <iosfwd>
 
 // Define the following macro the have seek() operations printed
 //#define GNASH_DEBUG_SEEK 1
@@ -69,7 +69,7 @@ bool
 FLVParser::seek(std::uint32_t& time)
 {
 
-       boost::mutex::scoped_lock streamLock(_streamMutex);
+       std::lock_guard<std::mutex> streamLock(_streamMutex);
        // we might obtain this lock while the parser is pushing the last
        // encoded frame on the queue, or while it is waiting on the wakeup
        // condition
@@ -295,7 +295,7 @@ FLVParser::parseNextTag(bool index_only)
 {
        // lock the stream while reading from it, so actionscript
        // won't mess with the parser on seek  or on getBytesLoaded
-       boost::mutex::scoped_lock streamLock(_streamMutex);
+       std::unique_lock<std::mutex> streamLock(_streamMutex);
 
        if ( index_only && _indexingCompleted ) return false; 
        if ( _parsingComplete ) return false;
@@ -338,7 +338,7 @@ FLVParser::parseNextTag(bool index_only)
                completed = true;
 
         // update bytes loaded
-        boost::mutex::scoped_lock lock(_bytesLoadedMutex);
+        std::lock_guard<std::mutex> lock(_bytesLoadedMutex);
                _bytesLoaded = _stream->tell(); 
                return false;
        }
@@ -356,7 +356,7 @@ FLVParser::parseNextTag(bool index_only)
        }
 
        if ( position > _bytesLoaded ) {
-               boost::mutex::scoped_lock lock(_bytesLoadedMutex);
+               std::lock_guard<std::mutex> lock(_bytesLoadedMutex);
                _bytesLoaded = position;
        }
 
@@ -444,7 +444,7 @@ FLVParser::parseNextTag(bool index_only)
                        log_error(_("Corrupt FLV: Meta tag unterminated!"));
                }
 
-               boost::mutex::scoped_lock lock(_metaTagsMutex);
+               std::lock_guard<std::mutex> lock(_metaTagsMutex);
                _metaTags.insert(std::make_pair(flvtag.timestamp, 
std::move(metaTag)));
        }
        else
@@ -508,7 +508,7 @@ FLVParser::getUInt24(std::uint8_t* in)
 std::uint64_t
 FLVParser::getBytesLoaded() const
 {
-       boost::mutex::scoped_lock lock(_bytesLoadedMutex);
+       std::lock_guard<std::mutex> lock(_bytesLoadedMutex);
        return _bytesLoaded;
 }
 
@@ -565,7 +565,7 @@ FLVParser::readVideoFrame(std::uint32_t dataSize, 
std::uint32_t timestamp)
 void
 FLVParser::fetchMetaTags(OrderedMetaTags& tags, std::uint64_t ts)
 {
-       boost::mutex::scoped_lock lock(_metaTagsMutex);
+       std::lock_guard<std::mutex> lock(_metaTagsMutex);
        if (!_metaTags.empty()) {
         MetaTags::iterator it = _metaTags.upper_bound(ts);
 
diff --git a/libmedia/FLVParser.h b/libmedia/FLVParser.h
index ef04dde..2349b31 100644
--- a/libmedia/FLVParser.h
+++ b/libmedia/FLVParser.h
@@ -24,13 +24,14 @@
 #ifndef GNASH_FLVPARSER_H
 #define GNASH_FLVPARSER_H
 
-#include "dsodefs.h"
-#include "MediaParser.h" // for inheritance
-
 #include <memory>
 #include <map>
+#include <mutex>
 
-#include <boost/thread/mutex.hpp>
+#include <boost/utility.hpp> // noncopyable
+
+#include "dsodefs.h"
+#include "MediaParser.h" // for inheritance
 
 namespace gnash {
 namespace media {
@@ -281,7 +282,7 @@ private:
 
     MetaTags _metaTags;
 
-    boost::mutex _metaTagsMutex;
+    std::mutex _metaTagsMutex;
 };
 
 } // end of gnash::media namespace
diff --git a/libmedia/MediaParser.cpp b/libmedia/MediaParser.cpp
index 4cdab26..c09a9f5 100644
--- a/libmedia/MediaParser.cpp
+++ b/libmedia/MediaParser.cpp
@@ -22,6 +22,7 @@
 #include "MediaParser.h"
 
 #include <functional>
+#include <thread>
 
 #include "log.h"
 #include "GnashSleep.h" // for usleep.
@@ -51,7 +52,7 @@ MediaParser::startParserThread()
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
        log_debug("Starting MediaParser thread");
-       _parserThread.reset(new boost::thread(
+       _parserThread.reset(new std::thread(
                 std::bind(parserLoopStarter, this)));
 #endif
 }
@@ -60,7 +61,7 @@ std::uint64_t
 MediaParser::getBufferLength() const
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
-       boost::mutex::scoped_lock lock(_qMutex);
+       std::lock_guard<std::mutex> lock(_qMutex);
 #endif
        return getBufferLengthNoLock();
 }
@@ -70,7 +71,7 @@ bool
 MediaParser::isBufferEmpty() const
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
-       boost::mutex::scoped_lock lock(_qMutex);
+       std::lock_guard<std::mutex> lock(_qMutex);
 #endif
        return _videoFrames.empty() && _audioFrames.empty();
 }
@@ -146,7 +147,7 @@ bool
 MediaParser::nextFrameTimestamp(std::uint64_t& ts) const
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
-    boost::mutex::scoped_lock lock(_qMutex);
+    std::lock_guard<std::mutex> lock(_qMutex);
 #else // ndef LOAD_MEDIA_IN_A_SEPARATE_THREAD
     while (!parsingCompleted() && _videoInfo.get() && _videoFrames.empty())
     {
@@ -186,7 +187,7 @@ bool
 MediaParser::nextVideoFrameTimestamp(std::uint64_t& ts) const
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
-       boost::mutex::scoped_lock lock(_qMutex);
+       std::lock_guard<std::mutex> lock(_qMutex);
 #endif // def LOAD_MEDIA_IN_A_SEPARATE_THREAD
        const EncodedVideoFrame* ef = peekNextVideoFrame();
        if ( ! ef ) return false;
@@ -198,7 +199,7 @@ std::unique_ptr<EncodedVideoFrame>
 MediaParser::nextVideoFrame()
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
-       boost::mutex::scoped_lock lock(_qMutex);
+       std::lock_guard<std::mutex> lock(_qMutex);
 #else // ndef LOAD_MEDIA_IN_A_SEPARATE_THREAD
        while (!parsingCompleted() && _videoInfo.get() && _videoFrames.empty())
        {
@@ -221,7 +222,7 @@ std::unique_ptr<EncodedAudioFrame>
 MediaParser::nextAudioFrame()
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
-       boost::mutex::scoped_lock lock(_qMutex);
+       std::lock_guard<std::mutex> lock(_qMutex);
 #else // ndef LOAD_MEDIA_IN_A_SEPARATE_THREAD
        while (!parsingCompleted() && _audioInfo.get() && _audioFrames.empty())
        {
@@ -244,7 +245,7 @@ bool
 MediaParser::nextAudioFrameTimestamp(std::uint64_t& ts) const
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
-       boost::mutex::scoped_lock lock(_qMutex);
+       std::lock_guard<std::mutex> lock(_qMutex);
 #endif // def LOAD_MEDIA_IN_A_SEPARATE_THREAD
        const EncodedAudioFrame* ef = peekNextAudioFrame();
        if ( ! ef ) return false;
@@ -300,7 +301,7 @@ void
 MediaParser::clearBuffers()
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
-       boost::mutex::scoped_lock lock(_qMutex);
+       std::lock_guard<std::mutex> lock(_qMutex);
 #endif
 
        for (VideoFrames::iterator i=_videoFrames.begin(),
@@ -325,7 +326,7 @@ void
 MediaParser::pushEncodedAudioFrame(std::unique_ptr<EncodedAudioFrame> frame)
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
-       boost::mutex::scoped_lock lock(_qMutex);
+    std::unique_lock<std::mutex> lock(_qMutex);
 #endif
        
     // Find location to insert this new frame to, so that
@@ -365,7 +366,7 @@ void
 MediaParser::pushEncodedVideoFrame(std::unique_ptr<EncodedVideoFrame> frame)
 {
 #ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
-       boost::mutex::scoped_lock lock(_qMutex);
+       std::unique_lock<std::mutex> lock(_qMutex);
 #endif
 
     // Find location to insert this new frame to, so that
@@ -400,7 +401,7 @@ 
MediaParser::pushEncodedVideoFrame(std::unique_ptr<EncodedVideoFrame> frame)
 }
 
 void
-MediaParser::waitIfNeeded(boost::mutex::scoped_lock& lock) 
+MediaParser::waitIfNeeded(std::unique_lock<std::mutex>& lock)
 {
        //  We hold a lock on the queue here...
        bool pc=parsingCompleted();
@@ -442,7 +443,7 @@ MediaParser::parserLoop()
                // TODO: have a setParsingComplete() function
                //       exposed in base class for taking care
                //       of this on appropriate time.
-               boost::mutex::scoped_lock lock(_qMutex);
+               std::unique_lock<std::mutex> lock(_qMutex);
                waitIfNeeded(lock);
        }
 }
diff --git a/libmedia/MediaParser.h b/libmedia/MediaParser.h
index c433f5e..40d5614 100644
--- a/libmedia/MediaParser.h
+++ b/libmedia/MediaParser.h
@@ -20,8 +20,8 @@
 #ifndef GNASH_MEDIAPARSER_H
 #define GNASH_MEDIAPARSER_H
 
-#include <boost/thread/thread.hpp>
-#include <boost/thread/condition.hpp>
+#include <mutex>
+#include <condition_variable>
 #include <memory>
 #include <deque>
 #include <map>
@@ -41,6 +41,9 @@ namespace gnash {
         struct Id3Info;
     }
 }
+namespace std {
+    class thread;
+}
 
 namespace gnash {
 namespace media {
@@ -485,7 +488,7 @@ public:
        /// Return the time we want the parser thread to maintain in the buffer
        DSOEXPORT std::uint64_t getBufferTime() const
        {
-               boost::mutex::scoped_lock lock(_bufferTimeMutex);
+               std::lock_guard<std::mutex> lock(_bufferTimeMutex);
                return _bufferTime;
        }
 
@@ -496,7 +499,7 @@ public:
        ///
        DSOEXPORT void setBufferTime(std::uint64_t t)
        {
-               boost::mutex::scoped_lock lock(_bufferTimeMutex);
+               std::lock_guard<std::mutex> lock(_bufferTimeMutex);
                _bufferTime=t;
        }
 
@@ -661,7 +664,7 @@ protected:
 
        /// The stream used to access the file
        std::unique_ptr<IOChannel> _stream;
-       mutable boost::mutex _streamMutex;
+       mutable std::mutex _streamMutex;
 
        static void parserLoopStarter(MediaParser* mp)
        {
@@ -680,32 +683,32 @@ protected:
 
        bool parserThreadKillRequested() const
        {
-               boost::mutex::scoped_lock lock(_parserThreadKillRequestMutex);
+               std::lock_guard<std::mutex> lock(_parserThreadKillRequestMutex);
                return _parserThreadKillRequested;
        }
 
        std::uint64_t _bufferTime;
-       mutable boost::mutex _bufferTimeMutex;
+       mutable std::mutex _bufferTimeMutex;
 
-       std::unique_ptr<boost::thread> _parserThread;
-       mutable boost::mutex _parserThreadKillRequestMutex;
+       std::unique_ptr<std::thread> _parserThread;
+       mutable std::mutex _parserThreadKillRequestMutex;
        bool _parserThreadKillRequested;
-       boost::condition _parserThreadWakeup;
+       std::condition_variable _parserThreadWakeup;
 
        /// Wait on the _parserThreadWakeup condition if buffer is full
        /// or parsing was completed.
        /// 
        /// Callers *must* pass a locked lock on _qMutex
        ///
-       void waitIfNeeded(boost::mutex::scoped_lock& qMutexLock);
+       void waitIfNeeded(std::unique_lock<std::mutex>& qMutexLock);
 
        void wakeupParserThread();
 
        /// mutex protecting access to the a/v encoded frames queues
-       mutable boost::mutex _qMutex;
+       mutable std::mutex _qMutex;
 
        /// Mutex protecting _bytesLoaded (read by main, set by parser)
-       mutable boost::mutex _bytesLoadedMutex;
+       mutable std::mutex _bytesLoadedMutex;
 
        /// Method to check if buffer is full w/out locking the _qMutex
        //
@@ -757,7 +760,7 @@ private:
 
        void requestParserThreadKill()
        {
-               boost::mutex::scoped_lock lock(_parserThreadKillRequestMutex);
+               std::lock_guard<std::mutex> lock(_parserThreadKillRequestMutex);
                _parserThreadKillRequested=true;
                _parserThreadWakeup.notify_all();
        }
diff --git a/libmedia/ffmpeg/MediaParserFfmpeg.cpp 
b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
index 0550445..d05184a 100644
--- a/libmedia/ffmpeg/MediaParserFfmpeg.cpp
+++ b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
@@ -96,7 +96,7 @@ MediaParserFfmpeg::seek(std::uint32_t& pos)
 {
     // lock the stream while reading from it, so actionscript
     // won't mess with the parser on seek  or on getBytesLoaded
-    boost::mutex::scoped_lock streamLock(_streamMutex);
+    std::lock_guard<std::mutex> streamLock(_streamMutex);
 
     // NOTE: seeking when timestamps are unknown is a pain
     // See https://savannah.gnu.org/bugs/index.php?33085
@@ -238,7 +238,7 @@ MediaParserFfmpeg::parseNextFrame()
 {
        // lock the stream while reading from it, so actionscript
        // won't mess with the parser on seek  or on getBytesLoaded
-       boost::mutex::scoped_lock streamLock(_streamMutex);
+       std::lock_guard<std::mutex> streamLock(_streamMutex);
 
        if ( _parsingComplete )
        {
diff --git a/libmedia/gst/MediaParserGst.cpp b/libmedia/gst/MediaParserGst.cpp
index 6fc6b15..db3c288 100644
--- a/libmedia/gst/MediaParserGst.cpp
+++ b/libmedia/gst/MediaParserGst.cpp
@@ -28,6 +28,7 @@
 #include "swfdec_codec_gst.h"
 #include <iostream>
 #include <fstream>
+#include <mutex>
 
 #define PUSHBUF_SIZE 1024
 
@@ -121,7 +122,7 @@ MediaParserGst::getId3Info() const
 bool
 MediaParserGst::parseNextChunk()
 {
-    boost::mutex::scoped_lock streamLock(_streamMutex);
+    std::lock_guard<std::mutex> streamLock(_streamMutex);
 
     if (emitEncodedFrames()) {
         return true;
@@ -138,7 +139,7 @@ MediaParserGst::parseNextChunk()
     pushGstBuffer();
 
     {
-        boost::mutex::scoped_lock lock(_bytesLoadedMutex);
+        std::lock_guard<std::mutex> lock(_bytesLoadedMutex);
         _bytesLoaded = _stream->tell();
     }
 
@@ -151,7 +152,7 @@ MediaParserGst::parseNextChunk()
 std::uint64_t
 MediaParserGst::getBytesLoaded() const
 {
-    boost::mutex::scoped_lock lock(_bytesLoadedMutex);
+    std::lock_guard<std::mutex> lock(_bytesLoadedMutex);
     return _bytesLoaded;
 }
 
diff --git a/libmedia/gst/MediaParserGst.h b/libmedia/gst/MediaParserGst.h
index d1aef73..4c08419 100644
--- a/libmedia/gst/MediaParserGst.h
+++ b/libmedia/gst/MediaParserGst.h
@@ -25,6 +25,7 @@
 #include <queue>
 #include <gst/gst.h>
 #include <boost/optional.hpp>
+#include <boost/utility.hpp> // noncopyable
 
 #include "MediaParser.h" // for inheritance
 #include "ClockTime.h"
diff --git a/libsound/EmbedSound.cpp b/libsound/EmbedSound.cpp
index 78dab45..5ec67fe 100644
--- a/libsound/EmbedSound.cpp
+++ b/libsound/EmbedSound.cpp
@@ -45,7 +45,7 @@ EmbedSound::EmbedSound(std::unique_ptr<SimpleBuffer> data,
 void
 EmbedSound::clearInstances()
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
     _soundInstances.clear();
 }
 
@@ -64,7 +64,7 @@ EmbedSound::createInstance(media::MediaHandler& mh, unsigned 
int inPoint,
     std::unique_ptr<EmbedSoundInst> ret(
         new EmbedSoundInst(*this, mh, inPoint, outPoint, envelopes, 
loopCount));
 
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
 
     // Push the sound onto the playing sounds container.
     _soundInstances.push_back(ret.get());
@@ -80,7 +80,7 @@ EmbedSound::~EmbedSound()
 void
 EmbedSound::eraseActiveSound(EmbedSoundInst* inst)
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
 
     Instances::iterator it = std::find( _soundInstances.begin(),
             _soundInstances.end(), inst);
@@ -96,28 +96,28 @@ EmbedSound::eraseActiveSound(EmbedSoundInst* inst)
 bool
 EmbedSound::isPlaying() const
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
     return !_soundInstances.empty();
 }
 
 size_t
 EmbedSound::numPlayingInstances() const
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
     return _soundInstances.size();
 }
 
 EmbedSoundInst*
 EmbedSound::firstPlayingInstance() const
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
     return _soundInstances.front();
 }
 
 void
 EmbedSound::getPlayingInstances(std::vector<InputStream*>& to) const
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
     for (Instances::const_iterator i=_soundInstances.begin(), 
e=_soundInstances.end();
             i!=e; ++i)
     {
diff --git a/libsound/EmbedSound.h b/libsound/EmbedSound.h
index 426d4dc..9324c39 100644
--- a/libsound/EmbedSound.h
+++ b/libsound/EmbedSound.h
@@ -23,8 +23,9 @@
 #include <vector>
 #include <memory> // for unique_ptr (composition)
 #include <cassert>
-#include <boost/thread/mutex.hpp>
 #include <memory>
+#include <mutex>
+#include <list>
 
 #include "SimpleBuffer.h" // for composition
 #include "SoundInfo.h" // for composition
@@ -186,7 +187,7 @@ private:
 
     /// Mutex protecting access to _soundInstances
     //
-    mutable boost::mutex _soundInstancesMutex;
+    mutable std::mutex _soundInstancesMutex;
 };
 
 } // gnash.sound namespace 
diff --git a/libsound/StreamingSoundData.cpp b/libsound/StreamingSoundData.cpp
index 8fa8d20..f5b9ef0 100644
--- a/libsound/StreamingSoundData.cpp
+++ b/libsound/StreamingSoundData.cpp
@@ -63,7 +63,7 @@ StreamingSoundData::playingBlock() const
 void
 StreamingSoundData::clearInstances()
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
     _soundInstances.clear();
 }
 
@@ -79,7 +79,7 @@ StreamingSoundData::createInstance(media::MediaHandler& mh, 
unsigned long block)
 {
     std::unique_ptr<StreamingSound> ret(new StreamingSound(*this, mh, block));
 
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
 
     // Push the sound onto the playing sounds container.
     _soundInstances.push_back(ret.get());
@@ -95,7 +95,7 @@ StreamingSoundData::~StreamingSoundData()
 void
 StreamingSoundData::eraseActiveSound(InputStream* inst)
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
 
     Instances::iterator it = std::find(
             _soundInstances.begin(),
@@ -114,28 +114,28 @@ StreamingSoundData::eraseActiveSound(InputStream* inst)
 bool
 StreamingSoundData::isPlaying() const
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
     return !_soundInstances.empty();
 }
 
 size_t
 StreamingSoundData::numPlayingInstances() const
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
     return _soundInstances.size();
 }
 
 InputStream*
 StreamingSoundData::firstPlayingInstance() const
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
     return _soundInstances.front();
 }
 
 void
 StreamingSoundData::getPlayingInstances(std::vector<InputStream*>& to) const
 {
-    boost::mutex::scoped_lock lock(_soundInstancesMutex);
+    std::lock_guard<std::mutex> lock(_soundInstancesMutex);
     for (Instances::const_iterator i=_soundInstances.begin(),
             e=_soundInstances.end();
             i!=e; ++i)
diff --git a/libsound/StreamingSoundData.h b/libsound/StreamingSoundData.h
index 0113e2d..6f3f52a 100644
--- a/libsound/StreamingSoundData.h
+++ b/libsound/StreamingSoundData.h
@@ -21,10 +21,10 @@
 #define SOUND_STREAMING_SOUND_DATA_H
 
 #include <vector>
-#include <memory> 
 #include <cassert>
-#include <boost/thread/mutex.hpp>
+#include <list>
 #include <memory>
+#include <mutex>
 #include <boost/ptr_container/ptr_vector.hpp>
 
 #include "SoundInfo.h" 
@@ -181,7 +181,7 @@ private:
     Instances _soundInstances;
 
     /// Mutex protecting access to _soundInstances
-    mutable boost::mutex _soundInstancesMutex;
+    mutable std::mutex _soundInstancesMutex;
 
     boost::ptr_vector<SimpleBuffer> _buffers;
 
diff --git a/libsound/aos4/sound_handler_ahi.cpp 
b/libsound/aos4/sound_handler_ahi.cpp
index 93444eb..c05c8fc 100644
--- a/libsound/aos4/sound_handler_ahi.cpp
+++ b/libsound/aos4/sound_handler_ahi.cpp
@@ -81,7 +81,7 @@ AOS4_sound_handler::AOS4_sound_handler(media::MediaHandler* m)
 
 AOS4_sound_handler::~AOS4_sound_handler()
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
        // on class destruction we must kill the Audio thread
        _closing = true;
@@ -178,7 +178,7 @@ AOS4_sound_handler::closeAudio()
 void
 AOS4_sound_handler::reset()
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::delete_all_sounds();
     sound_handler::stop_all_sounds();
 }
@@ -187,7 +187,7 @@ int
 AOS4_sound_handler::create_sound(std::unique_ptr<SimpleBuffer> data,
                                 std::unique_ptr<media::SoundInfo> sinfo)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::create_sound(data, sinfo);
 }
 
@@ -197,14 +197,14 @@ AOS4_sound_handler::addSoundBlock(unsigned char* data,
         int streamId)
 {
 
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::addSoundBlock(data, dataBytes, nSamples, streamId);
 }
 
 void
 AOS4_sound_handler::stop_sound(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::stop_sound(soundHandle);
 }
 
@@ -212,14 +212,14 @@ AOS4_sound_handler::stop_sound(int soundHandle)
 void
 AOS4_sound_handler::delete_sound(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::delete_sound(soundHandle);
 }
 
 void
 AOS4_sound_handler::stop_all_sounds()
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::stop_all_sounds();
 }
 
@@ -227,7 +227,7 @@ AOS4_sound_handler::stop_all_sounds()
 int
 AOS4_sound_handler::get_volume(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::get_volume(soundHandle);
 }
 
@@ -235,28 +235,28 @@ AOS4_sound_handler::get_volume(int soundHandle)
 void
 AOS4_sound_handler::set_volume(int soundHandle, int volume)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::set_volume(soundHandle, volume);
 }
 
 media::SoundInfo*
 AOS4_sound_handler::get_sound_info(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::get_sound_info(soundHandle);
 }
 
 unsigned int
 AOS4_sound_handler::get_duration(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::get_duration(soundHandle);
 }
 
 unsigned int
 AOS4_sound_handler::tell(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::tell(soundHandle);
 }
 
@@ -275,7 +275,7 @@ AOS4_sound_handler::fetchSamples(std::int16_t* to, unsigned 
int nSamples)
                AHIRequest *req = AHIios[AHICurBuf];
                UWORD AHIOtherBuf = AHICurBuf^1;
 
-           boost::mutex::scoped_lock lock(_mutex);
+           std::lock_guard<std::mutex> lock(_mutex);
        if (!_closing) 
        {
                        sound_handler::fetchSamples(to, nSamples);
@@ -395,7 +395,7 @@ AOS4_sound_handler::mix(std::int16_t* outSamples, 
std::int16_t* inSamples, unsig
 void
 AOS4_sound_handler::plugInputStream(std::unique_ptr<InputStream> newStreamer)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
     sound_handler::plugInputStream(newStreamer);
 
@@ -412,21 +412,21 @@ 
AOS4_sound_handler::plugInputStream(std::unique_ptr<InputStream> newStreamer)
 void
 AOS4_sound_handler::mute()
 {
-    boost::mutex::scoped_lock lock(_mutedMutex);
+    std::lock_guard<std::mutex> lock(_mutedMutex);
     sound_handler::mute();
 }
 
 void
 AOS4_sound_handler::unmute()
 {
-    boost::mutex::scoped_lock lock(_mutedMutex);
+    std::lock_guard<std::mutex> lock(_mutedMutex);
     sound_handler::unmute();
 }
 
 bool
 AOS4_sound_handler::is_muted() const
 {
-    boost::mutex::scoped_lock lock(_mutedMutex);
+    std::lock_guard<std::mutex> lock(_mutedMutex);
     return sound_handler::is_muted();
 }
 
diff --git a/libsound/aos4/sound_handler_ahi.h 
b/libsound/aos4/sound_handler_ahi.h
index aa06fc9..2e699ba 100644
--- a/libsound/aos4/sound_handler_ahi.h
+++ b/libsound/aos4/sound_handler_ahi.h
@@ -23,7 +23,7 @@
 #include "sound_handler.h" // for inheritance
 
 #include <set> // for composition (InputStreams)
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 
 #include <proto/dos.h>
 #include <proto/exec.h>
@@ -86,10 +86,10 @@ private:
        struct MsgPort *_DMreplyport;   // and its port
        
     /// Mutex for making sure threads doesn't mess things up
-    boost::mutex _mutex;
+    std::mutex _mutex;
 
     /// Mutex protecting _muted (defined in base class)
-    mutable boost::mutex _mutedMutex;
+    mutable std::mutex _mutedMutex;
 
     // See dox in sound_handler.h
     void mix(std::int16_t* outSamples, std::int16_t* inSamples,
diff --git a/libsound/mkit/sound_handler_mkit.cpp 
b/libsound/mkit/sound_handler_mkit.cpp
index 63e149c..e61cf66 100644
--- a/libsound/mkit/sound_handler_mkit.cpp
+++ b/libsound/mkit/sound_handler_mkit.cpp
@@ -80,7 +80,7 @@ Mkit_sound_handler::~Mkit_sound_handler()
     if (_soundplayer != NULL)
         _soundplayer->Stop(true, true);
 
-//    boost::mutex::scoped_lock lock(_mutex);
+//    std::lock_guard<std::mutex> lock(_mutex);
 //#ifdef GNASH_DEBUG_HAIKU_AUDIO_PAUSING
 //    log_debug("Pausing Mkit Audio on destruction");
 //#endif
@@ -118,7 +118,7 @@ Mkit_sound_handler::FillNextBuffer(void *cookie, void 
*buffer, size_t size,
 void
 Mkit_sound_handler::fetchSamples(std::int16_t* to, unsigned int nSamples)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::fetchSamples(to, nSamples);
 
     // TODO: move this to base class !
@@ -146,7 +146,7 @@ Mkit_sound_handler::fetchSamples(std::int16_t* to, unsigned 
int nSamples)
 void
 Mkit_sound_handler::reset()
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::delete_all_sounds();
     sound_handler::stop_all_sounds();
 }
@@ -155,7 +155,7 @@ int
 Mkit_sound_handler::create_sound(std::unique_ptr<SimpleBuffer> data,
                                 std::unique_ptr<media::SoundInfo> sinfo)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::create_sound(data, sinfo);
 }
 
@@ -165,14 +165,14 @@ Mkit_sound_handler::addSoundBlock(unsigned char* data,
         int streamId)
 {
 
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::addSoundBlock(data, dataBytes, nSamples, streamId);
 }
 
 void
 Mkit_sound_handler::stop_sound(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::stop_sound(soundHandle);
 }
 
@@ -180,14 +180,14 @@ Mkit_sound_handler::stop_sound(int soundHandle)
 void
 Mkit_sound_handler::delete_sound(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::delete_sound(soundHandle);
 }
 
 void
 Mkit_sound_handler::stop_all_sounds()
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::stop_all_sounds();
 }
 
@@ -195,7 +195,7 @@ Mkit_sound_handler::stop_all_sounds()
 int
 Mkit_sound_handler::get_volume(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::get_volume(soundHandle);
 }
 
@@ -203,28 +203,28 @@ Mkit_sound_handler::get_volume(int soundHandle)
 void
 Mkit_sound_handler::set_volume(int soundHandle, int volume)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::set_volume(soundHandle, volume);
 }
 
 media::SoundInfo*
 Mkit_sound_handler::get_sound_info(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::get_sound_info(soundHandle);
 }
 
 unsigned int
 Mkit_sound_handler::get_duration(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::get_duration(soundHandle);
 }
 
 unsigned int
 Mkit_sound_handler::tell(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::tell(soundHandle);
 }
 
@@ -295,7 +295,7 @@ Mkit_sound_handler::mix(std::int16_t* outSamples, 
std::int16_t* inSamples, unsig
 void
 Mkit_sound_handler::plugInputStream(std::unique_ptr<InputStream> newStreamer)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
     sound_handler::plugInputStream(newStreamer);
 
@@ -314,21 +314,21 @@ 
Mkit_sound_handler::plugInputStream(std::unique_ptr<InputStream> newStreamer)
 void
 Mkit_sound_handler::mute()
 {
-    boost::mutex::scoped_lock lock(_mutedMutex);
+    std::lock_guard<std::mutex> lock(_mutedMutex);
     sound_handler::mute();
 }
 
 void
 Mkit_sound_handler::unmute()
 {
-    boost::mutex::scoped_lock lock(_mutedMutex);
+    std::lock_guard<std::mutex> lock(_mutedMutex);
     sound_handler::unmute();
 }
 
 bool
 Mkit_sound_handler::is_muted() const
 {
-    boost::mutex::scoped_lock lock(_mutedMutex);
+    std::lock_guard<std::mutex> lock(_mutedMutex);
     return sound_handler::is_muted();
 }
 
diff --git a/libsound/mkit/sound_handler_mkit.h 
b/libsound/mkit/sound_handler_mkit.h
index 16f4ca9..db54cf3 100644
--- a/libsound/mkit/sound_handler_mkit.h
+++ b/libsound/mkit/sound_handler_mkit.h
@@ -23,7 +23,7 @@
 #include "sound_handler.h" // for inheritance
 
 #include <set> // for composition (InputStreams)
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <memory>
 
 #include <SoundPlayer.h>
@@ -55,10 +55,10 @@ class Mkit_sound_handler : public sound_handler
     bool _audioopen;
 
     /// Mutex for making sure threads doesn't mess things up
-    boost::mutex _mutex;
+    std::mutex _mutex;
 
     /// Mutex protecting _muted (defined in base class)
-    mutable boost::mutex _mutedMutex;
+    mutable std::mutex _mutedMutex;
 
     // See dox in sound_handler.h
     void mix(std::int16_t* outSamples, std::int16_t* inSamples,
diff --git a/libsound/sdl/sound_handler_sdl.cpp 
b/libsound/sdl/sound_handler_sdl.cpp
index 57ee6ea..28b44fc 100644
--- a/libsound/sdl/sound_handler_sdl.cpp
+++ b/libsound/sdl/sound_handler_sdl.cpp
@@ -114,13 +114,13 @@ SDL_sound_handler::SDL_sound_handler(media::MediaHandler* 
m)
 void
 SDL_sound_handler::reset()
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::stop_all_sounds();
 }
 
 SDL_sound_handler::~SDL_sound_handler()
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
 #ifdef GNASH_DEBUG_SDL_AUDIO_PAUSING
     log_debug("Pausing SDL Audio on destruction");
@@ -135,7 +135,7 @@ SDL_sound_handler::~SDL_sound_handler()
 int
 SDL_sound_handler::createStreamingSound(const media::SoundInfo& sinfo)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::createStreamingSound(sinfo);
 }
 
@@ -143,7 +143,7 @@ int
 SDL_sound_handler::create_sound(std::unique_ptr<SimpleBuffer> data,
                                 const media::SoundInfo& sinfo)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::create_sound(std::move(data), sinfo);
 }
 
@@ -152,7 +152,7 @@ 
SDL_sound_handler::addSoundBlock(std::unique_ptr<SimpleBuffer> buf,
         size_t sampleCount, int seekSamples, int handle)
 {
 
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::addSoundBlock(std::move(buf), sampleCount, 
seekSamples, handle);
 }
 
@@ -160,21 +160,21 @@ 
SDL_sound_handler::addSoundBlock(std::unique_ptr<SimpleBuffer> buf,
 void
 SDL_sound_handler::stopEventSound(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::stopEventSound(soundHandle);
 }
 
 void
 SDL_sound_handler::stopAllEventSounds()
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::stopAllEventSounds();
 }
 
 void
 SDL_sound_handler::stopStreamingSound(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::stopStreamingSound(soundHandle);
 }
 
@@ -182,14 +182,14 @@ SDL_sound_handler::stopStreamingSound(int soundHandle)
 void
 SDL_sound_handler::delete_sound(int soundHandle)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::delete_sound(soundHandle);
 }
 
 void   
 SDL_sound_handler::stop_all_sounds()
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::stop_all_sounds();
 }
 
@@ -197,7 +197,7 @@ SDL_sound_handler::stop_all_sounds()
 int
 SDL_sound_handler::get_volume(int soundHandle) const
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::get_volume(soundHandle);
 }
 
@@ -205,28 +205,28 @@ SDL_sound_handler::get_volume(int soundHandle) const
 void   
 SDL_sound_handler::set_volume(int soundHandle, int volume)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::set_volume(soundHandle, volume);
 }
     
 media::SoundInfo*
 SDL_sound_handler::get_sound_info(int soundHandle) const
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::get_sound_info(soundHandle);
 }
 
 unsigned int
 SDL_sound_handler::get_duration(int soundHandle) const
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::get_duration(soundHandle);
 }
 
 unsigned int
 SDL_sound_handler::tell(int soundHandle) const
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     return sound_handler::tell(soundHandle);
 }
 
@@ -239,7 +239,7 @@ create_sound_handler_sdl(media::MediaHandler* m)
 void
 SDL_sound_handler::fetchSamples(std::int16_t* to, unsigned int nSamples)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
     sound_handler::fetchSamples(to, nSamples);
 
     // If nothing is left to play there is no reason to keep polling.
@@ -296,7 +296,7 @@ SDL_sound_handler::mix(std::int16_t* outSamples, 
std::int16_t* inSamples,
 void
 SDL_sound_handler::plugInputStream(std::unique_ptr<InputStream> newStreamer)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
     sound_handler::plugInputStream(std::move(newStreamer));
 
@@ -314,21 +314,21 @@ 
SDL_sound_handler::plugInputStream(std::unique_ptr<InputStream> newStreamer)
 void
 SDL_sound_handler::mute()
 {
-    boost::mutex::scoped_lock lock(_mutedMutex);
+    std::lock_guard<std::mutex> lock(_mutedMutex);
     sound_handler::mute();
 }
 
 void
 SDL_sound_handler::unmute()
 {
-    boost::mutex::scoped_lock lock(_mutedMutex);
+    std::lock_guard<std::mutex> lock(_mutedMutex);
     sound_handler::unmute();
 }
 
 bool
 SDL_sound_handler::is_muted() const
 {
-    boost::mutex::scoped_lock lock(_mutedMutex);
+    std::lock_guard<std::mutex> lock(_mutedMutex);
     return sound_handler::is_muted();
 }
 
@@ -353,7 +353,7 @@ SDL_sound_handler::unpause()
 void
 SDL_sound_handler::unplugInputStream(InputStream* id)
 {
-    boost::mutex::scoped_lock lock(_mutex);
+    std::lock_guard<std::mutex> lock(_mutex);
 
     sound_handler::unplugInputStream(id);
 }
diff --git a/libsound/sdl/sound_handler_sdl.h b/libsound/sdl/sound_handler_sdl.h
index 725ffb4..72293e9 100644
--- a/libsound/sdl/sound_handler_sdl.h
+++ b/libsound/sdl/sound_handler_sdl.h
@@ -25,7 +25,7 @@
 #include "sound_handler.h" // for inheritance
 
 #include <SDL_audio.h>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
 
 // Forward declarations
 namespace gnash {
@@ -57,10 +57,10 @@ private:
     bool _audioOpened;
     
     /// Mutex for making sure threads doesn't mess things up
-    mutable boost::mutex _mutex;
+    mutable std::mutex _mutex;
 
     /// Mutex protecting _muted (defined in base class)
-    mutable boost::mutex _mutedMutex;
+    mutable std::mutex _mutedMutex;
 
     // See dox in sound_handler.h
     void mix(std::int16_t* outSamples, std::int16_t* inSamples,
diff --git a/testsuite/libcore.all/StreamTest.cpp 
b/testsuite/libcore.all/StreamTest.cpp
index 28a1ee8..d58cc5d 100644
--- a/testsuite/libcore.all/StreamTest.cpp
+++ b/testsuite/libcore.all/StreamTest.cpp
@@ -28,8 +28,6 @@
 #include "check.h"
 #endif
 
-#include <boost/thread/mutex.hpp>
-
 #include "IOChannel.h"
 #include "SWFStream.h"
 #include "log.h"

http://git.savannah.gnu.org/cgit//commit/?id=8312a1db799e99f934a44fa4b738a94a300f203b


commit 8312a1db799e99f934a44fa4b738a94a300f203b
Author: Bastiaan Jacques <address@hidden>
Date:   Thu May 22 12:00:24 2014 +0200

    Fix test.

diff --git a/testsuite/libcore.all/ClassSizes.cpp 
b/testsuite/libcore.all/ClassSizes.cpp
index bf91c59..3cfed76 100644
--- a/testsuite/libcore.all/ClassSizes.cpp
+++ b/testsuite/libcore.all/ClassSizes.cpp
@@ -72,7 +72,7 @@ using namespace gnash::SWF;
 // Add types in brackets to this macro to have their size printed.
 #define TYPES \
 (int) (float) (long) (double) \
-(Property*) (unique_ptr<Property>) (scoped_ptr<Property>) \
+(Property*) (unique_ptr<Property>) \
 (std::shared_ptr<Property>) (intrusive_ptr<as_object>) (GcResource) \
 (rgba) (SWFMatrix) (SWFRect) (LineStyle) (FillStyle) (SWFCxForm) \
 (as_value) \

http://git.savannah.gnu.org/cgit//commit/?id=a17e2dd50c773c833c1a8395db73f1bc2bc8d1e5


commit a17e2dd50c773c833c1a8395db73f1bc2bc8d1e5
Author: Bastiaan Jacques <address@hidden>
Date:   Thu May 22 10:37:02 2014 +0200

    Switch another type trait to namespace std.

diff --git a/libcore/as_value.h b/libcore/as_value.h
index e6acc6c..ece3337 100644
--- a/libcore/as_value.h
+++ b/libcore/as_value.h
@@ -150,7 +150,7 @@ public:
     
     /// Construct a primitive Boolean value
     template <typename T>
-    as_value(T val, typename std::enable_if<boost::is_same<bool, 
T>::value>::type*
+    as_value(T val, typename std::enable_if<std::is_same<bool, 
T>::value>::type*
              dummy = 0)
         :
         _type(BOOLEAN),

-----------------------------------------------------------------------

Summary of changes:
 cygnal/alloc.cpp                      |    8 ++--
 cygnal/cygnal.cpp                     |   30 ++++++++---------
 cygnal/cygnal.h                       |   12 +++---
 cygnal/handler.cpp                    |   11 +++---
 cygnal/handler.h                      |    5 +--
 cygnal/http_server.cpp                |    4 +-
 cygnal/libamf/lcshm.cpp               |    8 ++--
 cygnal/libamf/lcshm.h                 |    3 +-
 cygnal/libnet/cache.cpp               |   24 +++++++-------
 cygnal/libnet/cque.cpp                |   20 +++++-----
 cygnal/libnet/cque.h                  |   16 ++++----
 cygnal/libnet/cqueue.cpp              |    2 +-
 cygnal/libnet/cqueue.h                |    2 +-
 cygnal/libnet/diskstream.cpp          |   10 +++---
 cygnal/libnet/http.cpp                |    6 ++--
 cygnal/libnet/network.cpp             |   22 ++++++------
 cygnal/libnet/network.h               |    6 ++--
 cygnal/libnet/sshclient.cpp           |    6 ++--
 cygnal/libnet/sshserver.cpp           |    6 ++--
 cygnal/libnet/sslclient.cpp           |    6 ++--
 cygnal/libnet/sslserver.cpp           |    6 ++--
 cygnal/libnet/statistics.cpp          |    8 ++--
 cygnal/proc.cpp                       |   12 +++---
 cygnal/proc.h                         |    5 +--
 libbase/NetworkAdapter.cpp            |   26 +++-----------
 libbase/log.cpp                       |   59 ++++-----------------------------
 libbase/log.h                         |    4 +-
 libbase/sharedlib.cpp                 |    2 +-
 libbase/sharedlib.h                   |    6 ++--
 libbase/string_table.cpp              |    6 ++--
 libbase/string_table.h                |    4 +-
 libcore/FreetypeGlyphsProvider.cpp    |    4 +-
 libcore/FreetypeGlyphsProvider.h      |    4 +-
 libcore/LoadVariablesThread.cpp       |    4 +-
 libcore/LoadVariablesThread.h         |   15 ++++----
 libcore/MovieLibrary.h                |   11 +++---
 libcore/MovieLoader.cpp               |   18 +++++-----
 libcore/MovieLoader.h                 |   22 ++++++------
 libcore/as_value.h                    |    2 +-
 libcore/asobj/Array_as.cpp            |    3 +-
 libcore/asobj/NetStream_as.cpp        |   26 ++++++++-------
 libcore/asobj/NetStream_as.h          |   10 +++---
 libcore/asobj/Sound_as.cpp            |   10 +++---
 libcore/asobj/XMLSocket_as.cpp        |    1 -
 libcore/parser/SWFMovieDefinition.cpp |   46 +++++++++++--------------
 libcore/parser/SWFMovieDefinition.h   |   32 +++++++++---------
 libcore/swf/DefineVideoStreamTag.cpp  |    4 +-
 libcore/swf/DefineVideoStreamTag.h    |    6 ++--
 libmedia/AudioDecoderSpeex.cpp        |    1 +
 libmedia/FLVParser.cpp                |   18 +++++-----
 libmedia/FLVParser.h                  |   11 +++---
 libmedia/MediaParser.cpp              |   27 ++++++++-------
 libmedia/MediaParser.h                |   29 ++++++++--------
 libmedia/ffmpeg/MediaParserFfmpeg.cpp |    4 +-
 libmedia/gst/MediaParserGst.cpp       |    7 ++--
 libmedia/gst/MediaParserGst.h         |    1 +
 librender/cairo/PathParser.cpp        |    9 +++--
 librender/cairo/PathParser.h          |    4 ++-
 librender/opengl/Renderer_ogl.cpp     |    3 +-
 librender/openvg/OpenVGRenderer.cpp   |    5 ++-
 libsound/EmbedSound.cpp               |   14 ++++----
 libsound/EmbedSound.h                 |    5 ++-
 libsound/StreamingSoundData.cpp       |   14 ++++----
 libsound/StreamingSoundData.h         |    6 ++--
 libsound/aos4/sound_handler_ahi.cpp   |   34 +++++++++---------
 libsound/aos4/sound_handler_ahi.h     |    6 ++--
 libsound/mkit/sound_handler_mkit.cpp  |   34 +++++++++---------
 libsound/mkit/sound_handler_mkit.h    |    6 ++--
 libsound/sdl/sound_handler_sdl.cpp    |   42 ++++++++++++------------
 libsound/sdl/sound_handler_sdl.h      |    6 ++--
 testsuite/libcore.all/ClassSizes.cpp  |    2 +-
 testsuite/libcore.all/StreamTest.cpp  |    2 -
 72 files changed, 398 insertions(+), 455 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]