From d56f094ce6946c339bdfe53435c7f5c7cf4596af Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Wed, 17 Oct 2012 19:42:59 -0400 Subject: [PATCH] androidcamera: Fix compilation issues --- .../gst-android-graphics-imageformat.c | 11 ++++--- .../gst-android-graphics-surfacetexture.c | 11 ++++--- .../gst-android-hardware-camera.c | 33 ++++++++++++------- 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/sys/androidcamera/gst-android-graphics-imageformat.c b/sys/androidcamera/gst-android-graphics-imageformat.c index 26f649a191..afa724ef06 100644 --- a/sys/androidcamera/gst-android-graphics-imageformat.c +++ b/sys/androidcamera/gst-android-graphics-imageformat.c @@ -38,7 +38,8 @@ static struct jint UNKNOWN; jint YUY2; jint YV12; -} android_graphics_imageformat = {0}; +} android_graphics_imageformat = { +0}; gint ImageFormat_JPEG; gint ImageFormat_NV16; @@ -49,7 +50,7 @@ gint ImageFormat_YUY2; gint ImageFormat_YV12; static gboolean -_init_classes () +_init_classes (void) { JNIEnv *env = gst_dvm_get_env (); @@ -78,7 +79,7 @@ _init_classes () } gboolean -gst_android_graphics_imageformat_init () +gst_android_graphics_imageformat_init (void) { if (!_init_classes ()) { gst_android_graphics_imageformat_deinit (); @@ -89,7 +90,7 @@ gst_android_graphics_imageformat_init () } void -gst_android_graphics_imageformat_deinit () +gst_android_graphics_imageformat_deinit (void) { JNIEnv *env = gst_dvm_get_env (); @@ -105,7 +106,7 @@ gst_ag_imageformat_get_bits_per_pixel (gint format) JNIEnv *env = gst_dvm_get_env (); jint bpp = 0; - bpp = GST_DVM_STATIC_CALL(return -1, Int, + bpp = GST_DVM_STATIC_CALL (return -1, Int, android_graphics_imageformat, getBitsPerPixel, format); return bpp; diff --git a/sys/androidcamera/gst-android-graphics-surfacetexture.c b/sys/androidcamera/gst-android-graphics-surfacetexture.c index 3182a6516f..a532ec9ea1 100644 --- a/sys/androidcamera/gst-android-graphics-surfacetexture.c +++ b/sys/androidcamera/gst-android-graphics-surfacetexture.c @@ -32,10 +32,11 @@ static struct jclass klass; jmethodID constructor; jmethodID release; -} android_graphics_surfacetexture = {0}; +} android_graphics_surfacetexture = { +0}; static gboolean -_init_classes () +_init_classes (void) { JNIEnv *env = gst_dvm_get_env (); @@ -50,7 +51,7 @@ _init_classes () } gboolean -gst_android_graphics_surfacetexture_init () +gst_android_graphics_surfacetexture_init (void) { if (!_init_classes ()) { gst_android_graphics_surfacetexture_deinit (); @@ -61,7 +62,7 @@ gst_android_graphics_surfacetexture_init () } void -gst_android_graphics_surfacetexture_deinit () +gst_android_graphics_surfacetexture_deinit (void) { JNIEnv *env = gst_dvm_get_env (); @@ -105,7 +106,7 @@ gst_ag_surfacetexture_release (GstAGSurfaceTexture * self) { JNIEnv *env = gst_dvm_get_env (); - GST_DVM_CALL(, self->object, Void, android_graphics_surfacetexture, release); + GST_DVM_CALL (, self->object, Void, android_graphics_surfacetexture, release); (*env)->DeleteGlobalRef (env, self->object); g_slice_free (GstAGSurfaceTexture, self); diff --git a/sys/androidcamera/gst-android-hardware-camera.c b/sys/androidcamera/gst-android-hardware-camera.c index 077aff2ef7..853504a232 100644 --- a/sys/androidcamera/gst-android-hardware-camera.c +++ b/sys/androidcamera/gst-android-hardware-camera.c @@ -46,7 +46,8 @@ static struct jmethodID stopPreview; jmethodID stopSmoothZoom; jmethodID unlock; -} android_hardware_camera = {0}; +} android_hardware_camera = { +0}; static struct { @@ -56,7 +57,9 @@ static struct jfieldID orientation; jint CAMERA_FACING_BACK; jint CAMERA_FACING_FRONT; -} android_hardware_camera_camerainfo = {0}; +} android_hardware_camera_camerainfo = { +0}; + gint CameraInfo_CAMERA_FACING_BACK; gint CameraInfo_CAMERA_FACING_FRONT; @@ -65,7 +68,8 @@ static struct jclass klass; jfieldID width; jfieldID height; -} android_hardware_camera_size = {0}; +} android_hardware_camera_size = { +0}; /* TODO: Add other parameters */ static struct @@ -82,32 +86,37 @@ static struct jmethodID setPreviewFpsRange; jmethodID setPreviewSize; jmethodID unflatten; -} android_hardware_camera_parameters = {0}; +} android_hardware_camera_parameters = { +0}; static struct { jclass klass; jmethodID iterator; -} java_util_list = {0}; +} java_util_list = { +0}; static struct { jclass klass; jmethodID hasNext; jmethodID next; -} java_util_iterator = {0}; +} java_util_iterator = { +0}; static struct { jclass klass; jmethodID intValue; -} java_lang_integer = {0}; +} java_lang_integer = { +0}; static struct { jclass klass; jmethodID constructor; -} com_gstreamer_gstahccallback = {0}; +} com_gstreamer_gstahccallback = { +0}; static void gst_ah_camera_on_preview_frame (JNIEnv * env, jclass klass, jbyteArray data, @@ -135,7 +144,7 @@ static JNINativeMethod native_methods[] = { }; static gboolean -_init_classes () +_init_classes (void) { JNIEnv *env = gst_dvm_get_env (); @@ -244,7 +253,7 @@ _init_classes () gboolean -gst_android_hardware_camera_init () +gst_android_hardware_camera_init (void) { if (!_init_classes ()) { gst_android_hardware_camera_deinit (); @@ -255,7 +264,7 @@ gst_android_hardware_camera_init () } void -gst_android_hardware_camera_deinit () +gst_android_hardware_camera_deinit (void) { JNIEnv *env = gst_dvm_get_env (); @@ -353,7 +362,7 @@ done: } gint -gst_ah_camera_get_number_of_cameras () +gst_ah_camera_get_number_of_cameras (void) { JNIEnv *env = gst_dvm_get_env (); gint num_cameras;