|
Rockbox mail archiveSubject: Viewing Files With PluginsViewing Files With Plugins
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 8 Jan 2004 16:00:28 +0100 (CET) Hi friends, I bounced around a new design idea with Björn, and here's what we came up with. I'm interested in feedback. Would this system be an improvement? Viewing a File When a file is PLAYed, the following will be made in order to figure out what to do with the particular file: 1. Internally recognized extensions (.mp3) (like today) 2. Extension config file ".rockbox/view.config". A config file lists extensions and what plugin (file name) that should be ran to view that particular file. 3. Check if ".rockbox/viewer/[extension]-[anything].rock" exists, and if it does: use that. 4. If none of the above worked, the file type is unsupported. No Rebuild Needed This enables users to add, remove or replace viewers at will with no rebuilds at all necessary, and without Rockbox even being aware of what plugins that exist or not. View With The "on play" screen can then get a "view with..." option that offers the user to view the currently selected file using one of the viewers present in the ".rockbox/viewer" directory. This would enable for example .m3u files to get viewed by the text viewer, or sending an mp3 file to a hex-editor etc. The concept of "view supported" files will break, so we should probably remove that. Icons There's currently no solution here for how to make particular files get custom icons in the dir browser. We could probably let the existing icons remain until we think of a system to fix this. Build System We would add a separate config file in the build system that makes viewer plugins get a suitable name for the viewer-directory when built. So that viewer.c becomes txt-viewer.rock and chip8.c becomes ch8-chip8.rock etc. If the plugin is not mentioned in this file, it would be named like today. What did we forget? What should be added? What should be removed? -- Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/Received on 2004-01-08 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |