[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-2053-g0ac0003 |
Date: |
Thu, 22 May 2014 15:38:13 +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 0ac00036d34208b0c05fbc595c5298fd43d13b41 (commit)
via 2aad5b291128f96f3038a21521131663e35d3e09 (commit)
via dbe1b503ebb673d8f56c6b636f76c12ad73ecaf8 (commit)
from 76a3e697e4bf26c0a7638ebacf1b68e9df8529f2 (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=0ac00036d34208b0c05fbc595c5298fd43d13b41
commit 0ac00036d34208b0c05fbc595c5298fd43d13b41
Author: Bastiaan Jacques <address@hidden>
Date: Thu May 22 17:27:45 2014 +0200
Default-initialize thread objects to defer execution and distinguish
between 'started' and 'not started', instead of using a smart pointer.
diff --git a/libcore/LoadVariablesThread.cpp b/libcore/LoadVariablesThread.cpp
index 89c566d..560244a 100644
--- a/libcore/LoadVariablesThread.cpp
+++ b/libcore/LoadVariablesThread.cpp
@@ -183,11 +183,10 @@ LoadVariablesThread::cancelRequested()
LoadVariablesThread::~LoadVariablesThread()
{
- if ( _thread.get() )
+ if ( _thread.joinable() )
{
cancel();
- _thread->join();
- _thread.reset();
+ _thread.join();
}
}
diff --git a/libcore/LoadVariablesThread.h b/libcore/LoadVariablesThread.h
index 1b8f6ce..0a6cbd0 100644
--- a/libcore/LoadVariablesThread.h
+++ b/libcore/LoadVariablesThread.h
@@ -87,10 +87,10 @@ public:
/// Start the load and parse thread
void process()
{
- assert(!_thread.get());
+ assert(!_thread.joinable());
assert(_stream.get());
- _thread.reset(new std::thread(
- std::bind(LoadVariablesThread::execLoadingThread, this)));
+ _thread = std::thread(
+ std::bind(LoadVariablesThread::execLoadingThread, this));
}
/// Cancel a download in progress
@@ -103,7 +103,7 @@ public:
bool inProgress()
{
// TODO: should we mutex-protect this ?
- return ( _thread.get() != nullptr );
+ return _thread.joinable();
}
/// Mutex-protected inspector for thread completion
@@ -115,10 +115,9 @@ public:
bool completed()
{
std::lock_guard<std::mutex> lock(_mutex);
- if ( _completed && _thread.get() )
+ if ( _completed && _thread.joinable() )
{
- _thread->join();
- _thread.reset();
+ _thread.join();
}
return _completed;
}
@@ -198,7 +197,7 @@ private:
std::unique_ptr<IOChannel> _stream;
- std::unique_ptr<std::thread> _thread;
+ std::thread _thread;
ValuesMap _vals;
diff --git a/libcore/MovieLoader.cpp b/libcore/MovieLoader.cpp
index 775367f..2d4d2db 100644
--- a/libcore/MovieLoader.cpp
+++ b/libcore/MovieLoader.cpp
@@ -151,7 +151,7 @@ MovieLoader::processRequest(Request& r)
void
MovieLoader::clear()
{
- if (_thread.get()) {
+ if (_thread.joinable()) {
#ifdef GNASH_DEBUG_LOCKING
log_debug("clear: lock on requests: trying");
@@ -190,9 +190,8 @@ MovieLoader::clear()
requestsLock.unlock(); // allow the thread to die
log_debug("MovieLoader notified, joining");
- _thread->join();
+ _thread.join();
log_debug("MovieLoader joined");
- _thread.reset();
}
// no thread now, can clean w/out locking
@@ -449,12 +448,10 @@ MovieLoader::loadMovie(const std::string& urlstr,
);
// Start or wake up the loader thread
- if (!_thread.get()) {
+ if (!_thread.joinable()) {
_killed=false;
- _thread.reset(new std::thread(std::bind(
- &MovieLoader::processRequests, this)));
- }
- else {
+ _thread = std::thread(std::bind(&MovieLoader::processRequests, this));
+ } else {
log_debug("loadMovie: waking up existing thread");
_wakeup.notify_all();
}
diff --git a/libcore/MovieLoader.h b/libcore/MovieLoader.h
index 7ab5c33..d134a46 100644
--- a/libcore/MovieLoader.h
+++ b/libcore/MovieLoader.h
@@ -203,7 +203,7 @@ private:
/// needed for some facilities like find_character_by_target
movie_root& _movieRoot;
- std::unique_ptr<std::thread> _thread;
+ std::thread _thread;
};
} // namespace gnash
diff --git a/libcore/parser/SWFMovieDefinition.cpp
b/libcore/parser/SWFMovieDefinition.cpp
index 9286f84..602d209 100644
--- a/libcore/parser/SWFMovieDefinition.cpp
+++ b/libcore/parser/SWFMovieDefinition.cpp
@@ -80,10 +80,10 @@ SWFMovieLoader::~SWFMovieLoader()
{
// we should assert _movie_def._loadingCanceled
// but we're not friend yet (anyone introduce us ?)
- if ( _thread.get() )
+ if ( _thread.joinable() )
{
//cout << "Joining thread.." << endl;
- _thread->join();
+ _thread.join();
}
}
@@ -92,7 +92,7 @@ SWFMovieLoader::started() const
{
std::lock_guard<std::mutex> lock(_mutex);
- return _thread.get() != nullptr;
+ return _thread.joinable();
}
bool
@@ -100,10 +100,10 @@ SWFMovieLoader::isSelfThread() const
{
std::lock_guard<std::mutex> lock(_mutex);
- if (!_thread.get()) {
+ if (!_thread.joinable()) {
return false;
}
- return std::this_thread::get_id() == _thread->get_id();
+ return std::this_thread::get_id() == _thread.get_id();
}
// static..
@@ -125,7 +125,7 @@ SWFMovieLoader::start()
// Those tests do seem a bit redundant, though...
std::lock_guard<std::mutex> lock(_mutex);
- _thread.reset(new std::thread(std::bind(execute, &_movie_def)));
+ _thread = std::thread(std::bind(execute, &_movie_def));
return true;
}
diff --git a/libcore/parser/SWFMovieDefinition.h
b/libcore/parser/SWFMovieDefinition.h
index 47af2bf..3636f99 100644
--- a/libcore/parser/SWFMovieDefinition.h
+++ b/libcore/parser/SWFMovieDefinition.h
@@ -89,7 +89,7 @@ private:
SWFMovieDefinition& _movie_def;
mutable std::mutex _mutex;
- std::unique_ptr<std::thread> _thread;
+ std::thread _thread;
/// Entry point for the actual thread
static void execute(SWFMovieDefinition* md);
diff --git a/libmedia/MediaParser.cpp b/libmedia/MediaParser.cpp
index c09a9f5..94fa192 100644
--- a/libmedia/MediaParser.cpp
+++ b/libmedia/MediaParser.cpp
@@ -40,7 +40,6 @@ MediaParser::MediaParser(std::unique_ptr<IOChannel> stream)
_bytesLoaded(0),
_stream(std::move(stream)),
_bufferTime(100), // 100 ms
- _parserThread(),
_parserThreadKillRequested(false),
_seekRequest(false)
{
@@ -52,8 +51,8 @@ MediaParser::startParserThread()
{
#ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
log_debug("Starting MediaParser thread");
- _parserThread.reset(new std::thread(
- std::bind(parserLoopStarter, this)));
+ _parserThread = std::thread(
+ std::bind(parserLoopStarter, this));
#endif
}
@@ -272,11 +271,10 @@ MediaParser::peekNextAudioFrame() const
void
MediaParser::stopParserThread()
{
- if ( _parserThread.get() )
+ if ( _parserThread.joinable() )
{
requestParserThreadKill();
- _parserThread->join();
- _parserThread.reset();
+ _parserThread.join();
}
}
diff --git a/libmedia/MediaParser.h b/libmedia/MediaParser.h
index e320470..01b4571 100644
--- a/libmedia/MediaParser.h
+++ b/libmedia/MediaParser.h
@@ -688,7 +688,7 @@ protected:
std::uint64_t _bufferTime;
mutable std::mutex _bufferTimeMutex;
- std::unique_ptr<std::thread> _parserThread;
+ std::thread _parserThread;
mutable std::mutex _parserThreadKillRequestMutex;
bool _parserThreadKillRequested;
std::condition_variable _parserThreadWakeup;
http://git.savannah.gnu.org/cgit//commit/?id=2aad5b291128f96f3038a21521131663e35d3e09
commit 2aad5b291128f96f3038a21521131663e35d3e09
Author: Bastiaan Jacques <address@hidden>
Date: Thu May 22 15:48:47 2014 +0200
Use std::array instead of boost::array.
diff --git a/cygnal/libnet/sshclient.cpp b/cygnal/libnet/sshclient.cpp
index d5a08e5..a091c7f 100644
--- a/cygnal/libnet/sshclient.cpp
+++ b/cygnal/libnet/sshclient.cpp
@@ -19,7 +19,6 @@
#include <mutex>
#include <cstdint>
-#include <boost/array.hpp>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/cygnal/libnet/sshclient.h b/cygnal/libnet/sshclient.h
index 3b37cca..4c0f5e7 100644
--- a/cygnal/libnet/sshclient.h
+++ b/cygnal/libnet/sshclient.h
@@ -20,7 +20,6 @@
#define GNASH_SSH_CLIENT_H
#include <string>
-#include <boost/array.hpp>
#include <cstdint>
#include <sstream>
diff --git a/cygnal/libnet/sshserver.cpp b/cygnal/libnet/sshserver.cpp
index 99b16c5..2fdd847 100644
--- a/cygnal/libnet/sshserver.cpp
+++ b/cygnal/libnet/sshserver.cpp
@@ -19,7 +19,6 @@
#include <mutex>
#include <cstdint>
-#include <boost/array.hpp>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/cygnal/libnet/sshserver.h b/cygnal/libnet/sshserver.h
index 1f7ea21..a58d4cf 100644
--- a/cygnal/libnet/sshserver.h
+++ b/cygnal/libnet/sshserver.h
@@ -20,7 +20,6 @@
#define GNASH_SSH_SERVER_H
#include <string>
-#include <boost/array.hpp>
#include <cstdint>
#include <sstream>
diff --git a/cygnal/libnet/sslclient.cpp b/cygnal/libnet/sslclient.cpp
index 54498a3..e23138a 100644
--- a/cygnal/libnet/sslclient.cpp
+++ b/cygnal/libnet/sslclient.cpp
@@ -23,7 +23,6 @@
#include <mutex>
#include <cstdint>
-#include <boost/array.hpp>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/cygnal/libnet/sslclient.h b/cygnal/libnet/sslclient.h
index 288261f..2d071ba 100644
--- a/cygnal/libnet/sslclient.h
+++ b/cygnal/libnet/sslclient.h
@@ -24,7 +24,6 @@
#endif
#include <string>
-#include <boost/array.hpp>
#include <cstdint>
#include <sstream>
diff --git a/cygnal/libnet/sslserver.cpp b/cygnal/libnet/sslserver.cpp
index f99c0af..c773db3 100644
--- a/cygnal/libnet/sslserver.cpp
+++ b/cygnal/libnet/sslserver.cpp
@@ -23,7 +23,6 @@
#include <mutex>
#include <cstdint>
-#include <boost/array.hpp>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/cygnal/libnet/sslserver.h b/cygnal/libnet/sslserver.h
index 3a372d9..548ae1a 100644
--- a/cygnal/libnet/sslserver.h
+++ b/cygnal/libnet/sslserver.h
@@ -23,7 +23,6 @@
#include "gnashconfig.h"
#endif
-#include <boost/array.hpp>
#include <cstdint>
#include <sstream>
diff --git a/cygnal/rtmp_server.h b/cygnal/rtmp_server.h
index b483550..647d0a3 100644
--- a/cygnal/rtmp_server.h
+++ b/cygnal/rtmp_server.h
@@ -21,7 +21,7 @@
#include <vector>
#include <cstdint>
-#include <boost/array.hpp>
+#include <array>
#include <string>
#include <map>
@@ -137,7 +137,7 @@ private:
#ifdef CLIENT_ID_NUMERIC
std::array<double> _clientids;
#else
- boost::array<std::string, 1000> _clientids;
+ std::array<std::string, 1000> _clientids;
#endif
double _streamid;
/// \var _netconnect
diff --git a/libcore/asobj/flash/display/BitmapData_as.cpp
b/libcore/asobj/flash/display/BitmapData_as.cpp
index 2d47236..86bf502 100644
--- a/libcore/asobj/flash/display/BitmapData_as.cpp
+++ b/libcore/asobj/flash/display/BitmapData_as.cpp
@@ -27,7 +27,7 @@
#include <boost/random.hpp>
#include <boost/iterator/zip_iterator.hpp>
#include <boost/tuple/tuple.hpp>
-#include <boost/array.hpp>
+#include <array>
#include <cmath>
#include "MovieClip.h"
@@ -421,10 +421,10 @@ private:
}
// A random permutation table.
- boost::array<size_t, Size * 2 + 2> permTable;
+ std::array<size_t, Size * 2 + 2> permTable;
// The gradient stuff.
- boost::array<boost::array<T, 2>, Size * 2 + 2> g2;
+ std::array<std::array<T, 2>, Size * 2 + 2> g2;
};
/// Store offsets.
diff --git a/libcore/movie_root.h b/libcore/movie_root.h
index 2b16b15..f954ad2 100644
--- a/libcore/movie_root.h
+++ b/libcore/movie_root.h
@@ -74,7 +74,7 @@
#include <list>
#include <set>
#include <bitset>
-#include <boost/array.hpp>
+#include <array>
#include <boost/ptr_container/ptr_deque.hpp>
#include <boost/noncopyable.hpp>
#include <boost/any.hpp>
@@ -547,7 +547,7 @@ public:
/// This is a ptr_deque because it needs no insertion in the middle but
/// frequent push_back and pop_front. We also have to traverse it, so
/// a queue is not usable.
- typedef boost::array<boost::ptr_deque<ExecutableCode>, PRIORITY_SIZE>
+ typedef std::array<boost::ptr_deque<ExecutableCode>, PRIORITY_SIZE>
ActionQueue;
/// Push an executable code to the ActionQueue
diff --git a/libcore/vm/VM.h b/libcore/vm/VM.h
index a1258d2..b3a54d9 100644
--- a/libcore/vm/VM.h
+++ b/libcore/vm/VM.h
@@ -26,7 +26,7 @@
#include <map>
#include <memory>
-#include <boost/array.hpp>
+#include <array>
#include <cstdint>
#include <boost/random/mersenne_twister.hpp> // for mt11213b
#include <boost/noncopyable.hpp>
@@ -270,7 +270,7 @@ private:
SafeStack<as_value> _stack;
- typedef boost::array<as_value, 4> GlobalRegisters;
+ typedef std::array<as_value, 4> GlobalRegisters;
GlobalRegisters _globalRegisters;
CallStack _callStack;
diff --git a/libmedia/VideoConverter.h b/libmedia/VideoConverter.h
index 5dcee78..6ca19a1 100644
--- a/libmedia/VideoConverter.h
+++ b/libmedia/VideoConverter.h
@@ -22,7 +22,7 @@
#include <boost/noncopyable.hpp>
#include <cstdint>
-#include <boost/array.hpp>
+#include <array>
#include <memory>
namespace gnash {
@@ -77,7 +77,7 @@ struct ImgBuf : public boost::noncopyable
size_t width; // in pixels
size_t height; // in pixels
- boost::array<size_t, 4> stride;
+ std::array<size_t, 4> stride;
FreeFunc dealloc;
};
http://git.savannah.gnu.org/cgit//commit/?id=dbe1b503ebb673d8f56c6b636f76c12ad73ecaf8
commit dbe1b503ebb673d8f56c6b636f76c12ad73ecaf8
Author: Bastiaan Jacques <address@hidden>
Date: Thu May 22 14:07:20 2014 +0200
Remove unused include directive.
diff --git a/gui/gnash.cpp b/gui/gnash.cpp
index 33677b3..d4674fa 100644
--- a/gui/gnash.cpp
+++ b/gui/gnash.cpp
@@ -31,11 +31,11 @@
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
-#include <boost/function.hpp>
#include <algorithm>
#include <cstdlib>
#include <utility>
#include <functional>
+
#ifdef ENABLE_NLS
# include <clocale>
#endif
-----------------------------------------------------------------------
Summary of changes:
cygnal/libnet/sshclient.cpp | 1 -
cygnal/libnet/sshclient.h | 1 -
cygnal/libnet/sshserver.cpp | 1 -
cygnal/libnet/sshserver.h | 1 -
cygnal/libnet/sslclient.cpp | 1 -
cygnal/libnet/sslclient.h | 1 -
cygnal/libnet/sslserver.cpp | 1 -
cygnal/libnet/sslserver.h | 1 -
cygnal/rtmp_server.h | 4 ++--
gui/gnash.cpp | 2 +-
libcore/LoadVariablesThread.cpp | 5 ++---
libcore/LoadVariablesThread.h | 15 +++++++--------
libcore/MovieLoader.cpp | 13 +++++--------
libcore/MovieLoader.h | 2 +-
libcore/asobj/flash/display/BitmapData_as.cpp | 6 +++---
libcore/movie_root.h | 4 ++--
libcore/parser/SWFMovieDefinition.cpp | 12 ++++++------
libcore/parser/SWFMovieDefinition.h | 2 +-
libcore/vm/VM.h | 4 ++--
libmedia/MediaParser.cpp | 10 ++++------
libmedia/MediaParser.h | 2 +-
libmedia/VideoConverter.h | 4 ++--
22 files changed, 39 insertions(+), 54 deletions(-)
hooks/post-receive
--
Gnash
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2053-g0ac0003,
Bastiaan Jacques <=