if(_sampling_thread.get())
_sampling_thread->join();
_sampling_thread.reset();
-
- _capture_state = Stopped;
}
vector< shared_ptr<view::Signal> > SigSession::get_signals()
return _logic_data;
}
+void SigSession::set_capture_state(capture_state state)
+{
+ lock_guard<mutex> lock(_state_mutex);
+ _capture_state = state;
+ capture_state_changed(state);
+}
+
void SigSession::sample_thread_proc(struct sr_dev_inst *sdi,
uint64_t record_length, uint64_t sample_rate)
{
return;
}
- {
- lock_guard<mutex> lock(_state_mutex);
- _capture_state = Running;
- }
+ set_capture_state(Running);
sr_session_run();
sr_session_destroy();
+
+ set_capture_state(Stopped);
}
void SigSession::data_feed_in(const struct sr_dev_inst *sdi,