diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-05-30 17:36:06 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-05-30 17:36:06 +0200 |
commit | 405de3ecd5624a350668406f5476905e5e8a1286 (patch) | |
tree | 7ce7395d185f34b7777add78d584497b6fc4c852 /src/InputReader.h | |
parent | 1f1d23622054ce204d9cf1c1a589c718321c667a (diff) | |
download | dabmod-405de3ecd5624a350668406f5476905e5e8a1286.tar.gz dabmod-405de3ecd5624a350668406f5476905e5e8a1286.tar.bz2 dabmod-405de3ecd5624a350668406f5476905e5e8a1286.zip |
Use shared_ptr in ZMQ input instead of pointers
Diffstat (limited to 'src/InputReader.h')
-rw-r--r-- | src/InputReader.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/InputReader.h b/src/InputReader.h index 13d49b8..6156c94 100644 --- a/src/InputReader.h +++ b/src/InputReader.h @@ -31,6 +31,8 @@ #endif #include <cstdio> +#include <vector> +#include <boost/shared_ptr.hpp> #if defined(HAVE_ZEROMQ) # include "zmq.hpp" # include "ThreadsafeQueue.h" @@ -143,7 +145,7 @@ struct zmq_input_overflow : public std::exception struct InputZeroMQThreadData { - ThreadsafeQueue<uint8_t*> *in_messages; + ThreadsafeQueue<boost::shared_ptr<std::vector<uint8_t> > > *in_messages; std::string uri; unsigned max_queued_frames; @@ -203,7 +205,7 @@ class InputZeroMQReader : public InputReader std::string uri_; InputZeroMQWorker worker_; - ThreadsafeQueue<uint8_t*> in_messages_; + ThreadsafeQueue<boost::shared_ptr<std::vector<uint8_t> > > in_messages_; struct InputZeroMQThreadData workerdata_; }; |