Commit ea3999b1 authored by Edward Wang's avatar Edward Wang Committed by Jean-Baptiste Kempf
Browse files

jni: Correct the function prototypes


Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 414eede1
......@@ -137,7 +137,7 @@ static void length_changed_callback(const libvlc_event_t *ev, void *data)
pthread_mutex_unlock(&monitor->doneMutex);
}
libvlc_media_t *new_media(jint instance, JNIEnv *env, jobject thiz, jstring fileLocation, bool noOmx, bool noVideo)
libvlc_media_t *new_media(jlong instance, JNIEnv *env, jobject thiz, jstring fileLocation, bool noOmx, bool noVideo)
{
libvlc_instance_t *libvlc = (libvlc_instance_t*)instance;
jboolean isCopy;
......@@ -454,7 +454,7 @@ void Java_org_videolan_vlc_LibVLC_setEventManager(JNIEnv *env, jobject thiz, job
}
jobjectArray Java_org_videolan_vlc_LibVLC_readMediaMeta(JNIEnv *env,
jobject thiz, jint instance, jstring mrl)
jobject thiz, jlong instance, jstring mrl)
{
jobjectArray array = (*env)->NewObjectArray(env, 8,
(*env)->FindClass(env, "java/lang/String"),
......@@ -496,7 +496,7 @@ jobjectArray Java_org_videolan_vlc_LibVLC_readMediaMeta(JNIEnv *env,
}
void Java_org_videolan_vlc_LibVLC_readMedia(JNIEnv *env, jobject thiz,
jint instance, jstring mrl, jboolean novideo)
jlong instance, jstring mrl, jboolean novideo)
{
/* Release previous media player, if any */
releaseMediaPlayer(env, thiz);
......@@ -629,7 +629,7 @@ jboolean Java_org_videolan_vlc_LibVLC_hasVideoTrack(JNIEnv *env, jobject thiz,
}
jobjectArray Java_org_videolan_vlc_LibVLC_readTracksInfo(JNIEnv *env, jobject thiz,
jint instance, jstring mrl)
jlong instance, jstring mrl)
{
/* get java class */
jclass cls = (*env)->FindClass( env, "org/videolan/vlc/TrackInfo" );
......
......@@ -114,7 +114,7 @@ static void thumbnailer_unlock(void *opaque, void *picture, void *const *pixels)
* return null if the thumbail generation failed.
**/
jbyteArray Java_org_videolan_vlc_LibVLC_getThumbnail(JNIEnv *env, jobject thiz,
jint instance, jstring filePath,
jlong instance, jstring filePath,
jint width, jint height)
{
libvlc_instance_t *libvlc = (libvlc_instance_t *)instance;
......
......@@ -21,7 +21,7 @@
#ifndef LIBVLCJNI_UTILS_H
#define LIBVLCJNI_UTILS_H
libvlc_media_t *new_media(jint libvlc, JNIEnv *env, jobject thiz, jstring filePath, bool noOmx, bool noVideo);
libvlc_media_t *new_media(jlong instance, JNIEnv *env, jobject thiz, jstring fileLocation, bool noOmx, bool noVideo);
#endif // LIBVLCJNI_UTILS_H
......@@ -312,7 +312,7 @@ public class LibVLC {
* @param instance: the instance of libVLC
* @param mrl: the media mrl
*/
private native void readMedia(int instance, String mrl, boolean novideo);
private native void readMedia(long instance, String mrl, boolean novideo);
/**
* Return true if there is currently a running media player.
......@@ -408,16 +408,16 @@ public class LibVLC {
* Get a media thumbnail.
* @return a bytearray with the RGBA thumbnail data inside.
*/
private native byte[] getThumbnail(int instance, String mrl, int i_width, int i_height);
private native byte[] getThumbnail(long instance, String mrl, int i_width, int i_height);
/**
* Return true if there is a video track in the file
*/
private native boolean hasVideoTrack(int instance, String mrl);
private native boolean hasVideoTrack(long instance, String mrl);
private native String[] readMediaMeta(int instance, String mrl);
private native String[] readMediaMeta(long instance, String mrl);
private native TrackInfo[] readTracksInfo(int instance, String mrl);
private native TrackInfo[] readTracksInfo(long instance, String mrl);
public native int getAudioTracksCount();
......@@ -446,7 +446,7 @@ public class LibVLC {
/**
* Return the length of the stream, in milliseconds
*/
private native long getLengthFromLocation(int instance, String mrl);
private native long getLengthFromLocation(long instance, String mrl);
private native void setEventManager(EventManager eventManager);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment