Changeset 23529 in osm for applications/editors/josm/plugins
- Timestamp:
- 2010-10-09T19:24:41+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/GpsPlayer.java
r23193 r23529 2 2 3 3 import java.awt.Point; 4 import java.io.File;5 4 import java.sql.Time; 6 5 import java.text.SimpleDateFormat; … … 8 7 import java.util.LinkedList; 9 8 import java.util.List; 10 import java.util.ListIterator;11 import java.util.Timer;12 import java.util.TimerTask;13 14 9 import org.openstreetmap.josm.Main; 15 10 import org.openstreetmap.josm.data.gpx.WayPoint; … … 20 15 private WayPoint prev,curr,next; 21 16 private WayPoint start; 22 private Timer t;23 private TimerTask ani; //for moving trough the list24 17 private boolean autoCenter; 25 18 … … 79 72 80 73 //select the given waypoint as center 81 public void jump(WayPoint p)74 public void goTo(WayPoint p) 82 75 { 83 76 if(ls.contains(p)) … … 98 91 99 92 //walk k waypoints forward/backward 100 public void jumpRel(int k)93 public void move(int k) 101 94 { 102 95 103 96 if ((ls.indexOf(curr)+k>0)&&(ls.indexOf(curr)<ls.size())) //check range 104 97 { 105 jump(ls.get(ls.indexOf(curr)+k));98 goTo(ls.get(ls.indexOf(curr)+k)); 106 99 } 107 100 Main.map.mapView.repaint(); //seperate modell and view logic... … … 109 102 110 103 //select the k-th waypoint 111 public void jump(int k)104 public void goTo(int k) 112 105 { 113 106 if (k>0) … … 115 108 if ((ls.indexOf(curr)+k>0)&&(ls.indexOf(curr)<ls.size())) //check range 116 109 { 117 jump(ls.get(k));110 goTo(ls.get(k)); 118 111 } 119 112 Main.map.mapView.repaint(); … … 124 117 public void jump(Time GPSAbsTime) 125 118 { 126 jump(getWaypoint(GPSAbsTime.getTime()-start.getTime().getTime())); //TODO replace Time by Date? 127 } 128 119 goTo(getWaypoint(GPSAbsTime.getTime()-start.getTime().getTime())); //TODO replace Time by Date? 120 } 121 122 /* 129 123 //go to the position at 130 124 public void jump(Date GPSDate) … … 137 131 m=GPSDate.getMinutes()-start.getTime().getMinutes(); 138 132 h=GPSDate.getHours()-start.getTime().getHours(); 139 diff=s*1000+m*60*1000+h*60*60*1000; // TODOugly hack but nothing else works right140 jump(getWaypoint(diff));141 } 142 133 diff=s*1000+m*60*1000+h*60*60*1000; //FIXME ugly hack but nothing else works right 134 goTo(getWaypoint(diff)); 135 } 136 */ 143 137 //gets only points on the line of the GPS track (between waypoints) nearby the point m 144 138 private Point getInterpolated(Point m) … … 202 196 Point p; 203 197 Point leftP,rightP; 204 Point c = Main.map.mapView.getPoint(getCurr().getEastNorth());205 198 Point p1 = Main.map.mapView.getPoint(getCurr().getEastNorth()); 206 199 Point p2 = getEndpoint(); … … 220 213 //gets further infos for a point between two Waypoints 221 214 public WayPoint getInterpolatedWaypoint(Point m) 222 { int a,b,length,lengthSeg;215 { int length,lengthSeg; 223 216 long timeSeg; 224 217 float ratio; 225 Time base;226 218 Point p2; 227 219 … … 272 264 { 273 265 List<WayPoint> ls; 274 Point p2;275 266 float step; 276 int length;277 267 278 268 step=100/(float)interval; … … 332 322 } 333 323 334 //returns time in ms relati e to startpoint324 //returns time in ms relative to startpoint 335 325 public long getRelativeTime() 336 326 { … … 338 328 } 339 329 330 //returns time in ms relative to startpoint 340 331 public long getRelativeTime(WayPoint p) 341 332 { … … 347 338 public void jump(long relTime) { 348 339 int pos = Math.round(relTime/1000);//TODO ugly quick hack 349 jump(pos);340 goTo(pos); 350 341 //if (autoCenter) Main.map.mapView. 351 342 } -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/PositionLayer.java
r23442 r23529 2 2 3 3 4 import java.sql.Time;5 import java.text.DateFormat;6 4 import java.text.SimpleDateFormat; 7 import java.util.ArrayList; 8 import java.util.Collection; 9 import java.util.Date; 10 import java.util.HashSet; 11 import java.util.Iterator; 5 import java.util.Collections; 12 6 import java.util.LinkedList; 13 7 import java.util.List; 14 import java.util.ListIterator;15 import java.util.Set;16 import java.util.Timer;17 import java.util.TimerTask;18 19 8 import java.awt.Color; 20 import java.awt.Component;21 9 import java.awt.Cursor; 22 import java.awt.Dimension;23 10 import java.awt.Graphics2D; 24 11 import java.awt.Point; 25 12 import java.awt.Rectangle; 26 import java.awt.event.ActionEvent;27 import java.awt.event.KeyEvent;28 import java.awt.event.KeyListener;29 13 import java.awt.event.MouseEvent; 30 14 import java.awt.event.MouseListener; 31 15 import java.awt.event.MouseMotionListener; 16 import java.io.File; 32 17 33 18 import javax.swing.*; … … 36 21 37 22 import org.openstreetmap.josm.Main; 38 import org.openstreetmap.josm.actions.InfoAction;39 23 import org.openstreetmap.josm.data.Bounds; 40 24 import org.openstreetmap.josm.data.gpx.GpxData; 25 import org.openstreetmap.josm.data.gpx.GpxTrack; 26 import org.openstreetmap.josm.data.gpx.GpxTrackSegment; 41 27 import org.openstreetmap.josm.data.gpx.WayPoint; 42 import org.openstreetmap.josm.data.osm.DataSet;43 import org.openstreetmap.josm.data.osm.Node;44 28 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 45 29 import org.openstreetmap.josm.gui.MapView; 46 30 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 47 31 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; 32 import org.openstreetmap.josm.gui.layer.GpxLayer; 48 33 import org.openstreetmap.josm.gui.layer.Layer; 49 34 import org.openstreetmap.josm.plugins.videomapping.video.GPSVideoPlayer; 50 import org.openstreetmap.josm.tools.ImageProvider;51 import org.openstreetmap.josm.tools.Shortcut;52 35 53 36 //Basic rendering and GPS layer interaction 54 37 public class PositionLayer extends Layer implements MouseListener,MouseMotionListener { 55 private static Set<PlayerObserver> observers = new HashSet<PlayerObserver>(); //we have to implement our own Observer pattern56 38 private List<WayPoint> ls; 57 public GpsPlayer player;39 public GpsPlayer gps; 58 40 private boolean dragIcon=false; //do we move the icon by hand? 59 41 private WayPoint iconPosition; 60 42 private Point mouse; 61 43 private ImageIcon icon; 62 private SimpleDateFormat mins;63 private SimpleDateFormat ms;64 44 private SimpleDateFormat gpsTimeCode; 65 p rivate GPSVideoPlayer gps;66 67 public PositionLayer( String name, final List<WayPoint> ls) {68 super( name);69 this.ls=ls;70 player= new GpsPlayer(ls);45 public GPSVideoPlayer gpsVP; 46 47 public PositionLayer(File video, GpxLayer GpsLayer) { 48 super(video.getName()); 49 ls=copyGPSLayer(GpsLayer.data); //TODO This might be outsourced to a seperated track 50 gps= new GpsPlayer(ls); 71 51 icon = new ImageIcon("images/videomapping.png"); 72 mins = new SimpleDateFormat("hh:mm:ss:S");73 ms= new SimpleDateFormat("mm:ss");74 52 gpsTimeCode= new SimpleDateFormat("hh:mm:ss"); 75 53 Main.map.mapView.addMouseListener(this); 76 54 Main.map.mapView.addMouseMotionListener(this); 77 55 gpsVP = new GPSVideoPlayer(video, gps); 56 } 57 58 //make a flat copy 59 private List<WayPoint> copyGPSLayer(GpxData route) 60 { 61 ls = new LinkedList<WayPoint>(); 62 for (GpxTrack trk : route.tracks) { 63 for (GpxTrackSegment segment : trk.getSegments()) { 64 ls.addAll(segment.getWayPoints()); 65 } 66 } 67 Collections.sort(ls); //sort basing upon time 68 return ls; 78 69 } 79 70 … … 88 79 String temp; 89 80 String sep=System.getProperty("line.separator"); 90 temp=tr("{0} {1}% of GPS track",gps .getVideo().getName(),gps.getCoverage()*10+sep);91 temp=temp+gps .getNativePlayerInfos();81 temp=tr("{0} {1}% of GPS track",gpsVP.getVideo().getName(),gpsVP.getCoverage()*10+sep); 82 temp=temp+gpsVP.getNativePlayerInfos(); 92 83 return temp; 93 84 } … … 149 140 //draw current segment points 150 141 g.setColor(Color.YELLOW); 151 if( player.getPrev()!=null)152 { 153 p = Main.map.mapView.getPoint( player.getPrev().getEastNorth());142 if(gps.getPrev()!=null) 143 { 144 p = Main.map.mapView.getPoint(gps.getPrev().getEastNorth()); 154 145 g.drawOval(p.x - 2, p.y - 2, 4, 4); 155 Point p2 = Main.map.mapView.getPoint( player.getCurr().getEastNorth());146 Point p2 = Main.map.mapView.getPoint(gps.getCurr().getEastNorth()); 156 147 g.drawLine(p.x, p.y, p2.x, p2.y); 157 148 } 158 if( player.getNext()!=null)159 { 160 p = Main.map.mapView.getPoint( player.getNext().getEastNorth());149 if(gps.getNext()!=null) 150 { 151 p = Main.map.mapView.getPoint(gps.getNext().getEastNorth()); 161 152 g.drawOval(p.x - 2, p.y - 2, 4, 4); 162 Point p2 = Main.map.mapView.getPoint( player.getCurr().getEastNorth());153 Point p2 = Main.map.mapView.getPoint(gps.getCurr().getEastNorth()); 163 154 g.drawLine(p.x, p.y, p2.x, p2.y); 164 155 } … … 166 157 g.setColor(Color.CYAN); 167 158 g.setBackground(Color.CYAN); 168 LinkedList<WayPoint> ipo=(LinkedList<WayPoint>) player.getInterpolatedLine(5);159 LinkedList<WayPoint> ipo=(LinkedList<WayPoint>) gps.getInterpolatedLine(5); 169 160 for (WayPoint wp : ipo) { 170 161 p=Main.map.mapView.getPoint(wp.getEastNorth()); … … 186 177 else 187 178 { 188 if ( player.getCurr()!=null){189 p=Main.map.mapView.getPoint( player.getCurr().getEastNorth());179 if (gps.getCurr()!=null){ 180 p=Main.map.mapView.getPoint(gps.getCurr().getEastNorth()); 190 181 icon.paintIcon(null, g, p.x-icon.getIconWidth()/2, p.y-icon.getIconHeight()/2); 191 g.drawString(gpsTimeCode.format( player.getCurr().getTime()),p.x-10,p.y-10);182 g.drawString(gpsTimeCode.format(gps.getCurr().getTime()),p.x-10,p.y-10); 192 183 } 193 184 } … … 217 208 private Rectangle getIconRect() 218 209 { 219 Point p = Main.map.mapView.getPoint( player.getCurr().getEastNorth());210 Point p = Main.map.mapView.getPoint(gps.getCurr().getEastNorth()); 220 211 return new Rectangle(p.x-icon.getIconWidth()/2,p.y-icon.getIconHeight()/2,icon.getIconWidth(),icon.getIconHeight()); 221 212 } … … 241 232 if(e.getButton() == MouseEvent.BUTTON1) { 242 233 //is it on the cam icon? 243 if ( player.getCurr()!=null)234 if (gps.getCurr()!=null) 244 235 { 245 236 if (getIconRect().contains(e.getPoint())) … … 267 258 if(wp!=null) 268 259 { 269 player.jump(wp);260 gps.goTo(wp); 270 261 //jump if we know position 271 262 if(wp.attr.containsKey("synced")) 272 263 { 273 if(gps !=null) notifyObservers(player.getRelativeTime()); //call videoplayers to set right position264 if(gpsVP!=null) gpsVP.jumpToGPSTime(gps.getRelativeTime()); //call videoplayers to set right position 274 265 } 275 266 } … … 286 277 mouse=e.getPoint(); 287 278 //restrict to GPS track 288 iconPosition= player.getInterpolatedWaypoint(mouse);279 iconPosition=gps.getInterpolatedWaypoint(mouse); 289 280 290 281 Main.map.mapView.repaint(); … … 294 285 //visualize drag&drop 295 286 public void mouseMoved(MouseEvent e) { 296 if ( player.getCurr()!=null)287 if (gps.getCurr()!=null) 297 288 { 298 289 if (getIconRect().contains(e.getPoint())) … … 308 299 } 309 300 310 public void setGPSPlayer(GPSVideoPlayer player) { 311 this.gps = player; 312 313 } 314 315 public static void addObserver(PlayerObserver observer) { 316 317 observers.add(observer); 318 319 } 320 321 322 323 public static void removeObserver(PlayerObserver observer) { 324 325 observers.remove(observer); 326 327 } 328 329 private static void notifyObservers(long newTime) { 330 331 for (PlayerObserver o : observers) { 332 333 o.jumping(newTime); //TODO has to become just a single procedure? 334 335 } 336 337 } 301 public void setVideopPlayer(GPSVideoPlayer player) { 302 gpsVP=player; 303 304 } 305 306 public GPSVideoPlayer getVideoPlayer() 307 { 308 return gpsVP; 309 } 338 310 } -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoMappingPlugin.java
r23444 r23529 1 1 package org.openstreetmap.josm.plugins.videomapping; 2 2 3 import java.awt.Component;4 3 import java.awt.event.ActionEvent; 5 4 import java.awt.event.KeyEvent; 6 import java.beans.PropertyChangeListener;7 import java.io.File;8 import java.sql.Time;9 5 import java.text.ParseException; 10 6 import java.text.SimpleDateFormat; 11 import java.util.Collections;12 7 import java.util.Date; 13 import java.util.LinkedList;14 import java.util.List;15 16 import javax.swing.Action;17 8 import javax.swing.JCheckBoxMenuItem; 18 9 import javax.swing.JFileChooser; … … 25 16 import org.openstreetmap.josm.plugins.*; 26 17 import org.openstreetmap.josm.plugins.videomapping.video.GPSVideoPlayer; 27 import org.openstreetmap.josm.tools.ImageProvider;28 18 import org.openstreetmap.josm.tools.Shortcut; 29 19 import org.openstreetmap.josm.actions.JosmAction; 30 import org.openstreetmap.josm.data.gpx.GpxData;31 import org.openstreetmap.josm.data.gpx.GpxTrack;32 import org.openstreetmap.josm.data.gpx.GpxTrackSegment;33 import org.openstreetmap.josm.data.gpx.WayPoint;34 import org.openstreetmap.josm.gui.MainMenu;35 import org.openstreetmap.josm.gui.MapFrame;36 20 import org.openstreetmap.josm.gui.MapView; 37 21 import org.openstreetmap.josm.gui.MapView.LayerChangeListener; … … 50 34 public class VideoMappingPlugin extends Plugin implements LayerChangeListener{ 51 35 private JMenu VMenu,VDeinterlacer; 52 private GpxData GPSTrack; 53 private List<WayPoint> ls; 36 private GpxLayer GpsLayer; 54 37 private JosmAction VAdd,VRemove,VStart,Vbackward,Vforward,VJump,Vfaster,Vslower,Vloop; 55 38 private JRadioButtonMenuItem VIntBob,VIntNone,VIntLinear; … … 88 71 { 89 72 VAdd.setEnabled(true); 90 G PSTrack=((GpxLayer) newLayer).data;73 GpsLayer=((GpxLayer) newLayer); 91 74 //TODO append to GPS Layer menu 92 75 } … … 124 107 { 125 108 saveSettings(); 126 ls=copyGPSLayer(GPSTrack);127 109 enableControlMenus(true); 128 layer = new PositionLayer(fc.getSelectedFile() .getName(),ls);110 layer = new PositionLayer(fc.getSelectedFile(),GpsLayer); 129 111 Main.main.addLayer(layer); 130 player = new GPSVideoPlayer(fc.getSelectedFile(), layer.player);131 112 //TODO Check here if we can sync allready now 132 layer.setGPSPlayer(player);133 layer.addObserver(player);134 113 VAdd.setEnabled(false); 135 114 VRemove.setEnabled(true); 136 player.setSubtitleAction(VSubTitles);115 layer.getVideoPlayer().setSubtitleAction(VSubTitles); 137 116 } 138 117 } … … 161 140 } 162 141 }; 163 V backward= new JosmAction(tr("Jump To"), "jumpto", tr("jumps to the entered gps time"),null, false) {142 VJump= new JosmAction(tr("Jump To"), "jumpto", tr("jumps to the entered gps time"),null, false) { 164 143 public void actionPerformed(ActionEvent e) { 165 144 String s =JOptionPane.showInputDialog(tr("please enter GPS timecode"),"10:07:57"); … … 291 270 VMenu.add(Vslower); 292 271 VMenu.add(Vloop); 272 VMenu.add(VJump); 293 273 VMenu.addSeparator(); 294 274 VMenu.add(VCenterIcon); … … 351 331 } 352 332 353 //make a flat copy 354 private List<WayPoint> copyGPSLayer(GpxData route) 355 { 356 ls = new LinkedList<WayPoint>(); 357 for (GpxTrack trk : route.tracks) { 358 for (GpxTrackSegment segment : trk.getSegments()) { 359 ls.addAll(segment.getWayPoints()); 360 } 361 } 362 Collections.sort(ls); //sort basing upon time 363 return ls; 364 } 333 365 334 } -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoObserver.java
r23517 r23529 2 2 3 3 //an Interface for communication for both players 4 public interface PlayerObserver {4 public interface VideoObserver { 5 5 void playing(long time); 6 6 void jumping(long time); -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java
r23193 r23529 1 1 package org.openstreetmap.josm.plugins.videomapping.video; 2 2 import java.awt.Color; 3 import java.awt.Component;4 3 import java.awt.event.ActionEvent; 5 4 import java.awt.event.ActionListener; 6 5 import java.io.File; 7 6 import java.sql.Time; 8 import java.util.Date;9 7 import java.util.List; 10 8 import java.util.Timer; 11 9 import java.util.TimerTask; 12 10 13 import javax.swing.Action;14 11 import javax.swing.JButton; 15 12 import javax.swing.JCheckBoxMenuItem; 16 13 17 import org.openstreetmap.josm.Main;18 14 import org.openstreetmap.josm.data.gpx.WayPoint; 19 15 import org.openstreetmap.josm.plugins.videomapping.GpsPlayer; 20 import org.openstreetmap.josm.plugins.videomapping. PlayerObserver;16 import org.openstreetmap.josm.plugins.videomapping.VideoObserver; 21 17 22 18 //combines video and GPS playback, major control has the video player 23 public class GPSVideoPlayer implements PlayerObserver{ 19 public class GPSVideoPlayer 20 { 24 21 Timer t; 25 TimerTask updateGPS Track;22 TimerTask updateGPS; //sync GPS position here 26 23 private GpsPlayer gps; 27 24 private SimpleVideoPlayer video; … … 60 57 video.addComponent(syncBtn); 61 58 //a observer to communicate 62 SimpleVideoPlayer.addObserver(new PlayerObserver() { //TODO has o become this59 SimpleVideoPlayer.addObserver(new VideoObserver() { //TODO has o become this 63 60 64 61 public void playing(long time) { … … 147 144 } 148 145 149 //jumps in video to the corresponding linked time 150 public void jumpToGPSTime(Time GPSTime) 151 { 152 gps.jump(GPSTime); 153 } 154 155 //jumps in video to the corresponding linked time 146 147 //jumps in video to the corresponding Video time (external triggered) 156 148 public void jumpToGPSTime(long gpsT) 157 149 { 158 if(!synced)150 /* if(!synced) 159 151 { 160 152 //when not synced we can just move the icon to the right position 161 153 gps.jump(new Date(gpsT)); 162 154 Main.map.mapView.repaint(); 163 } 155 }*/ 164 156 video.jump(getVideoTime(gpsT)); 165 157 } … … 238 230 } 239 231 240 //when we clicked on the layer, here we update the video position 241 public void jumping(long time) { 242 if(synced) jumpToGPSTime(gps.getRelativeTime()); 243 244 } 245 232 246 233 public String getNativePlayerInfos() { 247 234 return video.getNativePlayerInfos(); … … 258 245 } 259 246 260 public void playing(long time) {261 // TODO Auto-generated method stub262 263 }264 247 265 248 public void toggleSubtitles() { … … 277 260 } 278 261 279 public void metadata(long time, boolean subtitles) {280 // TODO Auto-generated method stub281 282 }283 262 284 263 -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/SimpleVideoPlayer.java
r23193 r23529 16 16 import java.util.Date; 17 17 import java.util.HashSet; 18 import java.util.Hashtable ;18 import java.util.Hashtable ; 19 19 import java.util.Set; 20 20 import java.util.Timer; … … 32 32 import javax.swing.JSlider; 33 33 import javax.swing.JToggleButton; 34 import javax.swing.SwingUtilities; 34 35 import javax.swing.event.ChangeEvent; 35 36 import javax.swing.event.ChangeListener; 36 37 37 38 import org.openstreetmap.josm.Main; 38 import org.openstreetmap.josm.plugins.videomapping. PlayerObserver;39 import org.openstreetmap.josm.plugins.videomapping.VideoObserver; 39 40 import static org.openstreetmap.josm.tools.I18n.*; 40 41 … … 64 65 private int jumpLength=1000; 65 66 private int loopLength=6000; 66 private static Set< PlayerObserver> observers = new HashSet<PlayerObserver>(); //we have to implement our own Observer pattern67 private static Set<VideoObserver> observers = new HashSet<VideoObserver>(); //we have to implement our own Observer pattern 67 68 68 69 public SimpleVideoPlayer() { … … 101 102 //create updater 102 103 ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(); 103 executorService.scheduleAtFixedRate(new Syncer(this), 0L, 1000L, TimeUnit.MILLISECONDS); 104 executorService.scheduleAtFixedRate(new Runnable() { 105 //We have to do syncing in the main thread 106 public void run() { 107 SwingUtilities.invokeLater(new Runnable() { 108 //here we update 109 public void run() { 110 if (isPlaying()) updateTime(); //if the video is seeking we get a mess 111 } 112 }); 113 } 114 }, 0L, 1000L, TimeUnit.MILLISECONDS); 104 115 //setDefaultCloseOperation(EXIT_ON_CLOSE); 105 116 addWindowListener(this); … … 134 145 speed.setPaintTicks(true); 135 146 speed.setOrientation(Adjustable.VERTICAL); 136 Hashtable labelTable = new Hashtable ();147 Hashtable labelTable = new Hashtable (); 137 148 labelTable.put( new Integer( 0 ), new JLabel("1x") ); 138 149 labelTable.put( new Integer( -200 ), new JLabel("-2x") ); … … 244 255 pack(); 245 256 //send out metadatas to all observers 246 for ( PlayerObserver o : observers) {257 for (VideoObserver o : observers) { 247 258 o.metadata(0, hasSubtitles()); 248 259 } … … 422 433 } 423 434 424 public static void addObserver( PlayerObserver observer) {435 public static void addObserver(VideoObserver observer) { 425 436 426 437 observers.add(observer); … … 430 441 431 442 432 public static void removeObserver( PlayerObserver observer) {443 public static void removeObserver(VideoObserver observer) { 433 444 434 445 observers.remove(observer); … … 438 449 private static void notifyObservers(long newTime) { 439 450 440 for ( PlayerObserver o : observers) {451 for (VideoObserver o : observers) { 441 452 o.playing(newTime); 442 453 }
Note:
See TracChangeset
for help on using the changeset viewer.