summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/ftnoir_tracker_pt_dialog.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-20 06:24:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-03-20 06:24:33 +0100
commit7536ac46d919ab2a85d6ea3876e3a725af971e3f (patch)
treefd7dc713f2fe5ec7abbacddcbefbc91e3139ccd8 /tracker-pt/ftnoir_tracker_pt_dialog.cpp
parent761fe827269d4cf34d33caadbef37d885cccc615 (diff)
tracker/pt: camera changes
- move dt handling here, from ITracker impl - don't depend on other PT headers. we'd like to reuse the code. - adjust return value convention. - get rid of dt_valid - return fps as a double Adjust usages in ITracker impl and dialog.
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt_dialog.cpp')
-rw-r--r--tracker-pt/ftnoir_tracker_pt_dialog.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp
index 5c7c788b..6851e3fd 100644
--- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp
+++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp
@@ -121,7 +121,7 @@ void TrackerDialog_PT::poll_tracker_info_impl()
CamInfo info;
if (tracker && tracker->get_cam_info(&info))
{
- ui.caminfo_label->setText(QStringLiteral("%1x%2 @ %3 FPS").arg(info.res_x).arg(info.res_y).arg(info.fps));
+ ui.caminfo_label->setText(QStringLiteral("%1x%2 @ %3 FPS").arg(info.res_x).arg(info.res_y).arg(iround(info.fps)));
// display point info
const int n_points = tracker->get_n_points();
@@ -151,7 +151,9 @@ void TrackerDialog_PT::show_camera_settings()
cv::VideoCapture& cap = *tracker->camera;
CamInfo info;
- if (tracker->camera.get_info(info))
+ bool status;
+ std::tie(status, info) = tracker->camera.get_info();
+ if (status)
video_property_page::show_from_capture(cap, info.idx);
}
}