aboutsummaryrefslogtreecommitdiffstats
path: root/src/OutputUHD.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-04-21 00:07:22 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-04-21 00:07:22 +0200
commit1810a2c6a34207caedf5a88bc4e5d38080e764ed (patch)
treeb6a6074b8c9ee47881330256dd002f76fb26029b /src/OutputUHD.h
parent156ee71cbb3c94d5d77a5afcc376cd512ce8fe9d (diff)
downloaddabmod-1810a2c6a34207caedf5a88bc4e5d38080e764ed.tar.gz
dabmod-1810a2c6a34207caedf5a88bc4e5d38080e764ed.tar.bz2
dabmod-1810a2c6a34207caedf5a88bc4e5d38080e764ed.zip
Put UHD async msg to separate thread
Diffstat (limited to 'src/OutputUHD.h')
-rw-r--r--src/OutputUHD.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/OutputUHD.h b/src/OutputUHD.h
index cbf159f..d42245f 100644
--- a/src/OutputUHD.h
+++ b/src/OutputUHD.h
@@ -125,6 +125,8 @@ class UHDWorker {
void start(struct UHDWorkerData *uhdworkerdata) {
uwd->running = true;
uhd_thread = boost::thread(&UHDWorker::process_errhandler, this);
+ async_rx_thread = boost::thread(
+ &UHDWorker::print_async_metadata, this);
}
void stop() {
@@ -133,6 +135,7 @@ class UHDWorker {
}
uhd_thread.interrupt();
uhd_thread.join();
+ async_rx_thread.join();
}
~UHDWorker() {
@@ -155,13 +158,14 @@ class UHDWorker {
// Used to print statistics once a second
std::chrono::steady_clock::time_point last_print_time;
- void print_async_metadata(const struct UHDWorkerFrameData *frame);
+ void print_async_metadata(void);
void handle_frame(const struct UHDWorkerFrameData *frame);
void tx_frame(const struct UHDWorkerFrameData *frame, bool ts_update);
struct UHDWorkerData *uwd;
boost::thread uhd_thread;
+ boost::thread async_rx_thread;
uhd::tx_streamer::sptr myTxStream;