System.out.println("real size.");
jvlc.video.setFullscreen(false);
System.out.print("Taking snapshot... ");
- jvlc.video.getSnapshot(System.getProperty("user.dir") + "/snap.png");
+ jvlc.video.getSnapshot(System.getProperty("user.dir") + "/snap.png",0,0);
System.out.println("taken. (see " + System.getProperty("user.dir") + "/snap.png )");
Thread.sleep(2000);
System.out.println("Resizing to 300x300");
/* These are a must*/
#include <jni.h>
+#include <jawt.h>
#include <vlc/libvlc.h>
+#include <stdio.h>
/* JVLC internal imports, generated by gcjh */
#include "../includes/Video.h"
#include "utils.h"
-#include <stdio.h>
+
JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1toggleFullscreen (JNIEnv *env, jobject _this)
{
return res;
}
-JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1getSnapshot (JNIEnv *env, jobject _this, jstring filepath)
+JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1getSnapshot (JNIEnv *env, jobject _this, jstring filepath, jint width, jint height)
{
INIT_FUNCTION;
GET_INPUT_THREAD ;
- libvlc_video_take_snapshot( input, (char *) psz_filepath, &exception );
+ libvlc_video_take_snapshot( input, (char *) psz_filepath,(unsigned int) width,(unsigned int) height, &exception );
libvlc_media_instance_release(input);
CHECK_EXCEPTION ;