Changeset 25291 in osm for applications/editors/josm
- Timestamp:
- 2011-02-13T19:23:56+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/videomapping
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/videomapping/.classpath
r25250 r25291 9 9 <classpathentry kind="lib" path="lib/vlcj-1.1.5.1.jar"/> 10 10 <classpathentry combineaccessrules="false" kind="src" path="/core"/> 11 <classpathentry kind="lib" path="lib/platform.jar"/> 11 12 <classpathentry kind="output" path="bin"/> 12 13 </classpath> -
applications/editors/josm/plugins/videomapping/build.xml
r25250 r25291 33 33 <property name="commit.message" value="videomapping" /> 34 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="3 835" />35 <property name="plugin.main.version" value="3600" /> 36 36 37 37 … … 45 45 <!-- this is the directory where the plugin jar is copied to --> 46 46 <property name="plugin.dist.dir" value="../../dist"/> 47 <property name="ant.build.javac.target" value="1. 5"/>47 <property name="ant.build.javac.target" value="1.6"/> 48 48 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 49 49 <property name="vlcj" value="lib/vlcj-1.1.5.1.jar"/> 50 50 <property name="jna" value="lib/jna.jar"/> 51 <property name="platform" value="lib/platform.jar"/> 51 52 <property name="log4j" value="lib/log4j.jar"/> 52 53 <!-- … … 70 71 <compilerarg value="-Xlint:unchecked"/> 71 72 <classpath> 72 <pathelement location="${vlcj}"/> <!--Add ext ernal library-->73 <pathelement location="${vlcj}"/> <!--Add extra libraries --> 73 74 <pathelement location="${jna}"/> 75 <pathelement location="${platform}"/> 74 76 <pathelement location="${log4j}"/> 75 77 </classpath> … … 114 116 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 115 117 </manifest> 118 <!--added to bundle libs--> 119 <zipfileset src="lib/jna.jar" /> 120 <zipfileset src="lib/log4j.jar" /> 121 <zipfileset src="lib/platform.jar" /> 122 <zipfileset src="lib/vlcj-1.1.5.1.jar" /> 116 123 </jar> 117 124 </target> -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoMappingPlugin.java
r25250 r25291 67 67 public VideoMappingPlugin(PluginInformation info) { 68 68 super(info); 69 69 70 MapView.addLayerChangeListener(this); 70 71 //Register for GPS menu 71 72 VMenu = Main.main.menu.addMenu(" Video", KeyEvent.VK_V, Main.main.menu.defaultMenuPos,ht("/Plugin/Videomapping"));//TODO no more ugly " video" hack 73 VMenu.setEnabled(false); 72 74 addMenuItems(); 73 75 enableControlMenus(true); … … 79 81 //only use with GPS and own layers 80 82 public void activeLayerChange(Layer oldLayer, Layer newLayer) { 81 System.out.println(newLayer);83 VMenu.setEnabled(true); 82 84 if (newLayer instanceof GpxLayer) 83 85 { … … 105 107 } 106 108 107 public void layerRemoved(Layer arg0) { 109 public void layerRemoved(Layer arg0) { 110 if(Main.main.getActiveLayer()==null) VMenu.setEnabled(false); 108 111 } //well ok we have a local copy of the GPS track.... 109 112 … … 314 317 315 318 316 317 319 //we can only work on our own layer 318 320 private void enableControlMenus(boolean enabled) -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java
r25250 r25291 18 18 import org.openstreetmap.josm.plugins.videomapping.VideoObserver; 19 19 20 // combines video and GPSplayback, major control has the video player20 //extends video playback, major control has the video player 21 21 public class GPSVideoPlayer 22 22 { … … 47 47 //do a sync 48 48 public void actionPerformed(ActionEvent e) { 49 long diff=gps.getRelativeTime()-video.getTime(); 49 long diff=gps.getRelativeTime()-video.getTime(); //FIXME differenzierter betrachten 50 50 file= new GPSVideoFile(file, diff); 51 51 syncBtn.setBackground(Color.GREEN); … … 105 105 106 106 for (WayPoint wp : ls) { 107 wp.attr.clear(); 107 108 wp.attr.put("synced", "true"); 108 109 } -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/SimpleVideoPlayer.java
r25250 r25291 1 1 package org.openstreetmap.josm.plugins.videomapping.video; 2 2 import java.awt.Adjustable; 3 3 4 import org.apache.log4j.Logger; 4 5 import org.apache.log4j.helpers.DateTimeDateFormat; … … 51 52 import uk.co.caprica.vlcj.player.VideoMetaData; 52 53 import uk.co.caprica.vlcj.player.embedded.*; 54 import uk.co.caprica.vlcj.runtime.RuntimeUtil; 55 import uk.co.caprica.vlcj.runtime.windows.WindowsRuntimeUtil; 53 56 54 57 //basic class of a videoplayer for one video … … 73 76 public SimpleVideoPlayer() { 74 77 super(); 75 /*TODO new EnvironmentCheckerFactory().newEnvironmentChecker().checkEnvironment();76 * if(RuntimeUtil.isWindows()) {77 vlcArgs.add("--plugin-path=" + WindowsRuntimeUtil.getVlcInstallDir() + "\\plugins");78 }79 */80 78 try 81 79 { 80 //some workarounds to detect libVLC and DNA on windows 81 if(RuntimeUtil.isWindows()) { 82 System.setProperty("jna.library.path",WindowsRuntimeUtil.getVlcInstallDir()); //FIXME doesn't work even with this workaround! 83 } 84 System.setProperty("logj4.configuration","file:log4j.xml"); //TODO still unsure if we can't link this to the JOSM log4j instance 82 85 //we don't need any options 83 86 String[] libvlcArgs = {""}; 84 String[] standardMediaOptions = {""}; 85 87 String[] standardMediaOptions = {""}; 86 88 //System.out.println("libvlc version: " + LibVlc.INSTANCE.libvlc_get_version()); 87 89 //setup Media Player 88 //TODO we have to deal with unloading things ....90 //TODO we have to deal with unloading things again .... 89 91 MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory(libvlcArgs); 90 92 FullScreenStrategy fullScreenStrategy = new DefaultFullScreenStrategy(this);
Note:
See TracChangeset
for help on using the changeset viewer.