Index: applications/editors/josm/plugins/videomapping/.classpath
===================================================================
--- applications/editors/josm/plugins/videomapping/.classpath	(revision 25250)
+++ applications/editors/josm/plugins/videomapping/.classpath	(revision 25291)
@@ -9,4 +9,5 @@
 	<classpathentry kind="lib" path="lib/vlcj-1.1.5.1.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/core"/>
+	<classpathentry kind="lib" path="lib/platform.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Index: applications/editors/josm/plugins/videomapping/build.xml
===================================================================
--- applications/editors/josm/plugins/videomapping/build.xml	(revision 25250)
+++ applications/editors/josm/plugins/videomapping/build.xml	(revision 25291)
@@ -33,5 +33,5 @@
 	<property name="commit.message" value="videomapping" />
 	<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-	<property name="plugin.main.version" value="3835" />
+	<property name="plugin.main.version" value="3600" />
 
 
@@ -45,8 +45,9 @@
 	<!-- this is the directory where the plugin jar is copied to -->
 	<property name="plugin.dist.dir"        value="../../dist"/>
-	<property name="ant.build.javac.target" value="1.5"/>
+	<property name="ant.build.javac.target" value="1.6"/>
 	<property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
 	<property name="vlcj"                  value="lib/vlcj-1.1.5.1.jar"/>
 	<property name="jna"                  value="lib/jna.jar"/>
+	<property name="platform"                  value="lib/platform.jar"/>
 	<property name="log4j"                  value="lib/log4j.jar"/>
 	<!--
@@ -70,6 +71,7 @@
 			<compilerarg value="-Xlint:unchecked"/>
 			<classpath>
-				<pathelement location="${vlcj}"/> <!--Add external library -->
+				<pathelement location="${vlcj}"/> <!--Add extra libraries -->
 				<pathelement location="${jna}"/>
+				<pathelement location="${platform}"/>
 				<pathelement location="${log4j}"/>
 			</classpath>
@@ -114,4 +116,9 @@
 				<attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>				
 			</manifest>
+			<!--added to bundle libs-->
+			<zipfileset src="lib/jna.jar" />
+			<zipfileset src="lib/log4j.jar" />
+			<zipfileset src="lib/platform.jar" />
+			<zipfileset src="lib/vlcj-1.1.5.1.jar" />
 		</jar>
 	</target>
Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoMappingPlugin.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoMappingPlugin.java	(revision 25250)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoMappingPlugin.java	(revision 25291)
@@ -67,7 +67,9 @@
     public VideoMappingPlugin(PluginInformation info) {
         super(info);
+        
         MapView.addLayerChangeListener(this);
         //Register for GPS menu
         VMenu = Main.main.menu.addMenu(" Video", KeyEvent.VK_V, Main.main.menu.defaultMenuPos,ht("/Plugin/Videomapping"));//TODO no more ugly " video" hack
+        VMenu.setEnabled(false);
         addMenuItems();
         enableControlMenus(true);
@@ -79,5 +81,5 @@
     //only use with GPS and own layers
     public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-        System.out.println(newLayer);
+        VMenu.setEnabled(true);
         if (newLayer instanceof GpxLayer)
         {
@@ -105,5 +107,6 @@
     }
 
-    public void layerRemoved(Layer arg0) {  
+    public void layerRemoved(Layer arg0) {
+    	if(Main.main.getActiveLayer()==null)	VMenu.setEnabled(false);
     } //well ok we have a local copy of the GPS track....
 
@@ -314,5 +317,4 @@
     
     
-    
     //we can only work on our own layer
     private void enableControlMenus(boolean enabled)
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 25250)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java	(revision 25291)
@@ -18,5 +18,5 @@
 import org.openstreetmap.josm.plugins.videomapping.VideoObserver;
 
-//combines video and GPS playback, major control has the video player
+//extends video playback, major control has the video player
 public class GPSVideoPlayer
 {
@@ -47,5 +47,5 @@
             //do a sync
             public void actionPerformed(ActionEvent e) {
-                long diff=gps.getRelativeTime()-video.getTime();
+                long diff=gps.getRelativeTime()-video.getTime(); //FIXME differenzierter betrachten
                 file= new GPSVideoFile(file, diff);
                 syncBtn.setBackground(Color.GREEN);
@@ -105,4 +105,5 @@
         
         for (WayPoint wp : ls) {
+        	wp.attr.clear();
             wp.attr.put("synced", "true");
         }   
Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/SimpleVideoPlayer.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/SimpleVideoPlayer.java	(revision 25250)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/SimpleVideoPlayer.java	(revision 25291)
@@ -1,4 +1,5 @@
 package org.openstreetmap.josm.plugins.videomapping.video;
 import java.awt.Adjustable;
+
 import org.apache.log4j.Logger;
 import org.apache.log4j.helpers.DateTimeDateFormat;
@@ -51,4 +52,6 @@
 import uk.co.caprica.vlcj.player.VideoMetaData;
 import uk.co.caprica.vlcj.player.embedded.*;
+import uk.co.caprica.vlcj.runtime.RuntimeUtil;
+import uk.co.caprica.vlcj.runtime.windows.WindowsRuntimeUtil;
 
 //basic class of a videoplayer for one video
@@ -73,18 +76,17 @@
     public SimpleVideoPlayer() {
         super();
-        /*TODO new EnvironmentCheckerFactory().newEnvironmentChecker().checkEnvironment();
-         * if(RuntimeUtil.isWindows()) {
-                vlcArgs.add("--plugin-path=" + WindowsRuntimeUtil.getVlcInstallDir() + "\\plugins");
-            }
-         */
         try
         {
+        	//some workarounds to detect libVLC and DNA on windows        
+        	if(RuntimeUtil.isWindows()) {
+        		System.setProperty("jna.library.path",WindowsRuntimeUtil.getVlcInstallDir());  //FIXME doesn't work even with this workaround!
+            }
+        	System.setProperty("logj4.configuration","file:log4j.xml"); //TODO still unsure if we can't link this to the JOSM log4j instance        	        
             //we don't need any options
             String[] libvlcArgs = {""};
-            String[] standardMediaOptions = {""}; 
-            
+            String[] standardMediaOptions = {""};
             //System.out.println("libvlc version: " + LibVlc.INSTANCE.libvlc_get_version());
             //setup Media Player
-            //TODO we have to deal with unloading things....
+            //TODO we have to deal with unloading things again ....
             MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory(libvlcArgs);
             FullScreenStrategy fullScreenStrategy = new DefaultFullScreenStrategy(this);
