From 23bb2d99edfa336fcfd9e14b0952a1a9a63e4d7b Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Thu, 7 Jun 2012 09:23:11 -0700 Subject: Revert "uhd: allow source work to be stopped while fg runs" This reverts commit c78d307ecd5dac4e28190e5aa9b8377538f65ffa. --- gr-uhd/lib/gr_uhd_usrp_source.cc | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'gr-uhd/lib/gr_uhd_usrp_source.cc') diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 99deb70c7..8aa965401 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include #include "gr_uhd_common.h" @@ -62,8 +60,7 @@ public: _nchan(std::max(1, stream_args.channels.size())), _stream_now(_nchan == 1), _tag_now(false), - _start_time_set(false), - _is_streaming(false) + _start_time_set(false) { if (stream_args.cpu_format == "fc32") _type = boost::make_shared(uhd::io_type_t::COMPLEX_FLOAT32); if (stream_args.cpu_format == "sc16") _type = boost::make_shared(uhd::io_type_t::COMPLEX_INT16); @@ -323,13 +320,6 @@ public: gr_vector_const_void_star &input_items, gr_vector_void_star &output_items ){ - boost::mutex::scoped_lock lock(_mutex); - - while (!_is_streaming) - { - _cond.wait(lock); - } - #ifdef GR_UHD_USE_STREAM_API //In order to allow for low-latency: //We receive all available packets without timeout. @@ -402,9 +392,6 @@ public: } bool start(void){ - boost::mutex::scoped_lock lock(_mutex); - _is_streaming = true; - #ifdef GR_UHD_USE_STREAM_API _rx_stream = _dev->get_rx_stream(_stream_args); _samps_per_packet = _rx_stream->get_max_num_samps(); @@ -449,9 +436,6 @@ public: } bool stop(void){ - boost::mutex::scoped_lock lock(_mutex); - _is_streaming = false; - _dev->issue_stream_cmd(uhd::stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS); this->flush(); @@ -524,10 +508,6 @@ private: uhd::time_spec_t _start_time; bool _start_time_set; - - bool _is_streaming; - boost::condition_variable _cond; - boost::mutex _mutex; }; -- cgit