1 Home
linuxer.gr edited this page 2020-09-08 12:28:41 +00:00

Background:

  • Camera monitor indicates the status of the camera, but it not enough to control the on/off status.

  • Microphone mute/unmute status, has no visual indicator and is difficult to remember the switch position in the Volume Icon.

  • User can not be all the time in front of the monitor, in order to check the webcam status.

  • Such solutions, as below or by plugging in and out the usb cable, are considered funny (not to say rediculous) and unacceptable on any environment (home or business)

    Screenshot

  • v4l2-ctl does not provide a direct way to switch Camera, either On, or Off [Important!, ref to the Solution] section below

    Screenshot


  • Note: alsamixer (yes still exists under pulseaudio, doe not provide further Get Capture Device feedback, so in order to disable microphone permanently is not possible to be done, without disabling the Audio Device, as noted here


Solution (Why so?):

  • Provide an additional, or standalone, webcam & microphone switch which loads and unloads the uvc driver, in order to be on the safe side, as much as possible,

  • Provide Blacklist/Whitelist Functions, more or less aka this, in order to change permanently your settings,

  • Always remember that, nobody forces you to use it, if you do not want it. Linux is freedom of choices.

  • No actual V4L2 controller (Capturing On/Off, if violated) exists.

News:

  • 2nd of Feb, 2020, final Development Stage for Release, Closed Project's Target Issue #1, External Events (hacking) Warnings and Logs, please read it for further details

  • 4th of Feb,2020, Closed milestone #4

  • 5th of Feb, 2020, new Release 1.1, was created and considering around the next step, to add Permanent Actions Menu Options:

  • 7th of Feb, 2020, Finished basic Development. Qt5 and some other functions have been added, check below, or at #5

  • 8th of Feb, 2020, Confirmed Qt5 Build, Gnome 3 Running OK - Next releases, as from 1.2 will be only Qt5 builds

  • Screnshot
  • At 15th of February, 2020, the V4L2 Capture control algorithm was developed and finished. For the case below, Camera Monitor was unable to find, both Camera & Capturing Statuses, if System was not rebooted, thus after rmmod -f uvcvideo and modprobe uvcvideo, due to the creation of the (deleted) /dev/video(x) devices.

  • At 17th of February 2020, the function of inspecting, if the camera went from Off to Capture Status, added. Release 1.4-1 is on the go.

  • 26th of February, the big release 2.0-1 came out, finally, after a lot of development, testing and debugging.

Screenshot

  • code algorithm, working under any condition:

Screenshot

Camera Control vs Camera Monitor

  • In Such Conditions of V4L2 kernel bug, when Camera Switches On/Off caused by hacking Capture events, Camera Monitor's way, in not enough, so the project is considered outdated, and even unsafe to use. The reason is that it does not catch the real status of the V4L2 uvcdriver status, versus Camera Control (above), because user's action is required if something changes..... (See below).

image

  • Found V4L2 limitations, forcing for Reboot. If V4L2 Video On, comes to Number 60, by any Hacking/Unwanted Action, it is mandatory to reboot, because Kernel does not generate more devices and Video Capture is not possible.

image

  • A notification for this has been created, because the user `has to Reboot the Machine'

image

  • Applications Limits happen when the User force the Switch to Off from Capturing, so if logs are as below:

Screenshot

  • then some applications may stop Capturing, so if the applications are needed, they must be restarted, in order to operate.

  • System notifications, on Reboot, such as below, must not be taken seriously. They are caused by Switching the camera Off and On, probably. After Rebooting, everything comes back to normal.

DSC_0034



Project History:

  • Created at 23th of January 2020, from scratch with Free Pascal, please ref. to the below, why
  • Redesigned and further Developed at 28th of January 2020, in order to provide Camera and Mic status alone with On/Off and Mute/Unmute fuctions
  • Added feeling of Malware or unwanted functions, i.e. if Camera switches On, when is Off, the tray icon will change state accordingly. Tha same is valid for the microphone mute/unmute
  • Added System Blacklist/Whitelist Kernel Modules Functions, new menus, etc.
  • Fixed bugs of code, at 10th of February 2020, which prevented the Undo function of Audio, properly. Preparing next release 1.3-1.
  • Modules are reloading fine (confirmed after long testing). Finally Fixed Bug of File Stream Load to TStringList Object at 10th of February 2020.
  • Removed Unnecessary Password Reset from System's menu. Now, on every system's action, Password is being cleared and asked, for Security Reasons, i.e. if the User is not using the Desktop, an unauthorized by somebody else action, to be prevented.
  • Finalized and all Bugs code correction at 15th of February 2020. Big changes due to new webcam status, replacing fully the old Camera Monitor Commit

Why on Free (Object) Pascal + Bash and not Python3 or any other?

Some of the main reasons are:

  • Easier code maintenance, really important in the long term

  • Nice memory footprint... 29.4 MB (on 1st stage of Development) better than camera monitor) with much more Graphical User Interface (two icon trays, one About Form and one Main Form), versus 23.2 MB of Camera Monitor Python3 (one trayicon, no Graphical User Interface). For Desktop PCs is not a big deal, but Linux does not run only on Desktops PCs.

    Screenshot

  • Latest Stable Optimized build (-O3) memory footprint, latest stage of development (1.4-1) with all Menus, Forms and Icons, 35.5 MB vs Python 2 Camera Monitor's 35.6 MB (Yes, another benefit of Free Pascal Compiler vs Python Interpreter) :

    Screenshot

    Screenshot

  • Faster startup, menus, etc.

  • Robust tested Programming Language, over 30 years of Development

  • Nice Gui touch (Contemporary Looking Components)

  • Very big support community, fast responding

  • 'It's Security is based on the Level of Code and not on any Virtual Machine', unlike Python or Java

  • The above is enhanced, on this project, due to Bash commands interacting with Linux Kernel only

  • Others

GitLab bug, shows the Project as Visual Basic and a part as Free Pascal, which is incorrect

  • Screenshot



Camera Control Final Release Qt5, 1.2 Release.


Video Reproduction:

  • Steps executed before starting this Video

  • Cheese Photo and Video Video capture runs as "malware application".

  • Note that the Camera Control Application does not run yet

  • Terminal (below on the left is the "hacker" emulation.

  • Video Steps:

  • Will open the Camera Control and freeze Cheese.

  • Will emulate Hacking Actions on the Terminal.

  • Cheese restarted, so the module could not be removed from "Hackers", actions. Will go again with sudo rmmod -f uvcvideo, sorry it is not shown by mistake on the video, you may try it by yourself.

  • Closing Cheese.

  • Now cheese is frozen again. This is now the default action of Camera Off.

  • Logs Cleared and Shield Icon returned with normal status.

  • Systems Actions Menu (new).

  • On the Reboot Message, if Cancel is pressed the Whitelisting of the Camera will roll-back (Undone) Blacklisted, depending on the last Chozen Action.

  • Note the Errors. They are both correct, ever since Camera was not Blacklisted before.

  • Note the new Menus per Icon.

  • That's It!

  • Please report, by opening your possible issues on Project's GitLab Page, after reading the Closed ones.