[Android] [PATCH 06/13] libvlc: add VLCObject
Jean-Baptiste Kempf
jb at videolan.org
Thu Jan 15 20:16:36 CET 2015
On 15 Jan, Thomas Guillem wrote :
> +struct event_thread {
> + bool b_run;
> + pthread_mutex_t lock;
> + pthread_cond_t cond;
> + pthread_t thread;
> + EVENT_QUEUE queue;
> + jweak jobj_calling;
> +};
This struct needs repacking.
> +#define GET_CLASS(clazz, str) do { \
> + (clazz) = (*env)->FindClass(env, (str)); \
> + if (!(clazz)) { \
> + LOGE("FindClass(%s) failed", (str)); \
> + return -1; \
> + } \
> + (clazz) = (jclass) (*env)->NewGlobalRef(env, (clazz)); \
> + if (!(clazz)) { \
> + LOGE("NewGlobalRef(%s) failed", (str)); \
> + return -1; \
> + } \
> +} while (0)
Cannot you static inline this?
> +#define GET_ID(get, id, clazz, str, args) do { \
> + (id) = (*env)->get(env, (clazz), (str), (args)); \
> + if (!(id)) { \
> + LOGE(#get"(%s) failed", (str)); \
> + return -1; \
> + } \
> +} while (0)
And that?
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the Android
mailing list