Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Rockbox mail archive

Subject: Re: Viewing Files With Plugins Proof of concept

Re: Viewing Files With Plugins Proof of concept

From: Björn Stenberg <bjorn_at_haxx.se>
Date: Tue, 20 Jan 2004 21:35:33 +0100

Henrik Backe wrote:
> I've made a few changes to this scheme.
> - /.rockbox/viewers.config and /.rockbox/viewers are
> read/scanned at bootup if no /.rockbox/.viewers.cache
> exist. This way we always know what extensions are
> supported, and we only get excessive file reads on the
> first boot.

Is this really necessary? Reading one file and one dir should not be much slower than just reading one file.

I would prefer to just have a single config file. This also simplifies the code.

> - I've made the assumption that for example
> txt-viewer.rock and viewer.rock will be in
> the /.rockbox/viewers folder, and then no rocks with
> an extension prefix should be displayed in the
> onplay->"open with" menu.

How do you mean?

> - figure out a sane value for string_buffer in filetypes.c
> It's set to 1000 bytes, but I think it can be reduced.

Could you explain what you use it for? It's not entirely obvious.

I think the plugin file config format should be simplified, from the verbose:

<rock>
File: chip8.rock
Name: chip8
Extension: ch8
Icon:
</rock>

to the more terse:

chip8,ch8,70 70 7f 7f 70 70

This simplifies the parsing code greatly, and speeds up loading too.

I also don't think it is necessary to verify that each plugin exists when loading the config file. It's just as well to show an error message when the user tries to load it from the menu.

-- 
Björn
Received on 2004-01-20

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy