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



Rockbox mail archive

Subject: RE: Book Marking Functionality
From: Benjamin (mailinglists_at_samuraipanda.com)
Date: 2003-01-12


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:
resume_index*resume_offset*resume_seed*resume_first_index*queue_resume_i
ndex*resume_file*

------------------------------------------------------------------------ -- 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: owner-rockbox_at_cool.haxx.se [mailto:owner-rockbox_at_cool.haxx.se] On Behalf Of Björn Stenberg Sent: Sunday, January 12, 2003 2:32 AM To: rockbox_at_cool.haxx.se 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?

-- Björn



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa