From e1e781bb2135ef78592226f1a3eaba4925702f1f Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 3 May 2021 16:38:41 -0700 Subject: :star: --- NET/worlds/scape/VideoManager.java | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 NET/worlds/scape/VideoManager.java (limited to 'NET/worlds/scape/VideoManager.java') diff --git a/NET/worlds/scape/VideoManager.java b/NET/worlds/scape/VideoManager.java new file mode 100644 index 0000000..9dc0293 --- /dev/null +++ b/NET/worlds/scape/VideoManager.java @@ -0,0 +1,52 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VideoManager +/* */ { +/* 15 */ static Hashtable streams = new Hashtable(); +/* */ +/* */ public static VideoSurface get(String url, int rows, int w, int h) +/* */ { +/* 19 */ Object ob = streams.get(url); +/* */ +/* */ VideoSurface stream; +/* 22 */ if (ob == null) +/* */ { +/* 24 */ VideoSurface stream = new VideoSurface( +/* 25 */ null, rows, w, h); +/* 26 */ streams.put(url, stream); +/* */ } +/* */ else +/* */ { +/* 30 */ stream = (VideoSurface)ob; +/* */ } +/* */ +/* 33 */ stream.incReferenceCount(); +/* 34 */ stream.open(url); +/* 35 */ return stream; +/* */ } +/* */ +/* */ public static void release(VideoSurface stream) +/* */ { +/* 40 */ stream.decReferenceCount(); +/* 41 */ if (stream.getReferenceCount() == 0) +/* */ { +/* 43 */ streams.remove(stream.getVideoUrl()); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VideoManager.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file -- cgit v1.2.3