androidmedia: Run gst-indent over everything once again

This commit is contained in:
Sebastian Dröge 2016-08-01 10:30:29 +03:00
parent 8748ce94f4
commit 2ff2ad9353
3 changed files with 220 additions and 145 deletions

View file

@ -2154,7 +2154,8 @@ gst_ah_camera_auto_focus (GstAHCamera * self,
org_freedesktop_gstreamer_androidmedia_gstahccallback.constructor,
*((jlong *) & cb), *((jlong *) & user_data));
if (err) {
GST_ERROR ("Failed to create org.freedesktop.gstreamer.androidmedia.GstAhcCallback object");
GST_ERROR
("Failed to create org.freedesktop.gstreamer.androidmedia.GstAhcCallback object");
g_clear_error (&err);
goto done;
}
@ -2171,7 +2172,7 @@ gst_ah_camera_auto_focus (GstAHCamera * self,
ret = TRUE;
done:
if (err)
g_clear_error(&err);
g_clear_error (&err);
if (object)
gst_amc_jni_object_local_unref (env, object);
@ -2333,8 +2334,7 @@ gst_ah_camera_open (gint camera_id)
android_hardware_camera.klass, android_hardware_camera.open, &object,
camera_id);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.open: %s",
err->message);
GST_ERROR ("Failed to call android.hardware.Camera.open: %s", err->message);
g_clear_error (&err);
goto done;
}
@ -2433,7 +2433,8 @@ gst_ah_camera_set_error_callback (GstAHCamera * self, GstAHCErrorCallback cb,
org_freedesktop_gstreamer_androidmedia_gstahccallback.constructor,
*((jlong *) & cb), *((jlong *) & user_data));
if (err) {
GST_ERROR ("Failed to create org.freedesktop.gstreamer.androidmedia.GstAhcCallback object");
GST_ERROR
("Failed to create org.freedesktop.gstreamer.androidmedia.GstAhcCallback object");
g_clear_error (&err);
goto done;
}
@ -2474,7 +2475,8 @@ gst_ah_camera_set_preview_callback_with_buffer (GstAHCamera * self,
org_freedesktop_gstreamer_androidmedia_gstahccallback.constructor,
*((jlong *) & cb), *((jlong *) & user_data));
if (err) {
GST_ERROR ("Failed to create org.freedesktop.gstreamer.androidmedia.GstAhcCallback object");
GST_ERROR
("Failed to create org.freedesktop.gstreamer.androidmedia.GstAhcCallback object");
g_clear_error (&err);
goto done;
}
@ -2483,7 +2485,8 @@ gst_ah_camera_set_preview_callback_with_buffer (GstAHCamera * self,
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera.setPreviewCallbackWithBuffer, object);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.setPreviewCallbackWithBuffer: %s",
GST_ERROR
("Failed to call android.hardware.Camera.setPreviewCallbackWithBuffer: %s",
err->message);
goto done;
}
@ -3071,7 +3074,8 @@ gst_ahc_parameters_get_antibanding (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getAntibanding, &antibanding);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getAntibanding: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getAntibanding: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3096,7 +3100,8 @@ gst_ahc_parameters_get_color_effect (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getColorEffect, &color_effect);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getColorEffect: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getColorEffect: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3120,7 +3125,8 @@ gst_ahc_parameters_get_exposure_compensation (GstAHCParameters * self)
gst_amc_jni_call_int_method (env, &err, self->object,
android_hardware_camera_parameters.getExposureCompensation, &ev);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getExposureCompensation: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getExposureCompensation: %s",
err->message);
g_clear_error (&err);
return -1;
@ -3139,7 +3145,8 @@ gst_ahc_parameters_get_exposure_compensation_step (GstAHCParameters * self)
gst_amc_jni_call_float_method (env, &err, self->object,
android_hardware_camera_parameters.getExposureCompensationStep, &step);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getExposureCompensationStep: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getExposureCompensationStep: %s",
err->message);
g_clear_error (&err);
return 0.0;
@ -3159,7 +3166,8 @@ gst_ahc_parameters_get_flash_mode (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getFlashMode, &flash_mode);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getFlashMode: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getFlashMode: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3183,7 +3191,8 @@ gst_ahc_parameters_get_focal_length (GstAHCParameters * self)
gst_amc_jni_call_float_method (env, &err, self->object,
android_hardware_camera_parameters.getFocalLength, &length);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getFocalLength: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getFocalLength: %s",
err->message);
g_clear_error (&err);
return 0.0;
@ -3203,7 +3212,8 @@ gst_ahc_parameters_get_focus_mode (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getFocusMode, &focus_mode);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getFocusMode: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getFocusMode: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3227,7 +3237,8 @@ gst_ahc_parameters_get_horizontal_view_angle (GstAHCParameters * self)
gst_amc_jni_call_float_method (env, &err, self->object,
android_hardware_camera_parameters.getHorizontalViewAngle, &angle);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getHorizontalViewAngle: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getHorizontalViewAngle: %s",
err->message);
g_clear_error (&err);
return 0.0;
@ -3246,7 +3257,8 @@ gst_ahc_parameters_get_max_exposure_compensation (GstAHCParameters * self)
gst_amc_jni_call_int_method (env, &err, self->object,
android_hardware_camera_parameters.getMaxExposureCompensation, &max);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getMaxExposureCompensation: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getMaxExposureCompensation: %s",
err->message);
g_clear_error (&err);
return 0;
@ -3265,7 +3277,8 @@ gst_ahc_parameters_get_max_zoom (GstAHCParameters * self)
gst_amc_jni_call_int_method (env, &err, self->object,
android_hardware_camera_parameters.getMaxZoom, &max);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getMaxZoom: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getMaxZoom: %s",
err->message);
g_clear_error (&err);
return -1;
@ -3284,7 +3297,8 @@ gst_ahc_parameters_get_min_exposure_compensation (GstAHCParameters * self)
gst_amc_jni_call_int_method (env, &err, self->object,
android_hardware_camera_parameters.getMinExposureCompensation, &min);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getMinExposureCompensation: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getMinExposureCompensation: %s",
err->message);
g_clear_error (&err);
return 0;
@ -3303,7 +3317,8 @@ gst_ahc_parameters_get_preview_format (GstAHCParameters * self)
gst_amc_jni_call_int_method (env, &err, self->object,
android_hardware_camera_parameters.getPreviewFormat, &format);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getPreviewFormat: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getPreviewFormat: %s",
err->message);
g_clear_error (&err);
return 0;
@ -3332,7 +3347,8 @@ gst_ahc_parameters_get_preview_fps_range (GstAHCParameters * self,
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.getPreviewFpsRange, range);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getPreviewFpsRange: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getPreviewFpsRange: %s",
err->message);
goto done;
}
@ -3371,7 +3387,8 @@ gst_ahc_parameters_get_preview_size (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getPreviewSize, &jsize);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getPreviewSize: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getPreviewSize: %s",
err->message);
goto done;
}
@ -3417,7 +3434,8 @@ gst_ahc_parameters_get_scene_mode (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getSceneMode, &scene_mode);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getSceneMode: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getSceneMode: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3442,7 +3460,8 @@ gst_ahc_parameters_get_supported_antibanding (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getSupportedAntibanding, &list);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getSupportedAntibanding: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getSupportedAntibanding: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3488,7 +3507,8 @@ gst_ahc_parameters_get_supported_color_effects (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getSupportedColorEffects, &list);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getSupportedColorEffects: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getSupportedColorEffects: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3534,7 +3554,8 @@ gst_ahc_parameters_get_supported_flash_modes (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getSupportedFlashModes, &list);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getSupportedFlashModes: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getSupportedFlashModes: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3580,7 +3601,8 @@ gst_ahc_parameters_get_supported_focus_modes (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getSupportedFocusModes, &list);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getSupportedFocusModes: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getSupportedFocusModes: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3626,7 +3648,8 @@ gst_ahc_parameters_get_supported_preview_formats (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getSupportedPreviewFormats, &list);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getSupportedPreviewFormats: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getSupportedPreviewFormats: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3672,7 +3695,8 @@ gst_ahc_parameters_get_supported_preview_fps_range (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getSupportedPreviewFpsRange, &list);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getSupportedPreviewFpsRange: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getSupportedPreviewFpsRange: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3720,7 +3744,8 @@ gst_ahc_parameters_get_supported_preview_sizes (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getSupportedPreviewSizes, &list);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getSupportedPreviewSizes: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getSupportedPreviewSizes: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3772,7 +3797,8 @@ gst_ahc_parameters_get_supported_scene_modes (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getSupportedSceneModes, &list);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getSupportedSceneModes: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getSupportedSceneModes: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3818,7 +3844,8 @@ gst_ahc_parameters_get_supported_white_balance (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getSupportedWhiteBalance, &list);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getSupportedWhiteBalance: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getSupportedWhiteBalance: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3863,7 +3890,8 @@ gst_ahc_parameters_get_vertical_view_angle (GstAHCParameters * self)
gst_amc_jni_call_float_method (env, &err, self->object,
android_hardware_camera_parameters.getVerticalViewAngle, &angle);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getVerticalViewAngle: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getVerticalViewAngle: %s",
err->message);
g_clear_error (&err);
return 0.0;
@ -3882,7 +3910,8 @@ gst_ahc_parameters_get_video_stabilization (GstAHCParameters * self)
gst_amc_jni_call_boolean_method (env, &err, self->object,
android_hardware_camera_parameters.getVideoStabilization, &ret);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getVideoStabilization: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getVideoStabilization: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -3902,7 +3931,8 @@ gst_ahc_parameters_get_white_balance (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getWhiteBalance, &white_balance);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getWhiteBalance: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getWhiteBalance: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3946,7 +3976,8 @@ gst_ahc_parameters_get_zoom_ratios (GstAHCParameters * self)
gst_amc_jni_call_object_method (env, &err, self->object,
android_hardware_camera_parameters.getZoomRatios, &list);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.getZoomRatios: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.getZoomRatios: %s",
err->message);
g_clear_error (&err);
return NULL;
@ -3991,7 +4022,8 @@ gst_ahc_parameters_is_smooth_zoom_supported (GstAHCParameters * self)
gst_amc_jni_call_boolean_method (env, &err, self->object,
android_hardware_camera_parameters.isSmoothZoomSupported, &supported);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.isSmoothZoomSupported: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.isSmoothZoomSupported: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4011,7 +4043,8 @@ gst_ahc_parameters_is_video_stabilization_supported (GstAHCParameters * self)
android_hardware_camera_parameters.isVideoStabilizationSupported,
&supported);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.isVideoStabilizationSupported: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.isVideoStabilizationSupported: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4030,7 +4063,8 @@ gst_ahc_parameters_is_zoom_supported (GstAHCParameters * self)
gst_amc_jni_call_boolean_method (env, &err, self->object,
android_hardware_camera_parameters.isZoomSupported, &supported);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.isZoomSupported: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.isZoomSupported: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4054,7 +4088,8 @@ gst_ahc_parameters_set_antibanding (GstAHCParameters * self,
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setAntibanding, antibanding);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setAntibanding: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setAntibanding: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4078,7 +4113,8 @@ gst_ahc_parameters_set_color_effect (GstAHCParameters * self,
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setColorEffect, color_effect);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setColorEffect: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setColorEffect: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4097,7 +4133,8 @@ gst_ahc_parameters_set_exposure_compensation (GstAHCParameters * self,
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setExposureCompensation, value);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setExposureCompensation: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setExposureCompensation: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4120,7 +4157,8 @@ gst_ahc_parameters_set_flash_mode (GstAHCParameters * self, const gchar * value)
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setFlashMode, flash_mode);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setFlashMode: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setFlashMode: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4143,7 +4181,8 @@ gst_ahc_parameters_set_focus_mode (GstAHCParameters * self, const gchar * value)
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setFocusMode, focus_mode);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setFocusMode: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setFocusMode: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4161,7 +4200,8 @@ gst_ahc_parameters_set_preview_format (GstAHCParameters * self, gint format)
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setPreviewFormat, format);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setPreviewFormat: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setPreviewFormat: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4180,7 +4220,8 @@ gst_ahc_parameters_set_preview_fps_range (GstAHCParameters * self,
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setPreviewFpsRange, min, max);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setPreviewFpsRange: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setPreviewFpsRange: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4199,7 +4240,8 @@ gst_ahc_parameters_set_preview_size (GstAHCParameters * self,
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setPreviewSize, width, height);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setPreviewSize: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setPreviewSize: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4222,7 +4264,8 @@ gst_ahc_parameters_set_scene_mode (GstAHCParameters * self, const gchar * value)
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setSceneMode, scene_mode);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setSceneMode: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setSceneMode: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4242,7 +4285,8 @@ gst_ahc_parameters_set_video_stabilization (GstAHCParameters * self,
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setVideoStabilization, toggle);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setVideoStabilization: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setVideoStabilization: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4266,7 +4310,8 @@ gst_ahc_parameters_set_white_balance (GstAHCParameters * self,
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.setWhiteBalance, white_balance);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.setWhiteBalance: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.setWhiteBalance: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -4308,7 +4353,8 @@ gst_ahc_parameters_unflatten (GstAHCParameters * self, const gchar * flattened)
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_camera_parameters.unflatten, v_str);
if (err) {
GST_ERROR ("Failed to call android.hardware.Camera.Parameters.unflatten: %s",
GST_ERROR
("Failed to call android.hardware.Camera.Parameters.unflatten: %s",
err->message);
g_clear_error (&err);
ret = FALSE;

View file

@ -98,26 +98,51 @@ gst_ah_sensor_sensor_sizes_init (void)
gint type;
gsize size;
} types[] = {
{AHS_SENSOR_TYPE_ACCELEROMETER, sizeof (GstAHSAccelerometerValues)},
{AHS_SENSOR_TYPE_AMBIENT_TEMPERATURE, sizeof (GstAHSAmbientTemperatureValues)},
{AHS_SENSOR_TYPE_GAME_ROTATION_VECTOR, sizeof (GstAHSGameRotationVectorValues)},
{AHS_SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR, sizeof (GstAHSGeomagneticRotationVectorValues)},
{AHS_SENSOR_TYPE_GRAVITY, sizeof (GstAHSGravityValues)},
{AHS_SENSOR_TYPE_GYROSCOPE, sizeof (GstAHSGyroscopeValues)},
{AHS_SENSOR_TYPE_GYROSCOPE_UNCALIBRATED, sizeof (GstAHSGyroscopeUncalibratedValues)},
{AHS_SENSOR_TYPE_HEART_RATE, sizeof (GstAHSHeartRateValues)},
{AHS_SENSOR_TYPE_LIGHT, sizeof (GstAHSLightValues)},
{AHS_SENSOR_TYPE_LINEAR_ACCELERATION, sizeof (GstAHSLinearAccelerationValues)},
{AHS_SENSOR_TYPE_MAGNETIC_FIELD, sizeof (GstAHSMagneticFieldValues)},
{AHS_SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED, sizeof (GstAHSMagneticFieldUncalibratedValues)},
{AHS_SENSOR_TYPE_ORIENTATION, sizeof (GstAHSOrientationValues)},
{AHS_SENSOR_TYPE_PRESSURE, sizeof (GstAHSPressureValues)},
{AHS_SENSOR_TYPE_PROXIMITY, sizeof (GstAHSProximityValues)},
{AHS_SENSOR_TYPE_RELATIVE_HUMIDITY, sizeof (GstAHSRelativeHumidityValues)},
{AHS_SENSOR_TYPE_ROTATION_VECTOR, sizeof (GstAHSRotationVectorValues)},
{AHS_SENSOR_TYPE_STEP_COUNTER, sizeof (GstAHSStepCounterValues)},
{AHS_SENSOR_TYPE_STEP_DETECTOR, sizeof (GstAHSStepDetectorValues)},
};
{
AHS_SENSOR_TYPE_ACCELEROMETER, sizeof (GstAHSAccelerometerValues)}
, {
AHS_SENSOR_TYPE_AMBIENT_TEMPERATURE,
sizeof (GstAHSAmbientTemperatureValues)}
, {
AHS_SENSOR_TYPE_GAME_ROTATION_VECTOR,
sizeof (GstAHSGameRotationVectorValues)}
, {
AHS_SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR,
sizeof (GstAHSGeomagneticRotationVectorValues)}
, {
AHS_SENSOR_TYPE_GRAVITY, sizeof (GstAHSGravityValues)}
, {
AHS_SENSOR_TYPE_GYROSCOPE, sizeof (GstAHSGyroscopeValues)}
, {
AHS_SENSOR_TYPE_GYROSCOPE_UNCALIBRATED,
sizeof (GstAHSGyroscopeUncalibratedValues)}
, {
AHS_SENSOR_TYPE_HEART_RATE, sizeof (GstAHSHeartRateValues)}
, {
AHS_SENSOR_TYPE_LIGHT, sizeof (GstAHSLightValues)}
, {
AHS_SENSOR_TYPE_LINEAR_ACCELERATION,
sizeof (GstAHSLinearAccelerationValues)}
, {
AHS_SENSOR_TYPE_MAGNETIC_FIELD, sizeof (GstAHSMagneticFieldValues)}
, {
AHS_SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED,
sizeof (GstAHSMagneticFieldUncalibratedValues)}
, {
AHS_SENSOR_TYPE_ORIENTATION, sizeof (GstAHSOrientationValues)}
, {
AHS_SENSOR_TYPE_PRESSURE, sizeof (GstAHSPressureValues)}
, {
AHS_SENSOR_TYPE_PROXIMITY, sizeof (GstAHSProximityValues)}
, {
AHS_SENSOR_TYPE_RELATIVE_HUMIDITY, sizeof (GstAHSRelativeHumidityValues)}
, {
AHS_SENSOR_TYPE_ROTATION_VECTOR, sizeof (GstAHSRotationVectorValues)}
, {
AHS_SENSOR_TYPE_STEP_COUNTER, sizeof (GstAHSStepCounterValues)}
, {
AHS_SENSOR_TYPE_STEP_DETECTOR, sizeof (GstAHSStepDetectorValues)}
,};
g_assert_null (sensor_sizes);
@ -696,8 +721,7 @@ gst_ah_sensor_create_listener (GstAHSensorCallback sensor_cb,
org_freedesktop_gstreamer_androidmedia_gstahscallback.klass,
org_freedesktop_gstreamer_androidmedia_gstahscallback.constructor,
UNION_CAST (sensor_cb, jlong),
UNION_CAST (accuracy_cb, jlong),
UNION_CAST (user_data, jlong));
UNION_CAST (accuracy_cb, jlong), UNION_CAST (user_data, jlong));
if (err) {
GST_ERROR ("Failed to create listener callback class");
g_clear_error (&err);
@ -722,7 +746,8 @@ gst_ah_sensor_register_listener (GstAHSensorManager * self,
android_hardware_sensor_manager.registerListener, &success,
listener->object, sensor->object, (jint) delay);
if (err) {
GST_ERROR ("Failed to call android.hardware.SensorManager.registerListener: %s",
GST_ERROR
("Failed to call android.hardware.SensorManager.registerListener: %s",
err->message);
g_clear_error (&err);
return FALSE;
@ -742,7 +767,8 @@ gst_ah_sensor_unregister_listener (GstAHSensorManager * self,
gst_amc_jni_call_void_method (env, &err, self->object,
android_hardware_sensor_manager.unregisterListener, listener->object);
if (err) {
GST_ERROR ("Failed to call android.hardware.SensorManager.unregisterListener: %s",
GST_ERROR
("Failed to call android.hardware.SensorManager.unregisterListener: %s",
err->message);
g_clear_error (&err);
}

View file

@ -144,7 +144,8 @@ gst_ahs_src_get_sensor_type (void)
{AHS_SENSOR_TYPE_ACCELEROMETER, "accelerometer"},
{AHS_SENSOR_TYPE_AMBIENT_TEMPERATURE, "ambient-temperature"},
{AHS_SENSOR_TYPE_GAME_ROTATION_VECTOR, "game-rotation-vector"},
{AHS_SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR, "geomagnetic-rotation-vector"},
{AHS_SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR,
"geomagnetic-rotation-vector"},
{AHS_SENSOR_TYPE_GRAVITY, "gravity"},
{AHS_SENSOR_TYPE_GYROSCOPE, "gyroscope"},
{AHS_SENSOR_TYPE_GYROSCOPE_UNCALIBRATED, "gyroscope-uncalibrated"},
@ -152,7 +153,8 @@ gst_ahs_src_get_sensor_type (void)
{AHS_SENSOR_TYPE_LIGHT, "light"},
{AHS_SENSOR_TYPE_LINEAR_ACCELERATION, "linear-acceleration"},
{AHS_SENSOR_TYPE_MAGNETIC_FIELD, "magnetic-field"},
{AHS_SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED, "magnetic-field-uncalibrated"},
{AHS_SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED,
"magnetic-field-uncalibrated"},
{AHS_SENSOR_TYPE_ORIENTATION, "orientation"},
{AHS_SENSOR_TYPE_PRESSURE, "pressure"},
{AHS_SENSOR_TYPE_PROXIMITY, "proximity"},
@ -590,7 +592,8 @@ gst_ahs_src_update_smoothing (GstAHSSrc * self, const GstAHSensorEvent * event)
} else {
for (i = 0; i < self->sample_length; i++)
self->current_sample[i] =
(1-self->alpha) * self->current_sample[i] + self->alpha * event->data.values[i];
(1 - self->alpha) * self->current_sample[i] +
self->alpha * event->data.values[i];
}
}