Changeset 81
- Timestamp:
- 04/06/06 22:27:03 (6 years ago)
- Location:
- trunk/src
- Files:
-
- 1 deleted
- 4 edited
-
Makefile.am (modified) (1 diff)
-
org/thestaticvoid/iriverter/Converter.java (modified) (4 diffs)
-
org/thestaticvoid/iriverter/ConverterOptions.java (modified) (1 diff)
-
org/thestaticvoid/iriverter/ConverterUI.java (modified) (3 diffs)
-
org/thestaticvoid/iriverter/FrameRateDialog.java (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile.am
r80 r81 14 14 15 15 iriverter_source_files = \ 16 org/thestaticvoid/iriverter/FrameRateDialog.java \17 16 org/thestaticvoid/iriverter/DVD.java \ 18 17 org/thestaticvoid/iriverter/SingleVideoAdapter.java \ -
trunk/src/org/thestaticvoid/iriverter/Converter.java
r79 r81 185 185 } 186 186 187 String vf = "filmdint=io=" + ((int) Math.round(info.getFrameRate() * 1000)) + ":" + ((int) Math.round(converterOptions.getFrameRate() * 1000)); 187 double ofps = (info.getFrameRate() > converterOptions.getCurrentProfile().getMaxFrameRate() ? converterOptions.getCurrentProfile().getMaxFrameRate() : info.getFrameRate()); 188 189 String vf = "filmdint=io=" + ((int) Math.round(info.getFrameRate() * 1000)) + ":" + ((int) Math.round(ofps * 1000)); 188 190 if (converterOptions.getPanAndScan()) 189 191 vf += ",scale=" + ((int) ((info.getDimensions().getWidth()) * (((double) converterOptions.getDimensions().getHeight()) / (double) info.getDimensions().getHeight()))) + ":" + converterOptions.getDimensions().getHeight() + ",crop=" + converterOptions.getDimensions().getWidth() + ":" + converterOptions.getDimensions().getHeight(); … … 228 230 commandList.add("-vf"); 229 231 commandList.add(vf); 230 commandList.add("-af"); 231 commandList.add(af); 232 233 if (!af.equals("")) { 234 commandList.add("-af"); 235 commandList.add(af); 236 } 237 232 238 commandList.add("-ofps"); 233 commandList.add("" + converterOptions.getFrameRate());239 commandList.add("" + ofps); 234 240 commandList.add("-srate"); 235 241 commandList.add("44100"); … … 280 286 } 281 287 282 String vf = "filmdint=io=" + ((int) Math.round(info.getFrameRate() * 1000)) + ":" + ((int) Math.round(converterOptions.getFrameRate() * 1000)); 288 double ofps = (info.getFrameRate() > converterOptions.getCurrentProfile().getMaxFrameRate() ? converterOptions.getCurrentProfile().getMaxFrameRate() : info.getFrameRate()); 289 290 String vf = "filmdint=io=" + ((int) Math.round(info.getFrameRate() * 1000)) + ":" + ((int) Math.round(ofps * 1000)); 283 291 if (converterOptions.getPanAndScan()) 284 292 vf += ",scale=" + ((int) ((info.getDimensions().getWidth()) * (((double) converterOptions.getDimensions().getHeight()) / (double) info.getDimensions().getHeight()))) + ":" + converterOptions.getDimensions().getHeight() + ",crop=" + converterOptions.getDimensions().getWidth() + ":" + converterOptions.getDimensions().getHeight(); … … 325 333 commandList.add("-vf"); 326 334 commandList.add(vf); 327 commandList.add("-af"); 328 commandList.add(af); 335 336 if (!af.equals("")) { 337 commandList.add("-af"); 338 commandList.add(af); 339 } 340 329 341 commandList.add("-ofps"); 330 commandList.add("" + converterOptions.getFrameRate());342 commandList.add("" + ofps); 331 343 commandList.add("-srate"); 332 344 commandList.add("44100"); -
trunk/src/org/thestaticvoid/iriverter/ConverterOptions.java
r72 r81 102 102 return Integer.parseInt(audioBitrate); 103 103 } 104 105 public double getFrameRate() {106 String frameRate = readOption("frameRate");107 if (frameRate.equals(""))108 return getCurrentProfile().getMaxFrameRate();109 110 return Double.parseDouble(frameRate);111 }112 104 113 105 public Dimensions getDimensions() { -
trunk/src/org/thestaticvoid/iriverter/ConverterUI.java
r73 r81 19 19 private CTabFolder tabFolder; 20 20 private Map profileMenuItems, dimensionsMenuItems; 21 private MenuItem convert, playFile, newSingleVideo, newDirectory, newDVD, advancedJobs, manualSplit, joinVideos, moveUp, moveDown, closeJob, closeAllJobs, quit, bitrate, videoSize, frameRate,panAndScan, advancedOptions, audioSync, automaticallySplit, volume, contents, about;21 private MenuItem convert, playFile, newSingleVideo, newDirectory, newDVD, advancedJobs, manualSplit, joinVideos, moveUp, moveDown, closeJob, closeAllJobs, quit, bitrate, videoSize, panAndScan, advancedOptions, audioSync, automaticallySplit, volume, contents, about; 22 22 private Menu videoSizeMenu; 23 23 private DropTarget target; … … 197 197 videoSizeMenu = new Menu(shell, SWT.DROP_DOWN); 198 198 videoSize.setMenu(videoSizeMenu); 199 200 frameRate = new MenuItem(optionsMenu, SWT.PUSH);201 frameRate.setText("&Frame Rate...");202 frameRate.addSelectionListener(this);203 199 204 200 new MenuItem(optionsMenu, SWT.SEPARATOR); … … 405 401 if (dimensionsMenuItems.containsKey(e.getSource())) { 406 402 407 }408 409 if (e.getSource() == frameRate) {410 FrameRateDialog frameRateDialog = new FrameRateDialog(shell, SWT.NONE, converterOptions.getCurrentProfile().getMaxFrameRate(), converterOptions.getFrameRate());411 converterOptions.writeOption("frameRate", "" + frameRateDialog.open());412 403 } 413 404
Note: See TracChangeset
for help on using the changeset viewer.
