Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Cleanly handle going from 1 -> 0 devices and going from 1 -> 0 -> 1 devices.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Now that we cache the device-node for the active camera, remove_camera_device
and its callers can be simplified.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
If the camera is actually changed then camera_changed already gets called
from either camera_play() or on_source_change().
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
And thus avoid stopping and restarting the stream for no reason.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Before this patch cheese showed a "No device found" message when started
without any devices connected, and would keep showing this after the user
plugged in a webcam. The new cam also could not be selected from the
preferences dialog.
After this patch cheese will automatically switch to showing video from a
newly plugged in webcam (when it had no devices before).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
cheese-preferences already keeps track of which cameras there are and is in
control of selecting camera resolution and the source-device. This patch also
makes it control of start / stop, thereby logical grouping all camera-control
code in a single place.
Having all camera control code in a single place makes dealing with various
hotplug issues a lot easier.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
This centralizes camera-change handling, and adds a check for their being
no camera removing a whole bunch of glib Critical messages being printed
when cheese is started without a camera.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
And use it to stop recording / the photo countdown when we get an error
while either one is active.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
There is no technical reason to disable the effect selector while shooting
a video. Likewise there is no technical reason to disallow start / stop
recording / shooting, or changing mode when the effect selector is change.
Removing these unnecessary limitations simplifies the code, and allows users
to change effects while recording a video.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
When shooting, the preferences action is disabled. If the preferences
dialog is shown, the resolution and capture device can still be changed,
so hide the dialog when the preferences action is disabled.
|
|
Changing the resolution or camera device while recording can lead to a
crash, so avoid the problem by disabling the preferences action whenever
the mode change actions are disabled. Fixes bug 670782.
|
|
GStreamer >= 1.1.4 requires fully specifying the video-capture-source caps,
otherwise Cheese prints this:
(cheese:22606): cheese-WARNING **: Filter caps do not completely specify the output format: gstcapsfilter.c(348): gst_capsfilter_prepare_buf (): /GstCameraBin:camerabin/GstCapsFilter:videobin-capsfilter:
Output caps are unfixed: video/x-raw, framerate=(fraction)30/1, width=(int)640, height=(int)480, format=(string){ YUY2, YV12, BGR, RGB, I420 }, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
and video-recording is broken. Fixes bug 707391.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If effects modules are missing, do not load them into EffectsManager to
skip showing them in the UI. Fixes bug 702995.
|
|
|
|
|
|
|
|
|
|
gnome-software uses the desktop file categories to sort the applications
it shows. This commit fixes the categories according to the freedesktop
spec, so that Cheese will appear in the correct category.
For more information:
http://standards.freedesktop.org/menu-spec/latest/apa.html
http://standards.freedesktop.org/menu-spec/latest/apas02.html
|
|
|
|
|
|
|
|
|
|
If a more detailed error has already been set (through a GError return
from libcheese), do not override it when changing state to null.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Free the GList, as well as the video formats in the list.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
If a camera device which can do 1600x900 at 10 FPS and 1280x800 @ 25
FPS, then 1600x900 is not really the best format, as 10 FPS leads to a
bad user experience.
Improve the situation by constraining
cheese_camera_device_get_best_format() to return the format with the
highest resolution with a width greater than 640 pixels and a framerate
of greater the 15 FPS.
If no mode matching the widh >= 640 && frame_rate >= 15 criteria is found,
get_best_format will behave as before as simply return the highest resolution
mode.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Limit the caps returned by cheese_camera_device_get_caps_for_format() to
the maximum framerate supported at the requested resolution. This is
necessary because GStreamer first selects a format and then a framerate,
resulting in it picking for 1280x720 as an example, YUYV @ 15 FPS,
instead of MJPEG @ 30 FPS (which will be converted to i420 by the
videoconvert element in camerabin2), or at 1600x1200 YUYV @ 5 fps
instead of MJPEG @ 10 fps.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|