Added preview-supported property to qtcamera.ini If the camera source does not support preview then camerabin2 will misbehave if we enable preview
Use QString::toLatin1() instead of QString::toAscii()
Updated copyright year
Reworked synchronous video recording stop The issue with QtCamGStreamerMessageListener::waitForMessage() is that gst_bus_timed_pop_filtered() will drop the messages not matching our type. This means our handlers might not process such messages. What we do now is pass a custom DoneHandler subclass in QtCamVideoMode which will wait on a QWaitCondition for video-done to be received. Since video-done is sent from the streaming thread and DoneHandler is installed as a sync handler, we are sure to block the UI thread until video gets saved.
Try to load the encoding profiles from DATA_DIR if needed
Reworked DoneHandler to avoid race conditions If we start capturing the 2nd image before the first gets saved then we accidentally try to rename the 1st image to the 2nd image. We now only try to rename if we have a temporarily file name and a mode file name. Since video mode only sets tempFileName then we should be fine as we don't really allow recording a new video before the old one gets saved. For images, we simply use the filename from the structure for the saved() signal and fall back to the mode fileName if it's empty without overwriting the members of QtCamModePrivate
Disable viewfinder filters in video mode and enable them in image mode
Record video in a hidden directory then copy it to target directory. This is to avoid tracker indexing the video being recorded and waste CPU time. The problem with tracker is it keeps getting update events because the file is being written to. Tracker will ignore them but that still wastes CPU.
Code cleanup
Added copyright headers and COPYING file.
Removed a stray debugging output
Changes to night mode handling: * FPS is now a numerator only and we ask camerabin for ranges instead of exact fps. * We set the image capture caps without any FPS for now. * Dropped the night property for the modes. We will handle it automatically.
Added a new property (nightMode) to QtCamMode to use the night framerate
Moved setCaps() to QtCamModePrivate
Initial implementation