Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Applications
  • Assigned To
    safetydan
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by safetydan - 2006-02-16
Last edited by safetydan - 2006-03-08

FS#3033 - Cut/Copy/Paste in the Dir Browser

Patch adds context menu items to the onplay menu. Users
can cut/copy a file to a new directory by pasting them
in the new directory. Works the same as in Windows for
example.

The task blocks this from closing
ID Project Summary Priority Severity Assigned To Progress
2992 Rockbox  FS#2992 - Copy, Paste and Cut  Very Low Low safetydan
100%
Closed by  safetydan
2006-03-20 12:00
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Now in CVS.

Anonymous Submitter commented on 2006-02-17 16:40

w00t!!!

You will probably get better performance if you modify the
code to edit the FAT directly for cut/paste operations.
(This won’t work for copy, of course.)

You could use the plugin buffer for “read”. If I am not mistaken thid buffer is empty all the time, except if a ‘tsr’ plugin is loaded, like battery_bench or alpine_cdc

The plugin buffer could definitely be used as data buffer for copying. plugin_get_buffer() will give you whatever is left, either the complete buffer, or when a TSR plugin is loaded, whatever is left. TSR plugins are not allowed to use plugin_get_buffer() themselves, so this is safe. If the available plugin buffer size is too small, you can resort to the stack. The copy buffer should at least be 512 byte (one sector), more is better but in multiples of 512. 1KB or 2KB on the stack should be okay.

Editing the FAT should work for moving, but only if the file stays on the same volume. It’s important to check this, as we do have one platfrom in CVS that has multivolume support enabled, the Ondio. The H300 will probably follow if we get USBOTG going.

Also keep an eye on code size. Directory move/copy would be nice as well, and when the destination file exists *and* time stamp and size are the same, there’s no need to ask for overwrite.

Newer version of the patch with not much different. The code is cleaner, and it attempts to use the plugin buffer to speed up file copies. Results in a 60% (1.12 MByte/s vs 1.84 MByte/s) speed increase in file copies.

And yet another version. Now supports directory cut/copy and paste. Also fixes file copying. I’ve no idea how that was working before.

It’d be great if someone else could review this because it’s a big chunk of code and has many possible failure cases.

hi
when copying a playlist
can you maybe put in a dialogue box which is asking to copy the playlist or the files within a playlist… would be a really nice addition

crashes on latest CVS with this:

CC onplay.c
onplay.c: In function `clipboard_pastefile’:
onplay.c:568: error: called object is not a function
make[1]: * [/home/guest/rockbox-devel/build/apps/onplay.o] Error 1
make:
* [all] Error 2

Sorry about that. Should actually try compiling for target before assuming it works. This version of the patch at least compiles.

Wow! also works for Ondio to copy a directory from the internal memory to MMC and vice a versa!. It seems to hung after a while (no progress bar), but all files in the directory were copied fine.

New version that should support cut and paste of files across volumes (i.e. from internal memory to MMC on Ondio). Previously on copy would work. Also fixed a bug in the file copying routines.

Another version with no new features. Slightly smaller compiled size. Also the copy buffer size is kept to a multiple of the disk sector size for a possible speed boost in file copy.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing