Changeset 25291 in osm for applications/editors/josm


Ignore:
Timestamp:
2011-02-13T19:23:56+01:00 (14 years ago)
Author:
guardian
Message:

minor bugfixes: lyerchange, deployment

Location:
applications/editors/josm/plugins/videomapping
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/videomapping/.classpath

    r25250 r25291  
    99        <classpathentry kind="lib" path="lib/vlcj-1.1.5.1.jar"/>
    1010        <classpathentry combineaccessrules="false" kind="src" path="/core"/>
     11        <classpathentry kind="lib" path="lib/platform.jar"/>
    1112        <classpathentry kind="output" path="bin"/>
    1213</classpath>
  • applications/editors/josm/plugins/videomapping/build.xml

    r25250 r25291  
    3333        <property name="commit.message" value="videomapping" />
    3434        <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
     35        <property name="plugin.main.version" value="3600" />
    3636
    3737
     
    4545        <!-- this is the directory where the plugin jar is copied to -->
    4646        <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"/>
    4848        <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    4949        <property name="vlcj"                  value="lib/vlcj-1.1.5.1.jar"/>
    5050        <property name="jna"                  value="lib/jna.jar"/>
     51        <property name="platform"                  value="lib/platform.jar"/>
    5152        <property name="log4j"                  value="lib/log4j.jar"/>
    5253        <!--
     
    7071                        <compilerarg value="-Xlint:unchecked"/>
    7172                        <classpath>
    72                                 <pathelement location="${vlcj}"/> <!--Add external library -->
     73                                <pathelement location="${vlcj}"/> <!--Add extra libraries -->
    7374                                <pathelement location="${jna}"/>
     75                                <pathelement location="${platform}"/>
    7476                                <pathelement location="${log4j}"/>
    7577                        </classpath>
     
    114116                                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>                             
    115117                        </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" />
    116123                </jar>
    117124        </target>
  • applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoMappingPlugin.java

    r25250 r25291  
    6767    public VideoMappingPlugin(PluginInformation info) {
    6868        super(info);
     69       
    6970        MapView.addLayerChangeListener(this);
    7071        //Register for GPS menu
    7172        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);
    7274        addMenuItems();
    7375        enableControlMenus(true);
     
    7981    //only use with GPS and own layers
    8082    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
    81         System.out.println(newLayer);
     83        VMenu.setEnabled(true);
    8284        if (newLayer instanceof GpxLayer)
    8385        {
     
    105107    }
    106108
    107     public void layerRemoved(Layer arg0) { 
     109    public void layerRemoved(Layer arg0) {
     110        if(Main.main.getActiveLayer()==null)    VMenu.setEnabled(false);
    108111    } //well ok we have a local copy of the GPS track....
    109112
     
    314317   
    315318   
    316    
    317319    //we can only work on our own layer
    318320    private void enableControlMenus(boolean enabled)
  • applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java

    r25250 r25291  
    1818import org.openstreetmap.josm.plugins.videomapping.VideoObserver;
    1919
    20 //combines video and GPS playback, major control has the video player
     20//extends video playback, major control has the video player
    2121public class GPSVideoPlayer
    2222{
     
    4747            //do a sync
    4848            public void actionPerformed(ActionEvent e) {
    49                 long diff=gps.getRelativeTime()-video.getTime();
     49                long diff=gps.getRelativeTime()-video.getTime(); //FIXME differenzierter betrachten
    5050                file= new GPSVideoFile(file, diff);
    5151                syncBtn.setBackground(Color.GREEN);
     
    105105       
    106106        for (WayPoint wp : ls) {
     107                wp.attr.clear();
    107108            wp.attr.put("synced", "true");
    108109        }   
  • applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/SimpleVideoPlayer.java

    r25250 r25291  
    11package org.openstreetmap.josm.plugins.videomapping.video;
    22import java.awt.Adjustable;
     3
    34import org.apache.log4j.Logger;
    45import org.apache.log4j.helpers.DateTimeDateFormat;
     
    5152import uk.co.caprica.vlcj.player.VideoMetaData;
    5253import uk.co.caprica.vlcj.player.embedded.*;
     54import uk.co.caprica.vlcj.runtime.RuntimeUtil;
     55import uk.co.caprica.vlcj.runtime.windows.WindowsRuntimeUtil;
    5356
    5457//basic class of a videoplayer for one video
     
    7376    public SimpleVideoPlayer() {
    7477        super();
    75         /*TODO new EnvironmentCheckerFactory().newEnvironmentChecker().checkEnvironment();
    76          * if(RuntimeUtil.isWindows()) {
    77                 vlcArgs.add("--plugin-path=" + WindowsRuntimeUtil.getVlcInstallDir() + "\\plugins");
    78             }
    79          */
    8078        try
    8179        {
     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                       
    8285            //we don't need any options
    8386            String[] libvlcArgs = {""};
    84             String[] standardMediaOptions = {""};
    85            
     87            String[] standardMediaOptions = {""};
    8688            //System.out.println("libvlc version: " + LibVlc.INSTANCE.libvlc_get_version());
    8789            //setup Media Player
    88             //TODO we have to deal with unloading things....
     90            //TODO we have to deal with unloading things again ....
    8991            MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory(libvlcArgs);
    9092            FullScreenStrategy fullScreenStrategy = new DefaultFullScreenStrategy(this);
Note: See TracChangeset for help on using the changeset viewer.