summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/ftnoir_tracker_pt_dialog.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-12-03 07:12:44 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-12-03 07:13:04 +0100
commitbb0df58647d5894eb7f34295c78f34ad2994ef88 (patch)
treee499901271c7f2ec9f9ebed71649de64161264db /tracker-pt/ftnoir_tracker_pt_dialog.cpp
parent7c5784780fd9c5d9fe0bf5cb3fb2ac2bf6dd0ae0 (diff)
tracker/pt: simplify pointless inheritance
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt_dialog.cpp')
-rw-r--r--tracker-pt/ftnoir_tracker_pt_dialog.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp
index 749ea1ff..d3951bd9 100644
--- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp
+++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp
@@ -142,12 +142,16 @@ void TrackerDialog_PT::set_camera_settings_available(const QString& camera_name)
void TrackerDialog_PT::show_camera_settings()
{
const int idx = ui.camdevice_combo->currentIndex();
+
if (tracker)
{
- cv::VideoCapture* cap = tracker->camera;
- if (cap && cap->isOpened())
+ if (tracker->camera)
{
- video_property_page::show_from_capture(*cap, idx);
+ cv::VideoCapture& cap = *tracker->camera;
+
+ CamInfo info;
+ if (tracker->camera.get_info(info))
+ video_property_page::show_from_capture(cap, info.idx);
}
}
else