mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
androidcamera: Do not advertise zoom capabilities if camera doesn't support zoom
This commit is contained in:
parent
39d7729476
commit
01d6df438d
1 changed files with 18 additions and 4 deletions
|
@ -1326,10 +1326,24 @@ gst_ahc_src_set_focus_mode (GstPhotography * photo, GstFocusMode focus_mode)
|
||||||
static GstPhotoCaps
|
static GstPhotoCaps
|
||||||
gst_ahc_src_get_capabilities (GstPhotography * photo)
|
gst_ahc_src_get_capabilities (GstPhotography * photo)
|
||||||
{
|
{
|
||||||
return GST_PHOTOGRAPHY_CAPS_EV_COMP | GST_PHOTOGRAPHY_CAPS_WB_MODE |
|
GstAHCSrc *self = GST_AHC_SRC (photo);
|
||||||
GST_PHOTOGRAPHY_CAPS_TONE | GST_PHOTOGRAPHY_CAPS_SCENE |
|
|
||||||
GST_PHOTOGRAPHY_CAPS_FLASH | GST_PHOTOGRAPHY_CAPS_ZOOM |
|
GstPhotoCaps caps = GST_PHOTOGRAPHY_CAPS_EV_COMP |
|
||||||
GST_PHOTOGRAPHY_CAPS_FOCUS;
|
GST_PHOTOGRAPHY_CAPS_WB_MODE | GST_PHOTOGRAPHY_CAPS_TONE |
|
||||||
|
GST_PHOTOGRAPHY_CAPS_SCENE | GST_PHOTOGRAPHY_CAPS_FLASH |
|
||||||
|
GST_PHOTOGRAPHY_CAPS_FOCUS | GST_PHOTOGRAPHY_CAPS_ZOOM;
|
||||||
|
|
||||||
|
if (self->camera) {
|
||||||
|
GstAHCParameters *params;
|
||||||
|
|
||||||
|
params = gst_ah_camera_get_parameters (self->camera);
|
||||||
|
if (!gst_ahc_parameters_is_zoom_supported (params))
|
||||||
|
caps &= ~GST_PHOTOGRAPHY_CAPS_ZOOM;
|
||||||
|
|
||||||
|
gst_ahc_parameters_free (params);
|
||||||
|
}
|
||||||
|
|
||||||
|
return caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue