summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/VideoManager.java
blob: 9dc0293c13c68e72cbf13467ad4f0ea2a5924119 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*    */ package NET.worlds.scape;
/*    */ 
/*    */ import java.util.Hashtable;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class VideoManager
/*    */ {
/* 15 */   static Hashtable<String, VideoSurface> 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
 */