Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmetic fixes to the Web Control #468

Merged
merged 2 commits into from
Aug 31, 2017

Conversation

genius3000
Copy link
Contributor

This covers one issue from #442, Web Control showing the wrong count of cameras.

Currently it just shows the count of cameras as the count of threads, which is only correct when running one camera with a single motion.conf file. Once you have a separate camera1.conf and so on, the thread count will always be one higher than the camera count.
In a similar manner, the stream preview section can duplicate a preview when motion is mis-configured with multiple cameras. If you leave stream_port enabled in motion.conf and use the same port in one of the camera files, it will show that preview twice.

The fixes for both are quite non-invasive and provide a cosmetic improvement.

genius3000 added 2 commits August 17, 2017 00:22
The camera count was using the thread count, which is wrong
if we have more than one thread (in most cases).
When running multiple cameras or a single camera with the
config `camera` lines, motion creates a thread for each
camera (even if just the one).
A mis-configuration can easily happen where the `stream_port`
option remains set in `motion.conf`. This causes the Web control
preview section to show a duplicate of one stream.
Prevent this by knowing that if we are multi-threaded,
the main thread has no active camera and don't loop over it.
@Mr-Dave Mr-Dave merged commit 9f4f0e9 into Motion-Project:master Aug 31, 2017
@genius3000 genius3000 deleted the master+web_cam_count branch September 11, 2017 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants