[vlc-devel] commit: jvlc: fix the native type for drawable (Filippo Carone )
git version control
git at videolan.org
Sat Jul 19 23:47:16 CEST 2008
vlc | branch: master | Filippo Carone <littlejohn at videolan.org> | Sat Jul 19 23:48:55 2008 +0200| [0a53ef618b5b986b83cd894e154203952c889a25]
jvlc: fix the native type for drawable
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0a53ef618b5b986b83cd894e154203952c889a25
---
.../java/org/videolan/jvlc/internal/LibVlc.java | 4 ++--
.../org/videolan/jvlc/internal/LibVlcImpl.java | 7 +++----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java b/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
index 4a6438f..e4add27 100644
--- a/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
+++ b/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
@@ -41,7 +41,7 @@ public interface LibVlc extends Library
LibVlc INSTANCE = (LibVlc) Native.loadLibrary("vlc", LibVlc.class);
LibVlc SYNC_INSTANCE = (LibVlc) Native.synchronizedLibrary(INSTANCE);
-
+
public static class libvlc_exception_t extends Structure
{
@@ -414,7 +414,7 @@ public interface LibVlc extends Library
void libvlc_media_player_stop(LibVlcMediaInstance media_player, libvlc_exception_t exception);
- void libvlc_media_player_set_drawable(LibVlcMediaInstance libvlc_media_player, long drawable,
+ void libvlc_media_player_set_drawable(LibVlcMediaInstance libvlc_media_player, int drawable,
libvlc_exception_t exception);
long libvlc_media_player_get_length(LibVlcMediaInstance instance, libvlc_exception_t exception);
diff --git a/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java b/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
index 93506e6..bdbc921 100644
--- a/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
+++ b/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
@@ -48,7 +48,7 @@ public class LibVlcImpl
public static void main(String[] args) throws InterruptedException
{
- LibVlc libVlc = LibVlc.INSTANCE;
+ LibVlc libVlc = LibVlc.SYNC_INSTANCE;
libvlc_exception_t exception = new libvlc_exception_t();
libVlc.libvlc_exception_init(exception);
@@ -117,10 +117,9 @@ public class LibVlcImpl
frame.getContentPane().add(panel);
frame.pack();
- long drawable = com.sun.jna.Native.getComponentID(canvas);
+ int drawable = (int) com.sun.jna.Native.getComponentID(canvas);
+ libVlc.libvlc_video_set_parent(libvlc_instance_t, drawable, exception);
libVlc.libvlc_media_player_play(mediaPlayer, exception);
-
- libVlc.libvlc_media_player_set_drawable(mediaPlayer, drawable, exception);
}
}
More information about the vlc-devel
mailing list