dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Viewing Files With Plugins Proof of concept

Re: Viewing Files With Plugins Proof of concept

From: Björn Stenberg <>
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:

File: chip8.rock
Name: chip8
Extension: ch8

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.

Received on 2004-01-20

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