Changeset 23173 in osm for applications
- Timestamp:
- 2010-09-15T12:51:36+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/videomapping
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/GpsPlayer.java
r22690 r23173 347 347 public void jump(long relTime) { 348 348 int pos = Math.round(relTime/1000);//TODO ugly quick hack 349 jump(pos); 349 jump(pos); 350 //if (autoCenter) Main.map.mapView. 350 351 } 351 352 -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/PositionLayer.java
r23172 r23173 268 268 { 269 269 player.jump(wp); 270 if(gps!=null) notifyObservers(player.getRelativeTime()); //call videoplayer to set rigth position 270 //jump if we know position 271 if(wp.attr.containsKey("synced")) 272 { 273 if(gps!=null) notifyObservers(player.getRelativeTime()); //call videoplayers to set right position 274 } 271 275 } 272 276 } -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoMappingPlugin.java
r23172 r23173 147 147 }; 148 148 149 VStart = new JosmAction(tr(" play/pause"), "audio-playpause", tr("starts/pauses video playback"),150 Shortcut.registerShortcut("videomapping:startstop","",KeyEvent.VK_ SPACE, Shortcut.GROUP_DIRECT), false) {149 VStart = new JosmAction(tr("Play/Pause"), "audio-playpause", tr("starts/pauses video playback"), 150 Shortcut.registerShortcut("videomapping:startstop","",KeyEvent.VK_NUMPAD5, Shortcut.GROUP_DIRECT), false) { 151 151 152 152 public void actionPerformed(ActionEvent e) { … … 154 154 } 155 155 }; 156 Vbackward = new JosmAction(tr(" backward"), "audio-prev", tr("jumps n sec back"),156 Vbackward = new JosmAction(tr("Backward"), "audio-prev", tr("jumps n sec back"), 157 157 Shortcut.registerShortcut("videomapping:backward","",KeyEvent.VK_NUMPAD4, Shortcut.GROUP_DIRECT), false) { 158 159 /**160 *161 */162 private static final long serialVersionUID = -1060444361541900464L;163 164 158 public void actionPerformed(ActionEvent e) { 165 159 player.backward(); … … 167 161 } 168 162 }; 169 Vbackward = new JosmAction(tr(" jump"), null, tr("jumps to the entered gps time"),null, false) {163 Vbackward = new JosmAction(tr("Jump To"), null, tr("jumps to the entered gps time"),null, false) { 170 164 public void actionPerformed(ActionEvent e) { 171 165 String s =JOptionPane.showInputDialog(tr("please enter GPS timecode"),"10:07:57"); … … 185 179 } 186 180 }; 187 Vforward= new JosmAction(tr(" forward"), "audio-next", tr("jumps n sec forward"),181 Vforward= new JosmAction(tr("Forward"), "audio-next", tr("jumps n sec forward"), 188 182 Shortcut.registerShortcut("videomapping:forward","",KeyEvent.VK_NUMPAD6, Shortcut.GROUP_DIRECT), false) { 189 183 … … 193 187 } 194 188 }; 195 Vfaster= new JosmAction(tr(" faster"), "audio-faster", tr("faster playback"),196 Shortcut.registerShortcut("videomapping:faster","",KeyEvent.VK_ PLUS, Shortcut.GROUP_DIRECT), false) {189 Vfaster= new JosmAction(tr("Faster"), "audio-faster", tr("faster playback"), 190 Shortcut.registerShortcut("videomapping:faster","",KeyEvent.VK_NUMPAD8, Shortcut.GROUP_DIRECT), false) { 197 191 198 192 public void actionPerformed(ActionEvent e) { … … 201 195 } 202 196 }; 203 Vslower= new JosmAction(tr(" slower"), "audio-slower", tr("slower playback"),204 Shortcut.registerShortcut("videomapping:slower","",KeyEvent.VK_ MINUS, Shortcut.GROUP_DIRECT), false) {197 Vslower= new JosmAction(tr("Slower"), "audio-slower", tr("slower playback"), 198 Shortcut.registerShortcut("videomapping:slower","",KeyEvent.VK_NUMPAD2, Shortcut.GROUP_DIRECT), false) { 205 199 206 200 public void actionPerformed(ActionEvent e) { … … 209 203 } 210 204 }; 211 Vloop= new JosmAction(tr(" loop"), "clock", tr("loops n sec around current position"),212 Shortcut.registerShortcut("videomapping:loop","",KeyEvent.VK_NUMPAD 5, Shortcut.GROUP_DIRECT), false) {205 Vloop= new JosmAction(tr("Loop"), null, tr("loops n sec around current position"), 206 Shortcut.registerShortcut("videomapping:loop","",KeyEvent.VK_NUMPAD7, Shortcut.GROUP_DIRECT), false) { 213 207 214 208 public void actionPerformed(ActionEvent e) { … … 219 213 220 214 //now the options menu 221 VCenterIcon = new JCheckBoxMenuItem(new JosmAction(tr("Keep centered"), "cursor/crosshair", tr("follows the video icon automaticly"),null, false) {215 VCenterIcon = new JCheckBoxMenuItem(new JosmAction(tr("Keep centered"), null, tr("follows the video icon automaticly"),null, false) { 222 216 223 217 public void actionPerformed(ActionEvent e) { 224 218 autocenter=VCenterIcon.isSelected(); 219 player.setAutoCenter(autocenter); 225 220 applySettings(); 226 221 saveSettings(); … … 229 224 }); 230 225 //now the options menu 231 VSubTitles = new JCheckBoxMenuItem(new JosmAction(tr("Subtitles"), "cursor/crosshair", tr("Show subtitles in video"),null, false) {226 VSubTitles = new JCheckBoxMenuItem(new JosmAction(tr("Subtitles"), null, tr("Show subtitles in video"),null, false) { 232 227 233 228 public void actionPerformed(ActionEvent e) { -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java
r22690 r23173 23 23 public class GPSVideoPlayer implements PlayerObserver{ 24 24 Timer t; 25 TimerTask syncGPSTrack;25 TimerTask updateGPSTrack; 26 26 private GpsPlayer gps; 27 27 private SimpleVideoPlayer video; … … 64 64 public void playing(long time) { 65 65 //sync the GPS back 66 if(synced) gps.jump(getGPSTime(time)); 66 if(synced) gps.jump(getGPSTime(time)); 67 67 68 } 68 69 … … 187 188 188 189 } 190 191 public boolean isSynced() 192 { 193 return isSynced(); 194 } 189 195 190 196 public void loop() {
Note:
See TracChangeset
for help on using the changeset viewer.