logic_mux_data_->push_segment(output_segment);
output_segment->set_samplerate(get_input_samplerate(segment_id));
+ } else {
+ // Wait for more input data if we're processing the currently last segment
+ unique_lock<mutex> logic_mux_lock(logic_mux_mutex_);
+ logic_mux_cond_.wait(logic_mux_lock);
}
}
-
- if (segment_id == (get_input_segment_count() - 1)) {
- // Wait for more input data if we're processing the currently last segment
- unique_lock<mutex> logic_mux_lock(logic_mux_mutex_);
- logic_mux_cond_.wait(logic_mux_lock);
- }
}
} while (!logic_mux_interrupt_);
}
// All segments have been processed
if (!decode_interrupt_)
decode_finished();
+
+ // Wait for more input data
+ unique_lock<mutex> input_wait_lock(input_mutex_);
+ decode_input_cond_.wait(input_wait_lock);
}
}
- if (current_segment_id_ == (logic_mux_data_->logic_segments().size() - 1)) {
- // Wait for more input data if we're processing the currently last segment
- unique_lock<mutex> input_wait_lock(input_mutex_);
- decode_input_cond_.wait(input_wait_lock);
- }
}
} while (!decode_interrupt_);
}
#include <unordered_set>
#include <vector>
+#include <QDebug>
#include <QSettings>
#include <libsigrokdecode/libsigrokdecode.h>
// Constructor is a no-op
DecodeSegment() { };
// Copy constructor is a no-op
- DecodeSegment(DecodeSegment&& ds) { (void)ds; };
+ DecodeSegment(DecodeSegment&& ds) { (void)ds; qCritical() << "Empty DecodeSegment copy constructor called"; };
map<const Row*, RowData> annotation_rows; // Note: Row is the same for all segments while RowData is not
pv::util::Timestamp start_time;
vector< shared_ptr<Decoder> > stack_;
bool stack_config_changed_;
- vector<DecodeSegment> segments_;
+ deque<DecodeSegment> segments_;
uint32_t current_segment_id_;
mutable mutex input_mutex_, output_mutex_, decode_pause_mutex_, logic_mux_mutex_;