1 /*****************************************************************************
2 * input-jni.cc: JNI native input functions for VLC Java Bindings
3 *****************************************************************************
4 * Copyright (C) 1998-2006 the VideoLAN team
6 * Authors: Filippo Carone <filippo@carone.org>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
24 *****************************************************************************/
27 #include <vlc/libvlc.h>
28 /* JVLC internal imports, generated by gcjh */
29 #include "../includes/Input.h"
32 JNIEXPORT jlong JNICALL Java_org_videolan_jvlc_Input__1getLength (JNIEnv *env, jobject _this)
39 res = libvlc_media_instance_get_length( input, &exception );
41 libvlc_media_instance_release(input);
47 JNIEXPORT jfloat JNICALL Java_org_videolan_jvlc_Input__1getPosition (JNIEnv *env, jobject _this)
54 res = libvlc_media_instance_get_position( input, &exception );
55 libvlc_media_instance_release(input);
61 JNIEXPORT jlong JNICALL Java_org_videolan_jvlc_Input__1getTime (JNIEnv *env, jobject _this)
68 res = libvlc_media_instance_get_time( input, &exception );
69 libvlc_media_instance_release(input);
75 JNIEXPORT jfloat JNICALL Java_org_videolan_jvlc_Input__1getFPS (JNIEnv *env, jobject _this)
82 res = libvlc_media_instance_get_fps( input, &exception );
83 libvlc_media_instance_release(input);
89 JNIEXPORT void JNICALL Java_org_videolan_jvlc_Input__1setTime (JNIEnv *env, jobject _this, jlong time)
95 libvlc_media_instance_set_time( input, time, &exception );
96 libvlc_media_instance_release(input);
101 JNIEXPORT void JNICALL Java_org_videolan_jvlc_Input__1setPosition (JNIEnv *env, jobject _this, jfloat position )
107 libvlc_media_instance_set_position( input, position, &exception );
108 libvlc_media_instance_release(input);
112 JNIEXPORT jboolean JNICALL Java_org_videolan_jvlc_Input__1isPlaying (JNIEnv *env, jobject _this)
123 res = libvlc_media_instance_will_play( input, &exception );
124 libvlc_media_instance_release(input);
130 JNIEXPORT jboolean JNICALL Java_org_videolan_jvlc_Input__1hasVout (JNIEnv *env, jobject _this)
140 res = libvlc_media_instance_has_vout( input, &exception );
141 libvlc_media_instance_release(input);