2
0
forked from Ivasoft/DSView

Add the log about stop capture

This commit is contained in:
dreamsourcelabTAI
2023-03-28 18:04:23 +08:00
parent 27f6f49d3b
commit 250a81ba5a
2 changed files with 11 additions and 4 deletions

View File

@@ -351,12 +351,14 @@ namespace pv
switch (_session->get_error())
{
case SigSession::Hw_err:
dsv_info("MainWindow::on_session_error(),Hw_err, stop capture");
_session->stop_capture();
title = L_S(STR_PAGE_MSG, S_ID(IDS_MSG_HARDWARE_ERROR), "Hardware Operation Failed");
details = L_S(STR_PAGE_MSG, S_ID(IDS_MSG_HARDWARE_ERROR_DET),
"Please replug device to refresh hardware configuration!");
break;
case SigSession::Malloc_err:
dsv_info("MainWindow::on_session_error(),Malloc_err, stop capture");
_session->stop_capture();
title = L_S(STR_PAGE_MSG, S_ID(IDS_MSG_MALLOC_ERROR), "Malloc Error");
details = L_S(STR_PAGE_MSG, S_ID(IDS_MSG_MALLOC_ERROR_DET),
@@ -369,6 +371,7 @@ namespace pv
_session->refresh(0);
break;
case SigSession::Data_overflow:
dsv_info("MainWindow::on_session_error(),Data_overflow, stop capture");
_session->stop_capture();
title = L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DATA_OVERFLOW), "Data Overflow");
details = L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DATA_OVERFLOW_DET),
@@ -566,7 +569,7 @@ namespace pv
}
if (_session->is_working()){
dsv_info("Save data: stop the current device.");
dsv_info("Save data: stop the current device.");
_session->stop_capture();
}
@@ -581,7 +584,7 @@ namespace pv
using pv::dialogs::StoreProgress;
if (_session->is_working()){
dsv_info("Export data: stop the current device.");
dsv_info("Export data: stop the current device.");
_session->stop_capture();
}

View File

@@ -172,6 +172,7 @@ namespace pv
if (_is_working){
dsv_info("The current device is working, now to stop it.");
dsv_info("SigSession::set_default_device(), stop capture");
stop_capture();
}
@@ -577,7 +578,7 @@ namespace pv
if (!_is_working)
return;
dsv_info("%s", "Stop collect.");
dsv_info("Stop collect.");
if (_bClose)
{
@@ -1568,6 +1569,7 @@ namespace pv
// Stop decode thread.
clear_all_decoder(false);
dsv_info("SigSession::Close(), stop capture");
stop_capture();
// TODO: This should not be necessary
@@ -1811,8 +1813,10 @@ namespace pv
case DS_EV_CURRENT_DEVICE_DETACH:
{
if (_is_working)
if (_is_working){
dsv_info("SigSession::on_device_lib_event,DS_EV_CURRENT_DEVICE_DETACH, stop capture");
stop_capture();
}
_callback->trigger_message(DSV_MSG_CURRENT_DEVICE_DETACHED);
}