mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 07:08:23 +00:00
androidcamera: Fix compilation issues
This commit is contained in:
parent
e42e7317f9
commit
d56f094ce6
3 changed files with 33 additions and 22 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue