Rockbox mail archive
Subject: Re: Viewing Files With Plugins
From: Eric Linenberg (elinenbe_at_umich.edu)
Date: 2004-01-09
Before the .rockbox directory and the .rockbox/rocks directory gets
completely out of hand I think a reorganization needs to be done. The
patch tracker already has a few patch that address this situation, but
sooner is better then later.
A little story: I just updated one of my friends jukeboxes with the
latest firmware (he had something from about a year ago) and the first
thing he says is "where is my sokoban?" (he had just gotten off a long
plane trip and was very into the game) So, I tried to explain to him
the way it currently worked. Still he did not quite understand why
the fimrware_flash.rock and the sokoban.rock etc were right next to
each other in the menu. I agreed -- the way it currently is I think
needs to be changed, especially with more .rocks on the way and more
files that will be filling up our .rockbox and .rockbox/rocks
directory.
-eric
DS> Hi friends,
DS> I bounced around a new design idea with Björn, and here's what we came up
DS> with. I'm interested in feedback. Would this system be an improvement?
DS> Viewing a File
DS> When a file is PLAYed, the following will be made in order to figure out
DS> what to do with the particular file:
DS> 1. Internally recognized extensions (.mp3) (like today)
DS> 2. Extension config file ".rockbox/view.config". A config file lists
DS> extensions and what plugin (file name) that should be ran to view that
DS> particular file.
DS> 3. Check if ".rockbox/viewer/[extension]-[anything].rock" exists, and if it
DS> does: use that.
DS> 4. If none of the above worked, the file type is unsupported.
DS> No Rebuild Needed
DS> This enables users to add, remove or replace viewers at will with no
DS> rebuilds at all necessary, and without Rockbox even being aware of what
DS> plugins that exist or not.
DS> View With
DS> The "on play" screen can then get a "view with..." option that offers the
DS> user to view the currently selected file using one of the viewers present in
DS> the ".rockbox/viewer" directory. This would enable for example .m3u files to
DS> get viewed by the text viewer, or sending an mp3 file to a hex-editor etc.
DS> The concept of "view supported" files will break, so we should probably
DS> remove that.
DS> Icons
DS> There's currently no solution here for how to make particular files get
DS> custom icons in the dir browser. We could probably let the existing icons
DS> remain until we think of a system to fix this.
DS> Build System
DS> We would add a separate config file in the build system that makes viewer
DS> plugins get a suitable name for the viewer-directory when built. So that
DS> viewer.c becomes txt-viewer.rock and chip8.c becomes ch8-chip8.rock etc. If
DS> the plugin is not mentioned in this file, it would be named like today.
DS> What did we forget? What should be added? What should be removed?
Page was last modified "Jan 10 2012" The Rockbox Crew
|