androidmedia: Clear err if we don't have an optional camera field/constant

Fixes startup on devices where those fields/constants are not found.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5130>
This commit is contained in:
Ryan Pavlik 2023-07-19 18:08:16 -05:00 committed by GStreamer Marge Bot
parent e31407f9d2
commit ec201c6577

View file

@ -988,6 +988,7 @@ _init_classes (void)
} }
} else { } else {
android_hardware_camera_parameters.EFFECT_EMBOSS = NULL; android_hardware_camera_parameters.EFFECT_EMBOSS = NULL;
g_clear_error (&err);
} }
fieldID = fieldID =
@ -1009,6 +1010,7 @@ _init_classes (void)
} }
} else { } else {
android_hardware_camera_parameters.EFFECT_SKETCH = NULL; android_hardware_camera_parameters.EFFECT_SKETCH = NULL;
g_clear_error (&err);
} }
fieldID = fieldID =
@ -1030,6 +1032,7 @@ _init_classes (void)
} }
} else { } else {
android_hardware_camera_parameters.EFFECT_NEON = NULL; android_hardware_camera_parameters.EFFECT_NEON = NULL;
g_clear_error (&err);
} }
fieldID = fieldID =
@ -1528,6 +1531,7 @@ _init_classes (void)
} }
} else { } else {
android_hardware_camera_parameters.SCENE_MODE_BACKLIGHT = NULL; android_hardware_camera_parameters.SCENE_MODE_BACKLIGHT = NULL;
g_clear_error (&err);
} }
fieldID = fieldID =
@ -1549,6 +1553,7 @@ _init_classes (void)
} }
} else { } else {
android_hardware_camera_parameters.SCENE_MODE_FLOWERS = NULL; android_hardware_camera_parameters.SCENE_MODE_FLOWERS = NULL;
g_clear_error (&err);
} }
fieldID = fieldID =
@ -1570,6 +1575,7 @@ _init_classes (void)
} }
} else { } else {
android_hardware_camera_parameters.SCENE_MODE_AR = NULL; android_hardware_camera_parameters.SCENE_MODE_AR = NULL;
g_clear_error (&err);
} }
fieldID = fieldID =
@ -1591,6 +1597,7 @@ _init_classes (void)
} }
} else { } else {
android_hardware_camera_parameters.SCENE_MODE_HDR = NULL; android_hardware_camera_parameters.SCENE_MODE_HDR = NULL;
g_clear_error (&err);
} }
fieldID = fieldID =