diff --git a/sys/androidcamera/gst-android-hardware-camera.c b/sys/androidcamera/gst-android-hardware-camera.c index 2352e93c86..92dc95d4d6 100644 --- a/sys/androidcamera/gst-android-hardware-camera.c +++ b/sys/androidcamera/gst-android-hardware-camera.c @@ -104,10 +104,12 @@ static struct jmethodID getSupportedSceneModes; jmethodID getSupportedWhiteBalance; jmethodID getVerticalViewAngle; + jmethodID getVideoStabilization; jmethodID getWhiteBalance; jmethodID getZoom; jmethodID getZoomRatios; jmethodID isSmoothZoomSupported; + jmethodID isVideoStabilizationSupported; jmethodID isZoomSupported; jmethodID setAntibanding; jmethodID setColorEffect; @@ -118,6 +120,7 @@ static struct jmethodID setPreviewFpsRange; jmethodID setPreviewSize; jmethodID setSceneMode; + jmethodID setVideoStabilization; jmethodID setWhiteBalance; jmethodID setZoom; jmethodID unflatten; @@ -371,6 +374,8 @@ _init_classes (void) getExposureCompensationStep, "()F"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, getFlashMode, "()Ljava/lang/String;"); + GST_DVM_GET_METHOD (android_hardware_camera_parameters, getFocalLength, + "()F"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, getFocusMode, "()Ljava/lang/String;"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, @@ -408,6 +413,8 @@ _init_classes (void) getSupportedWhiteBalance, "()Ljava/util/List;"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, getVerticalViewAngle, "()F"); + GST_DVM_GET_METHOD (android_hardware_camera_parameters, getVideoStabilization, + "()Z"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, getWhiteBalance, "()Ljava/lang/String;"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, getZoom, "()I"); @@ -415,6 +422,8 @@ _init_classes (void) "()Ljava/util/List;"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, isSmoothZoomSupported, "()Z"); + GST_DVM_GET_METHOD (android_hardware_camera_parameters, + isVideoStabilizationSupported, "()Z"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, isZoomSupported, "()Z"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, setAntibanding, @@ -437,6 +446,8 @@ _init_classes (void) "(Ljava/lang/String;)V"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, setWhiteBalance, "(Ljava/lang/String;)V"); + GST_DVM_GET_METHOD (android_hardware_camera_parameters, setVideoStabilization, + "(Z)V"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, setZoom, "(I)V"); GST_DVM_GET_METHOD (android_hardware_camera_parameters, unflatten, "(Ljava/lang/String;)V"); @@ -3034,6 +3045,17 @@ gst_ahc_parameters_get_vertical_view_angle (GstAHCParameters * self) return angle; } +gboolean +gst_ahc_parameters_get_video_stabilization (GstAHCParameters * self) +{ + JNIEnv *env = gst_dvm_get_env (); + gboolean ret; + + ret = AHCP_CALL (return FALSE, Boolean, getVideoStabilization); + + return ret; +} + const gchar * gst_ahc_parameters_get_white_balance (GstAHCParameters * self) { @@ -3111,6 +3133,17 @@ gst_ahc_parameters_is_smooth_zoom_supported (GstAHCParameters * self) return supported; } +gboolean +gst_ahc_parameters_is_video_stabilization_supported (GstAHCParameters * self) +{ + JNIEnv *env = gst_dvm_get_env (); + gboolean supported; + + supported = AHCP_CALL (return FALSE, Boolean, isVideoStabilizationSupported); + + return supported; +} + gboolean gst_ahc_parameters_is_zoom_supported (GstAHCParameters * self) { @@ -3242,6 +3275,18 @@ gst_ahc_parameters_set_scene_mode (GstAHCParameters * self, const gchar * value) return TRUE; } + +gboolean +gst_ahc_parameters_set_video_stabilization (GstAHCParameters * self, + gboolean toggle) +{ + JNIEnv *env = gst_dvm_get_env (); + + AHCP_CALL (return FALSE, Void, setVideoStabilization, toggle); + + return TRUE; +} + gboolean gst_ahc_parameters_set_white_balance (GstAHCParameters * self, const gchar * value) diff --git a/sys/androidcamera/gst-android-hardware-camera.h b/sys/androidcamera/gst-android-hardware-camera.h index 6ce80337c3..9e58ac3029 100644 --- a/sys/androidcamera/gst-android-hardware-camera.h +++ b/sys/androidcamera/gst-android-hardware-camera.h @@ -204,12 +204,15 @@ void gst_ahc_parameters_supported_scene_modes_free (GList * list); GList *gst_ahc_parameters_get_supported_white_balance (GstAHCParameters * self); void gst_ahc_parameters_supported_white_balance_free (GList * list); gfloat gst_ahc_parameters_get_vertical_view_angle (GstAHCParameters * self); +gboolean gst_ahc_parameters_get_video_stabilization (GstAHCParameters * self); const gchar *gst_ahc_parameters_get_white_balance (GstAHCParameters * self); gint gst_ahc_parameters_get_zoom (GstAHCParameters * self); /* GList */ GList *gst_ahc_parameters_get_zoom_ratios (GstAHCParameters * self); void gst_ahc_parameters_zoom_ratios_free (GList * list); gboolean gst_ahc_parameters_is_smooth_zoom_supported (GstAHCParameters * self); +gboolean gst_ahc_parameters_is_video_stabilization_supported ( + GstAHCParameters * self); gboolean gst_ahc_parameters_is_zoom_supported (GstAHCParameters * self); gboolean gst_ahc_parameters_set_antibanding (GstAHCParameters * self, const gchar * antibanding); @@ -231,6 +234,8 @@ gboolean gst_ahc_parameters_set_scene_mode (GstAHCParameters * self, const gchar * value); gboolean gst_ahc_parameters_set_white_balance (GstAHCParameters * self, const gchar * value); +gboolean gst_ahc_parameters_set_video_stabilization (GstAHCParameters * self, + gboolean toggle); gboolean gst_ahc_parameters_set_zoom (GstAHCParameters * self, gint value); gboolean gst_ahc_parameters_unflatten (GstAHCParameters * self, const gchar * flattened);