Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPlugin.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPlugin.java	(revision 25864)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPlugin.java	(revision 25865)
@@ -5,9 +5,12 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
+import java.beans.PropertyChangeListener;
 import java.io.File;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.Calendar;
 import java.util.Date;
 
+import javax.swing.Action;
 import javax.swing.Box;
 import javax.swing.InputVerifier;
@@ -18,4 +21,5 @@
 import javax.swing.JFileChooser;
 import javax.swing.JFormattedTextField;
+import javax.swing.JLabel;
 import javax.swing.JMenu;
 import javax.swing.JMenuItem;
@@ -66,4 +70,6 @@
     private String mostRecentFolder;
 	private GpxLayer gpsLayer;
+	private VideoPositionLayer videoPositionLayer;
+	private GPSVideoPlayer gpsVideoPlayer;
 
 	public VideoPlugin(PluginInformation info) {
@@ -94,6 +100,6 @@
         VStart = new JosmAction(tr("Play/Pause"), "audio-playpause", tr("starts/pauses video playback"),
                 Shortcut.registerShortcut("videomapping:startstop","Video: "+tr("Play/Pause"),KeyEvent.VK_NUMPAD5, Shortcut.GROUP_DIRECT), false) {            
-            public void actionPerformed(ActionEvent e) {                                
-                
+            public void actionPerformed(ActionEvent e) {
+            	gpsVideoPlayer.pause();                
             }
         };
@@ -101,5 +107,5 @@
                 Shortcut.registerShortcut("videomapping:backward","Video: "+tr("Backward"),KeyEvent.VK_NUMPAD4, Shortcut.GROUP_DIRECT), false) {
             public void actionPerformed(ActionEvent e) {
-               
+            	gpsVideoPlayer.backward();
             }
         };
@@ -107,5 +113,5 @@
                 Shortcut.registerShortcut("videomapping:forward","Video: "+tr("Forward"),KeyEvent.VK_NUMPAD6, Shortcut.GROUP_DIRECT), false) {            
             public void actionPerformed(ActionEvent e) {
-                
+            	gpsVideoPlayer.forward();
                             
             }
@@ -115,5 +121,5 @@
             
             public void actionPerformed(ActionEvent e) {
-                
+            	gpsVideoPlayer.setSpeed(gpsVideoPlayer.getSpeed()+20);
                             
             }
@@ -123,5 +129,5 @@
             
             public void actionPerformed(ActionEvent e) {
-                
+            	gpsVideoPlayer.setSpeed(gpsVideoPlayer.getSpeed()-20);
                             
             }
@@ -129,6 +135,5 @@
         VJump= new JosmAction(tr("Jump To"), "jumpto", tr("jumps to the entered gps time"),null, false) {          
             public void actionPerformed(ActionEvent e) {
-            	
-
+            	showJumpTo();
             }
                             
@@ -138,6 +143,5 @@
                 Shortcut.registerShortcut("videomapping:loop","Video: "+tr("loop"),KeyEvent.VK_NUMPAD7, Shortcut.GROUP_DIRECT), false) {            
             public void actionPerformed(ActionEvent e) {
-
-                            
+            	gpsVideoPlayer.toggleLooping();
             }
         };
@@ -146,18 +150,20 @@
         VCenterIcon = new JCheckBoxMenuItem(new JosmAction(tr("Keep centered"), null, tr("follows the video icon automaticly"),null, false) {            
             public void actionPerformed(ActionEvent e) {
-
-                            
-            }
-        });
-        //now the options menu
+            	videoPositionLayer.setAutoCenter(VCenterIcon.isSelected());
+            }
+        });
+        
         VSubTitles = new JCheckBoxMenuItem(new JosmAction(tr("Subtitles"), null, tr("Show subtitles in video"),null, false) {           
             public void actionPerformed(ActionEvent e) {
-  
-                            
+            	gpsVideoPlayer.setSubtitles(VSubTitles.isSelected());                            
             }
         });
         
         VJumpLength = new JMenuItem(new JosmAction(tr("Jump length"), null, tr("Set the length of a jump"),null, false) {            
-            public void actionPerformed(ActionEvent e) {                        
+            public void actionPerformed(ActionEvent e) {
+            	Object[] possibilities = {"200", "500", "1000", "2000", "10000"};
+                String s = (String)JOptionPane.showInputDialog(Main.parent,tr("Jump in video for x ms"),tr("Jump length"),JOptionPane.QUESTION_MESSAGE,null,possibilities,jumpLength);
+                jumpLength=Integer.getInteger(s);
+                saveProperties();
             }
         });
@@ -165,21 +171,24 @@
         VLoopLength = new JMenuItem(new JosmAction(tr("Loop length"), null, tr("Set the length around a looppoint"),null, false) {            
             public void actionPerformed(ActionEvent e) {
-               
-                            
+            	Object[] possibilities = {"500", "1000", "3000", "5000", "10000"};
+                String s = (String)JOptionPane.showInputDialog(Main.parent,tr("Jump in video for x ms"),tr("Loop length"),JOptionPane.QUESTION_MESSAGE,null,possibilities,loopLength);
+                loopLength=Integer.getInteger(s);
+                saveProperties();
             }
         });        
         VDeinterlacer= new JMenu("Deinterlacer");
         VIntNone= new JRadioButtonMenuItem(new JosmAction(tr("none"), null, tr("no deinterlacing"),null, false) {            
-            public void actionPerformed(ActionEvent e) {                
+            public void actionPerformed(ActionEvent e) {
+            	gpsVideoPlayer.setDeinterlacer("none");
             }
         });
         VIntBob= new JRadioButtonMenuItem(new JosmAction("bob", null, tr("deinterlacing using line doubling"),null, false) {            
             public void actionPerformed(ActionEvent e) {
-
+            	gpsVideoPlayer.setDeinterlacer("bob");
             }
         });
         VIntLinear= new JRadioButtonMenuItem(new JosmAction("linear", null, tr("deinterlacing using linear interpolation"),null, false) {            
             public void actionPerformed(ActionEvent e) {
-
+            	gpsVideoPlayer.setDeinterlacer("linear");
             }
         });
@@ -211,7 +220,10 @@
         	mostRecentFolder=fc.getSelectedFile().getAbsolutePath();
         	saveProperties();
-        	VideoPositionLayer videoPositionLayer= new VideoPositionLayer(gpsLayer);
-        	GPSVideoPlayer gpsVideoPlayer = new GPSVideoPlayer(new SimpleDateFormat("hh:mm:ss") ,videoPositionLayer);
+        	videoPositionLayer= new VideoPositionLayer(gpsLayer);
+        	gpsVideoPlayer = new GPSVideoPlayer(new SimpleDateFormat("hh:mm:ss") ,videoPositionLayer);
+        	gpsVideoPlayer.setJumpLength(jumpLength);
+        	gpsVideoPlayer.setLoopLength(loopLength);
         	gpsVideoPlayer.addVideo(fc.getSelectedFile());
+        	enableVideoControlMenus(true);
         }
 		
@@ -273,4 +285,47 @@
 	}
 	
+	private void showJumpTo()
+	{
+		String s;
+    	try {
+	    	JOptionPane d=new JOptionPane(tr("Jump to"), JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION);	    	
+	    	SimpleDateFormat gpsTimeFormat= new SimpleDateFormat("HH:mm:ss");
+	    	String timerange=gpsTimeFormat.format(videoPositionLayer.getFirstWayPoint().getTime())+" - ";
+	    	timerange=timerange+gpsTimeFormat.format(videoPositionLayer.getLastWayPoint().getTime());
+	    	d.add(new JLabel(timerange)); //TODO for some reason this doesn't work -> use dialog
+	    	final JFormattedTextField inp = new JFormattedTextField(new MaskFormatter("##:##:##"));
+	    	inp.setText(gpsTimeFormat.format( videoPositionLayer.getGPSDate()));
+	    	inp.setInputVerifier(new InputVerifier() {					
+				@Override
+				public boolean verify(JComponent input) {
+					return false;
+				}
+			});
+	    	//hack to set the focus
+	    	SwingUtilities.invokeLater(new Runnable() {
+	            public void run() {
+	            	inp.requestFocus();
+	            	inp.setCaretPosition(0);
+	            }
+	        });
+	    	if(d.showConfirmDialog(Main.main.panel,inp, tr("Jump to GPS time"),JOptionPane.OK_CANCEL_OPTION)==JOptionPane.OK_OPTION)
+	    	{
+	    		//add the day to the time
+	    		Date t = gpsTimeFormat.parse(inp.getText());	    		
+	    		Calendar time = Calendar.getInstance();
+	    		Calendar date = Calendar.getInstance();
+	    		time.setTime(t);
+	    		date.setTime(videoPositionLayer.getFirstWayPoint().getTime());
+	    		time.set(date.get(Calendar.YEAR), date.get(Calendar.MONTH), date.get(Calendar.DATE));
+	            if (t!=null)
+	            {
+	            	videoPositionLayer.jump(time.getTime());
+	            }                       
+	    	}
+    	} catch (ParseException e1) {
+                e1.printStackTrace();
+        }
+	}
+	
 
 	public void activeLayerChange(Layer oldLayer, Layer newLayer) {
Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPositionLayer.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPositionLayer.java	(revision 25864)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPositionLayer.java	(revision 25865)
@@ -47,4 +47,5 @@
 	private final int GPS_INTERVALL=1000;
 	private GPSVideoPlayer gpsVideoPlayer;
+	private boolean autoCenter;
 
 	public VideoPositionLayer(GpxLayer gpsLayer) {
@@ -142,5 +143,5 @@
 	
 	//creates a waypoint for the corresponding time
-	private WayPoint interpolate(Date GPSTime)
+	public WayPoint interpolate(Date GPSTime)
 	{
 		WayPoint before =getWayPointBefore(GPSTime);
@@ -227,4 +228,18 @@
 		
 	}
+	
+	public void jump(Date GPSTime)
+	{
+		setIconPosition(getWayPointBefore(GPSTime));
+		
+	}
+
+	public void setIconPosition(WayPoint wp) {
+		iconPosition=wp;
+		Main.map.mapView.repaint();
+		if (autoCenter)
+			Main.map.mapView.zoomTo(iconPosition.getCoor());
+		
+	}
 
 	public void mouseReleased(MouseEvent e) {
@@ -239,11 +254,10 @@
             		gpsVideoPlayer.jumpTo(wp.getTime());
             	}
-            	iconPosition=wp;
-            	Main.map.mapView.repaint();
+            	setIconPosition(wp);
             }            
         }
 		
 	}
-	
+
 	//finds the first waypoint that is nearby the given point
     private WayPoint getNearestWayPoint(Point mouse)
@@ -341,4 +355,14 @@
 		gpsVideoPlayer=player;
 	}
+
+	public void setAutoCenter(boolean enabled) {
+		autoCenter=enabled;
+		
+	}
+
+	public void unload() {
+		Main.main.removeLayer(this);
+		
+	}
     
 }
Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideo.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideo.java	(revision 25864)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideo.java	(revision 25865)
@@ -96,5 +96,16 @@
 			System.out.println(diff);
 		}
-	}  
+	}
+	
+	public WayPoint getCurrentWayPoint()
+	{
+		if (isSynced())
+		{
+			long videotime=player.getTime();
+			Date gpstime=new Date(start.getTime()+videotime);
+			return videoPositionLayer.interpolate(gpstime);
+		}
+		return null;
+	}
 
 }
Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java	(revision 25864)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java	(revision 25865)
@@ -84,4 +84,19 @@
 		return true;		
 	}
+
+
+	@Override
+	public void update_plays() {		
+		super.update_plays();
+		if (areAllVideosSynced())
+			videoPositionLayer.setIconPosition( videos.get(0).getCurrentWayPoint());
+	}
+	
+	@Override
+	public void windowClosing(WindowEvent arg0) {
+		videoPositionLayer.unload();
+		super.windowClosing(arg0);
+	}
+	
 	
 	
Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayer.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayer.java	(revision 25864)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayer.java	(revision 25865)
@@ -60,5 +60,5 @@
 //basic class of a videoplayer for one video
 public class VideoPlayer extends JFrame implements WindowListener, VideosObserver, VideoPlayerObserver{
-	private static final int notificationIntervall = 1000;
+	private static final int notificationIntervall = 500;
 	protected JPanel screenPanel,controlsPanel,canvasPanel;
     private JSlider timeline;
@@ -111,5 +111,5 @@
 
 	
-	protected void pause(){
+	public void pause(){
 		if (notificationTimer!=null)
 		{
@@ -124,13 +124,38 @@
 	}
 
-	protected void backward() {
+	public void backward() {
 		videoengine.jump(-jumpLength);	
 	}
 
-	protected void forward() {
+	public void forward() {
 		videoengine.jump(jumpLength);	
 	}
 
-	protected void toggleLooping() {
+	public void setSpeed(Integer percent)
+	{
+		speed.setValue(percent);		
+	}
+	
+	public Integer getSpeed()
+	{
+		return speed.getValue();
+	}
+	
+	public void setDeinterlacer(String deinterlacer)
+	{
+		videoengine.setDeinterlacer(deinterlacer);
+	}
+	
+	public void setSubtitles(boolean enabled)
+	{
+		videoengine.setSubtitles(enabled);
+	}
+
+	public void mute()
+	{
+		videoengine.mute();
+	}
+
+	public void toggleLooping() {
 		if(loopingTimer==null)
 		{
@@ -236,5 +261,5 @@
 
             public void actionPerformed(ActionEvent arg0) {
-                videoengine.mute();
+                mute();
             }
         });
@@ -254,5 +279,5 @@
         
         speed.addChangeListener(new ChangeListener() {            
-            public void stateChanged(ChangeEvent arg0) {
+            public void stateChanged(ChangeEvent arg0) {            	            
             	if(!speed.getValueIsAdjusting())
             	{
Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayerObserver.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayerObserver.java	(revision 25864)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayerObserver.java	(revision 25865)
@@ -3,3 +3,4 @@
 public interface VideoPlayerObserver {
 	public void update_plays();
+
 }
