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

Rockbox mail archive

Subject: RE: Book Marking Functionality

RE: Book Marking Functionality

From: Benjamin <>
Date: Sun, 12 Jan 2003 10:20:17 -0800

Okay, I'm still tired. I clicked send instead of save.

Anyway, I chose this design because it allowed me to get a bookmark
capability functioning quickly since I listen to 25+ hour audio books
while I work out. I had originally not planned to support playlists and
instead implement just an mp3 bookmark capability, but changed my after
corresponding with Hardeep Sidhu, who suggested I just store the resume
information. Once I looked into writing the resume information, I
realized that it would be easier to just leverage the existing resume
capability instead of attempting to write a whole bunch of code that
duplicates existing functionality (i.e. start_resume()). Once I had
done this, I found the resume needed to be set to "ask" or "yes" and
considered modifying start_resume to take an additional parameter, but I
wanted to get feedback from the rest of the group based on what I had
already done before I start modifying existing code beyond what I had
already done.


-----Original Message-----
From: Benjamin []
Sent: Sunday, January 12, 2003 10:05 AM
To: ''
Subject: RE: Book Marking Functionality

Whoops, I forgot that section. It was a little late :-). I have notes
in the source explaining the design a bit.

I basically took a lazy approach and leveraged the built in resume
capability of Rockbox. To that end, I over write any existing resume
information that is currently in memory and over write it with the
stored information and then call the existing start_resume function
(which explains why resume has to be set to "ask" or "yes". I wanted to
get a functioning version up because I'm not sure how much time I'll be
able to devote to this from this point on (pesky work) and I could us
some help/suggestions to speed up the development process (gotta love
open source). Below is further information on the bookmark capability.

Writing a bookmark
This bookmark capability takes the current resume information and writes
it to a file whose name is based off of the currently playing file i.e.
bookmarking /foo1/foo.mp3 creates the file /foo1/foo.bmf. This file
contains the following line:
Loading a bookmark
When loaded, the bookmark_load function takes a bookmark file and reads
the above line, one character at a time until it hits an asterisk (*).
Once it does, this signals that this is the end of a field. As each
field is successfully loaded, it overwrites the existing resume
information that is stored in memory.  Once all fields have been
successfully loaded, bookmark_load calls tree.c:start_resume().
- Ben
-----Original Message-----
From: [] On
Behalf Of Björn Stenberg
Sent: Sunday, January 12, 2003 2:32 AM
Subject: Re: Book Marking Functionality
Benjamin Metzler wrote:
> I have created a bookmark functionality with the rockbox code.
Please also describe the design you have chosen. We have discussed
several ways of handling bookmarks. Which one did you choose, and why?
Received on 2003-01-12

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