summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/DirectShow.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-12 22:33:32 -0800
committerFuwn <[email protected]>2026-02-12 22:33:32 -0800
commitc7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch)
treedf9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/scape/DirectShow.java
downloadworldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz
worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip
Initial commit
Diffstat (limited to 'NET/worlds/scape/DirectShow.java')
-rw-r--r--NET/worlds/scape/DirectShow.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/NET/worlds/scape/DirectShow.java b/NET/worlds/scape/DirectShow.java
new file mode 100644
index 0000000..9af989b
--- /dev/null
+++ b/NET/worlds/scape/DirectShow.java
@@ -0,0 +1,51 @@
+package NET.worlds.scape;
+
+public class DirectShow implements TextureSurfaceRenderer {
+ static final int nUnitialized = 0;
+ static final int nStopped = 1;
+ static final int nPaused = 2;
+ static final int nPlaying = 3;
+ private int mediaRendererInstancePtr;
+ private int m_hwnd;
+
+ public DirectShow() {
+ nativeInit();
+ this.nInit(0);
+ }
+
+ public DirectShow(int hwnd) {
+ this.m_hwnd = hwnd;
+ nativeInit();
+ this.nInit(hwnd);
+ }
+
+ @Override
+ public void finalize() {
+ this.nTick();
+ this.nStop();
+ this.nShutdown();
+ }
+
+ @Override
+ public void renderTo(int dc) {
+ this.nRenderTo(this.m_hwnd, dc);
+ }
+
+ public static native void nativeInit();
+
+ protected native void nInit(int var1);
+
+ protected native void nShutdown();
+
+ public native void nOpen(String var1);
+
+ public native void nPlay(int var1);
+
+ public native void nStop();
+
+ public native void nPause();
+
+ public native void nRenderTo(int var1, int var2);
+
+ public native int nTick();
+}