Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
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>
|
|
It is reasonable to pass NULL for argc and argv.
|
|
This makes the file fit in better with the rest of Cheese,
license-wise.
https://bugzilla.gnome.org/show_bug.cgi?id=703239
|
|
Fixes remainder of bug 703123.
|
|
If there is a GST_MESSAGE_ERROR, stop the stream and emit
::state-flags-changed on the CheeseCamera. Handle the state change in
CheeseWindow by showing a generic error message. This message can easily
occur if the video device is busy, such as when another application is
using the webcam.
Fixes bug 703123.
|
|
The move to autocluttersink in 3.9 causes a regression compared to 3.8,
where if an effect's control valve is closed the pipeline will never
transition from paused to playing since the cluttersink is stuck in
paused.
This regression can be triggered the following way:
1) Go the effect selector
2) Go to the next page in the effect selector, so that the now connected
effects from the first page get their control valve set to closed
3) Change resolution or device, so that the pipeline gets stopped and
started again
After 3) the pipeline will be stuck in pause, as the cluttersinks of the
effect previews are stuck in pause.
The cause for this is that with the move to autocluttersink we are no
longer setting the sink's "async" property, see commit 424afdaa 'Use
"autocluttersink" instead of "cluttersink"'.
Setting the "async" property is no longer (easily) doable, since
autocluttersink is a gstbin derived object which has the actual sink
embedded.
Instead this patch fixes the stuck in pause problem by locking the
autocluttersinks of the effect previews into the playing state.
Note that no longer setting of the async property on the sink is also
the root cause of the issue fixed by my patch titled: "Set all valves
open on play". The opening of the main valve is still necessary, since
locking the viewfinder sink's state to PLAYING does not seem a good
idea, the opening of the effects-valve on play OTOH is no longer
necessary.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
If some valves are closed on play, GStreamer will wait for the valves to
open before moving from paused to playing, and a frozen image is shown.
This does not happen on startup since on startup all valves are open,
nor does it happen when changing video-format directly after startup,
since all valves will still be open. As soon as
cheese_camera_toggle_effects_pipeline() has been called once, any
subsequent attempt to change the video format (and thus stopping and
re-starting the pipeline) will result in a frozen image.
This patch fixes this by opening all valves on play, and calling
cheese_camera_toggle_effects_pipeline() with the last active value after
the pipeline transitions to the playing state.
This has the added advantage that unlike before the effects valve will
be closed on startup, rather then staying open till the first call to
cheese_camera_toggle_effects_pipeline().
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Check for the current effect being the same as the one set and if so,
ignore the change.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Add documentation for extra parameters on CheeseCamera signals to avoid
a warning.
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Having the whole effects-preview bin deal with ie 1280x800 images is not
very useful, especially since even when fullscreen on a full-HD monitor,
the preview images are smaller then 640xXXX. This useless high-res
processing for 9 preview images in parallel brings my 2nd gen
core i5 @ 3.1 GHz to its knees, resulting in a non fluid preview panel.
Also after clicking through all effect preview pages, so that all effect
preview textures are connected, cheese will use 1 GB of *resident* RAM
with the example 1280x800 capture resolution.
This patch improves this by downscaling the images from the video-source
to 640xXXX where XXX is determined by the original resolution
aspect-ratio.
After this patch the effects preview framerate is much smoother, and the
latency is noticably less. As a bonus the maximal resident size of
Cheese in this example is reduced to 350 MB.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Otherwise frames intended for the recording are dropped.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
The "no effect" effect is our default value, and thus worth optimizing a
bit. Clearly in the "no effect" effect case adding a videoconvert
element both before and after the element is not needed.
Note we also don't add the videoconvert elements when creating the
initial pipeline, so this also keeps the way the pipeline looks
initially and when "no-effect" is selected consistent.
When starting Cheese with "no-effect" selected, this shaves off another
130 ms of the initial pipeline creation time.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
In cheese_camera_device_get_caps_for_format, simplify the returned caps.
This results in much simpler caps, which as main advantage that they are
way easier to read when trawling to debug logs.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
cheese_camera_device_get_best_format() calls
cheese_camera_device_get_format_list(), which returns a sorted copy of
the format lists, then takes the first element of that list, and
returns a copy of that element. While never freeing the list copy.
This patch fixes this leak by simply making the priv->formats list
sorted so that cheese_camera_device_get_best_format can use it directly
without the need to make (and then later free) a copy.
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Simplify error cleanup in cheese_camera_set_camera_source(). Do not call
g_error_free() on a possible NULL error in
cheese_camera_element_from_effect().
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
There is a bug in wrappercamerabinsrc which causes it to lose its
video-source setting after the pipeline has started, so on a
stop/re-start, as when changing resolution, its video-source has become
NULL, and there is no longer video.
This patch works around this by moving the setting of the video-source
property to cheese_camera_play(), so that it gets (re)set each time
before starting the pipeline.
I've also written a patch fixing the underlying cause, but since the
workaround is simple, and has no adverse effects when the underlying
issue is fixed, it seems a good idea to have this workaround in Cheese,
see here for the gst-plugins-bad fix:
https://bugzilla.gnome.org/show_bug.cgi?id=701915
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
camerabin2 already has a videoconvert element both before and after its
video-source-filter element, so ending the video-source-filter bin with
a videoconvert element puts 2 videoconvert elements behind each other,
which is not really useful.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
This serves 2 purposes. Firstly, it forces GStreamer to actually run the
video source at the configured resolution, rather then say run it at
1600x1200 @ 5 fps and downscale that to 800x600 (still at 5 fps), as
GStreamer opts to do with my Logitech Webcam Pro 9000, when left to its
own auto negotiate code. Secondly, by greatly reducing the amount of
advertised caps (this cam supports lots of different resolutions at many
different framerates per resolution), it avoids a caps intersect
"explosion", reducing the pipeline caps negotiation.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
If the take photo button was pressed while a photo was being taken, an
assert would be triggered by the failed call to
cheese_camera_take_photo_pixbuf(). Avoid this by setting the take photo
button insensitive while a photo is being taken, and setting it
sensitive after the photo has been taken. Fixes bug 699596.
|
|
|
|
Instead of the deprecated cltuter_stage_set_color, use
clutter_actor_set_background_color.
|
|
Instead of using the deprecated clutter_container_add_actor, use
clutter_actor_add_child.
|
|
Since many previews are created, with many cluttersinks, we can't name
the cluttersinks all the same. Passing NULL as the name of the element
will let gstreamer choose the name.
|
|
Create cluttersink with element_factory_make.
|
|
Disambiguate the "Take a photo" string further.
|
|
Fix bug 687042 and bug 687123 by returning NULL from
cheese_camera_get_recorded_time() rather than a const empty string. The
returned NULL can be safely freed with g_free(), whereas freeing the
const string is undefined and leads to a crash with glibc.
|
|
This allows compilation to succeed with
‘-Werror=declaration-after-statement’ passed to GCC.
|
|
Update for new location in GStreamer 1.0.
https://bugzilla.gnome.org/show_bug.cgi?id=680422
|
|
|
|
The element was renamed in GStreamer 1.0.
|
|
There is no video/x-raw-yuv or -rgb, they are both now video/x-raw with
a format field.
|
|
|
|
camerabin2 was renamed to camerabin in GStreamer 1.0.
|
|
The "filter-caps" property doesn't exist on camerabin2.
|
|
caps variable was removed during rebase, but it is still used.
|
|
Camerabin2 maintains its pipeline clock continuously running, this makes
the time reporting for video recording actually report the time since
camerabin2 was initialized.
This patch fixes it by querying the video filesink for the correct
recording time.
|
|
Create WebM profile and use it with camereabin2. Also use presets for
vp8enc.
|
|
Wait for video-done message to signal that capture is over.
|
|
Camerabin2 is the element to post the image-done message, not the camera
source.
|