forked from Ivasoft/DSView
fix: Update view is blocking
This commit is contained in:
@@ -68,6 +68,7 @@ DecoderStack::DecoderStack(pv::SigSession *session,
|
||||
_is_capture_end = true;
|
||||
_snapshot = NULL;
|
||||
_progress = 0;
|
||||
_is_decoding = false;
|
||||
|
||||
_stack.push_back(new decode::Decoder(dec));
|
||||
|
||||
@@ -518,6 +519,7 @@ void DecoderStack::decode_data(const uint64_t decode_start, const uint64_t decod
|
||||
|
||||
_progress = 0;
|
||||
uint64_t sended_len = 0;
|
||||
_is_decoding = true;
|
||||
|
||||
while(i < end_index && !_no_memory && !status->_bStop)
|
||||
{
|
||||
@@ -606,6 +608,8 @@ void DecoderStack::decode_data(const uint64_t decode_start, const uint64_t decod
|
||||
}
|
||||
|
||||
_progress = 100;
|
||||
_is_decoding = false;
|
||||
|
||||
new_decode_data();
|
||||
|
||||
// the task is normal ends,so all samples was processed;
|
||||
|
||||
@@ -169,10 +169,15 @@ public:
|
||||
|
||||
inline void set_capture_end_flag(bool isEnd){
|
||||
_is_capture_end = isEnd;
|
||||
if (!isEnd){_progress = 0;}
|
||||
if (!isEnd){
|
||||
_progress = 0;
|
||||
_is_decoding = false;
|
||||
}
|
||||
}
|
||||
|
||||
inline int get_progress(){
|
||||
//if (!_is_decoding && _progress == 0)
|
||||
// return -1;
|
||||
return _progress;
|
||||
}
|
||||
|
||||
@@ -210,6 +215,7 @@ private:
|
||||
mutable std::mutex _output_mutex;
|
||||
bool _is_capture_end;
|
||||
int _progress;
|
||||
bool _is_decoding;
|
||||
|
||||
friend class DecoderStackTest::TwoDecoderStack;
|
||||
};
|
||||
|
||||
@@ -103,7 +103,11 @@ void ProtocolItemLayer::on_format_select_changed(int index){
|
||||
_progress_label->setStyleSheet("color:green;");
|
||||
else
|
||||
_progress_label->setStyleSheet("color:red;");
|
||||
_progress_label->setText(str);
|
||||
|
||||
if (progress >= 0)
|
||||
_progress_label->setText(str);
|
||||
else
|
||||
_progress_label->setText("");
|
||||
}
|
||||
|
||||
void ProtocolItemLayer::ResetStyle(){
|
||||
|
||||
@@ -1267,6 +1267,7 @@ namespace pv
|
||||
|
||||
// Post a message to start all decode tasks.
|
||||
if (mode == LOGIC){
|
||||
dsv_info("Receive SR_DF_END.");
|
||||
_callback->trigger_message(DSV_MSG_REV_END_PACKET);
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -1356,7 +1356,7 @@ void Viewport::set_receive_len(quint64 length)
|
||||
}
|
||||
|
||||
// Received new data, and refresh the view.
|
||||
repaint();
|
||||
update();
|
||||
}
|
||||
|
||||
void Viewport::clear_measure()
|
||||
|
||||
Reference in New Issue
Block a user