Changeset 25291 in osm for applications/editors/josm/plugins/videomapping/src
- Timestamp:
- 2011-02-13T19:23:56+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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 videoand 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.