[Android] Vout: put the lock declarations in a header file

Adrien Maglo git at videolan.org
Fri Nov 8 14:28:10 CET 2013


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Nov  8 14:22:38 2013 +0100| [7f1b136be5dc28e0c51b53f5e8ed949d086c8760] | committer: Adrien Maglo

Vout: put the lock declarations in a header file

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=7f1b136be5dc28e0c51b53f5e8ed949d086c8760
---

 vlc-android/jni/libvlcjni.c |    5 +----
 vlc-android/jni/vout.h      |   28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/vlc-android/jni/libvlcjni.c b/vlc-android/jni/libvlcjni.c
index 03660ff..aae6fb5 100644
--- a/vlc-android/jni/libvlcjni.c
+++ b/vlc-android/jni/libvlcjni.c
@@ -36,6 +36,7 @@
 
 #include "libvlcjni.h"
 #include "aout.h"
+#include "vout.h"
 #include "utils.h"
 
 #define VOUT_ANDROID_SURFACE 0
@@ -101,10 +102,6 @@ JavaVM *myVm;
 
 static jobject eventHandlerInstance = NULL;
 
-/** vout lock declared in vout.c */
-extern pthread_mutex_t vout_android_lock;
-extern pthread_cond_t vout_android_surf_attached;
-
 static void vlc_event_callback(const libvlc_event_t *ev, void *data)
 {
     JNIEnv *env;
diff --git a/vlc-android/jni/vout.h b/vlc-android/jni/vout.h
new file mode 100644
index 0000000..c3d4fd7
--- /dev/null
+++ b/vlc-android/jni/vout.h
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * vout.h
+ *****************************************************************************
+ * Copyright © 2011-2013 VLC authors and VideoLAN
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef LIBVLCJNI_VOUT_H
+#define LIBVLCJNI_VOUT_H
+
+/* vout lock initialized in vout.c */
+pthread_mutex_t vout_android_lock;
+pthread_cond_t vout_android_surf_attached;
+
+#endif // LIBVLCJNI_VOUT_H



More information about the Android mailing list